Sprite Palette

From TTWiki
Revision as of 17:43, 13 June 2011 by Orudge (talk | contribs) (11 revisions)
Jump to navigationJump to search

Introduction

Locomotion graphics are palette-based. This means that when encoding your PNG files, the actual colours are ignored, only the index in the 256 colour palette matters, so you must ensure that the PNG uses the right palette, and that you're using the right colours of that palette.

Making PNGs with the right palette

(to be written by someone who knows how this works)

Palette entries

Locomotion Palette using/explaining itself.

This is a list of palette entries and what they look like in the game:

IndexMeaningDescription
0regular transparencyused for transparent pixels that are part of the object
1-6(DirectX reserved)These colours are used by some Locomotion sprites, mainly for icons and in game pictures, but should not be used on objects, if they are the results will not be what you expect(In screenshots they come out black because of the pallete change). These are the same colors as index 1-6 on the Windows 256 color pallete, but only INSIDE the game (DirectX).
7-9, 246-254Primary company colour shadesThese colours will be replaced by the selected primary company colour
202-213Secondary company colour shadesThese colours will be replaced by the selected secondary company colour
47Glass mask colorThis color is used when making a glass appearance, but only seem to work on stations so far.
255chunked transparencyused for pixels that are not part of the object; only valid if the sprite tag has the "chunked" bit set; this should be your main background colour