Portable Game Console
PoGa-4DGL Reference Manual
7. PoGa Sprite Editor
'Sprite' was a term that sprung up in the mid 1970's for a method of rendering a number of lines on a video
screen with an image (scan line rendering).
PoGa is equipped with a
sprite generator
that is capable of rendering blocks of up to 16 pixels wide and 16
pixels high (sprite tiles) in up to 4 simultaneous colours. The
sprite generator
is also capable of
'transparency' where one of the 4 colours can be nominated as a transparent colour, ie. The nominated
colour will not be written to the screen leaving the underlying pixel that was already present on the screen
undisturbed. This allows sprites to overlay each other without completely writing over the top of an
underlying image. Sprites can also be rotated and mirrored with ease.
A sprite can also have multiple palettes associated with it, allowing for what is known as 'colour cycling' to
achieve interesting visual effects by cycling (shifting) the color palette.
Also, the txt_Width() and txt_Height() shared functions may be used to magnify the sprite.
Although sprite bitmaps can be generated by manually entering data into the program, a tool is provided
(PoGa Sprite Editor) that allows you to easily 'draw' sprites and create the required data statements in a file
that may be included in your main program file as a resource. This file can then be loaded up into the Sprite
Editor at any time to make simple modifications or additions.
There are 3 parts to a sprite set which are automatically named by the Sprite Editor,
“sprites”
(the bitmaps ) Each sprite bitmap consists of a matrix of bit pairs, each pair of bits selects one of 4
colours from a palette.
“colors”
(the colour lookup table or CLUT used by the palettes) A list of all the colours required by the sprite
palettes.
“palette”
(the palettes used to hold the 4 colour sets for the sprites) Each palette holds 4 colours (selected
from the CLUT) to be used by a sprite. Any palette can be used with any sprite.
Example of a typical sprite bitmap.
© 2011 4D Systems
www.4dsystems.com.au
Page 52 of 87
Each pixel is
represented by 2
bits in the sprite
bitmap
If BLACK is nominated as
the 'transparent' colour, the
BLACK pixels will not be
displayed