Pixel precision: Difference between revisions

From MZXWiki
Jump to navigation Jump to search
(Created page with "Pixel precision in Megazeux is a technique that involves using the char edit command or [[List of built-in counters|the CHAR_X/CHAR_Y/PIXEL or CHAR/CHAR...")
 
m (Spelling)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Pixel precision in [[Megazeux]] is a technique that involves [[character editing|using the char edit command]] or [[List of built-in counters|the CHAR_X/CHAR_Y/PIXEL or CHAR/CHAR_BYTE/BYTE counters]] to display real or illusory sub-char objects/sprites. There are multiple degrees of precision that can be achieved with this technique, from true single-pixel precision to half-char movement, and it has many potential gameplay applications.
Pixel precision in [[Megazeux]] is a technique where elements of a game are drawn, move, or appear to move at a finer precision than individual chars. There are several ways to achieve this effect, but the easiest (and recommended) way is to use unbound [[sprites]].


The term "pixel perfect" is frequently described to use this technique, but is frowned upon from a technical standpoint as the difficulty and work that can go into making such an engine work efficiently, and the technical limitations imposed on it by Megazeux, makes the use of it far from perfect.
==Details==
===After 2.90===
The primary feature of unbound [[sprites]] (introduced in MegaZeux 2.90) is to be able to easily achieve pixel precision sprite movement. When the SPRn_UNBOUND counter is set to 1, the sprite's X and Y values will be interpreted as pixel values instead of char values. This also affects the X and Y values of the sprite's collision box. Unbound sprites have many other useful features such as pixel-based collision, the ability to use alternate character sets instead of the world's regular character set, and the option to make one of the colors they display fully transparent.


[[Logicow]] released a Megazeux fork which featured a draw command that allowed the drawing of pixel-precise objects on the screen.  This functionality has not been introduced to the main Megazeux line.
===Before 2.90===
A common method of giving objects the appearance of pixel-precise movement is to draw the entire game using half-char characters. The [[CHAR EDIT]] command or the CHAR_X/CHAR_Y/PIXEL or CHAR/CHAR_BYTE/BYTE counters can be used to make game elements appear to be moving at subchar precision, though this technique can be complicated in some cases.
 
===MZX Forks===
[[Logicow]] released a Megazeux fork which featured a draw command that allowed the drawing of pixel-precise objects on the screen.  This particular command has not been introduced to the main Megazeux line and likely never will be.


== Examples ==
== Examples ==
*'''[[Fritz Blitz]]'''
===After 2.90===
*'''[[Cheese's Adventure]]'''
Currently, no games using unbound sprites have been released.
*[[Winter 2010 Dualstream Day of Zeux|'''THOSE ALIEN INVADER!''' and '''Duck Rescue''']]
 
===Before 2.90===
*'''[[Fritz Blitz]]''' uses half-char sized "pixels".
*'''[[Cheese's Adventure]]''' uses character editing to give the illusion of subchar movement.
*[[Winter 2010 Dualstream Day of Zeux|'''THOSE ALIEN INVADER!''' uses character editing; '''Duck Rescue''' uses half-char sized "pixels".]]
*'''[[xx̊y]]''' uses character editing to achieve this effect.


[[Category:Stub]]
[[Category:Stub]]

Latest revision as of 03:52, 24 October 2018

Pixel precision in Megazeux is a technique where elements of a game are drawn, move, or appear to move at a finer precision than individual chars. There are several ways to achieve this effect, but the easiest (and recommended) way is to use unbound sprites.

Details

After 2.90

The primary feature of unbound sprites (introduced in MegaZeux 2.90) is to be able to easily achieve pixel precision sprite movement. When the SPRn_UNBOUND counter is set to 1, the sprite's X and Y values will be interpreted as pixel values instead of char values. This also affects the X and Y values of the sprite's collision box. Unbound sprites have many other useful features such as pixel-based collision, the ability to use alternate character sets instead of the world's regular character set, and the option to make one of the colors they display fully transparent.

Before 2.90

A common method of giving objects the appearance of pixel-precise movement is to draw the entire game using half-char characters. The CHAR EDIT command or the CHAR_X/CHAR_Y/PIXEL or CHAR/CHAR_BYTE/BYTE counters can be used to make game elements appear to be moving at subchar precision, though this technique can be complicated in some cases.

MZX Forks

Logicow released a Megazeux fork which featured a draw command that allowed the drawing of pixel-precise objects on the screen. This particular command has not been introduced to the main Megazeux line and likely never will be.

Examples

After 2.90

Currently, no games using unbound sprites have been released.

Before 2.90