A sprite is the name given to images that gusanos can display ( Being for objects, explosions, HUD elements, etc ). Gusanos supports BMP and PNG image formats.

Image Structure

The first horizontal and vertical lines of the Sprite image are used to separate the image into sub sprites and to choose the pivot ( If the pivot is not set the image will be drawn centered ). The pivot marker is a pixel of colour values RGB = 255, 0, 0. The sub Sprite separator is a pixel of colour values RGB = 0, 0, 0.

Gusanos sprites use the colour of values RGB = 255, 0, 255 as a mask colour. The pixels marked with this colour will not be drawn making those parts invisible.

Alpha channel is also supported for a special blender mode “alphach”.

Sub sprites are used to separate images for both frames of an animation and angle ranges resulting in a matrix of sub sprites. Each column is a different frame of the animation, and each row is a different range of angles. Note that objects with no directions ( Like explosions ) will always be drawn using the first angle row.

Example of a pure animation (No directional frames) image:

Example of a pure directional image:

The angle ranges will be calculated automatically from the amount of rows the image has, the more rows the thinner the range will be.

The image displays for which angle ranges each frame will be shown.

main/modding_docs/sprites.txt · Last modified: 2011/09/18 16:46 (external edit)
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki