Sprite

From ENIGMA
Revision as of 01:40, 9 September 2017 by RobertBColton (talk | contribs)
Jump to navigation Jump to search
The LateralGM Sprite Editor

A sprite is a two-dimensional image and animation resource. It is one of two visual resources offered in Game Maker, the other being backgrounds. Sprites can be used to represent objects, or drawn separately from them.

Specification

ENIGMA stores sprites as RGBA bitmaps. They can be stored in the executable itself or loaded externally on runtime. LateralGM can load any Java-recognized image format, such as bmp, jp[e]g, png, tif[f], and gif, as well as any additional SPI-registered format such as wbmp and ico. In the end, the format of the loaded file does not matter, as the storage mechanism is the same. This may change as the project shifts to allow external storage.

Uses

Sprites are typically used to represent instances of objects. Sprites can be assigned to a specific object via object properties in LateralGM. When a sprite has been assigned to an object then every instance of that object will draw that sprite at the instances position according to the current values of the sprite-related global locals.

If the object has a draw event, then the assigned sprite will not be drawn. Instead, the sprite drawing functions can be used in the draw event to draw the necessary sprite.