Moderator: Graphics Moderators
OpenTTD has 2 colour palettes built in, which were designed to have a variety of colours, for all applications: DOS and WIN. There are 256 colours, hence 8bpp (8 binary bits can make 256 numbers). It has animated colours for fire, flashing lights and company colours built in.
There is another option for GRF developers, which is 32bpp: this allows use of all colours, as well as allowing for use of alpha transparency. However, animated or company colours have to be coded especially. Most GRFs use the game's DOS palette, but there are lots that use 32bpp. This can be independent of zoom level.
OpenTTD supports 7 zoom levels: 3 outward zoom levels (8x, 4x, 2x), one normal and 2 inward zoom levels (2x, 4x). This is literally the size of the sprites: on normal zoom the length of an 8 length rail vehicle is 32 pixels, going up to 64 on 2x zoom and 128 on 4x zoom. Unless you're pikkabird . OpenGFX and most GRFs are made in normal zoom, and I'm almost certain there's no GRFs with outward zoom levels however there are quite a few GRFs with inward zoom levels. This can be independent of colour depth.
Top left: normal zoom, using 8bpp DOS palette
Top right: normal zoom, using 32bpp
Bottom left: 4x zoom, using 8bpp DOS palette
Bottom right: 4x zoom, using 32bpp
If I worked on these properly, these could all be coded into the game and work as listed above.
Basic message: 32bpp ≠ extra zoom
Edit: thanks Pyro, I forgot to mention that
Well, I briefly looked at this in my previous post, but this is how it applies in GRF development.
Disclaimer: this is how it works for NML, m4NFO and NFO may well be different
8bpp normal zoom sprites are the only sprites that are defined as sprites. 32bpp sprites and extra zoom sprites are defined as alternative sprites. The game with default settings will always prioritise sprites with the correct zoom for the viewpoint and 32bpp over 8bpp, unless the blitter is changed.
The practicalities of using extra zoom sprites are:
Much bigger file sizes (this usually doesn't matter)
Different alignments. There's a good guide to working this out https://newgrf-specs.tt-wiki.net/wiki/N ... zoom_level
The practicalities of using 32bpp sprites are:
The file does not need to be palettised
The "transparent" blue is not used: acutal alpha is
Each company colour has it's own sprite or mask, so is coded differently to 8bpp cc
https://newgrf-specs.tt-wiki.net/wiki/P ... oordinates
There's a DOS and a Windows palette. While I never counted, most GRFs probably use the DOS palette, which seems perhaps counter-intuitive.
Personally, I prefer to use 8bpp: it's easier for styles to fit with each other, since they are using the same shades and I don't have to think up colours and get it wrong. Additionally company colours is much easier. Also having to mess about with alpha, for me, can just become tiresome. I still use 32bpp occasionally for when I need transparency, or better colour definition, but that's quite rare.
I just don't like this. I don't know why really. To me it contrasts harshly with the original style of the game. Also since it's hardly easy to draw that many pixels (at 4x zoom, anyway) people tend to render these with 3D models. I feel that a lot of the time, this leaves the sprites lacking character, and having large swathes of the same colour. This is however improving, so we'll see. I very much doubt I'll ever use extra zoom.
and water, and some brown shades used, I think, by one of the default industries .Gwyd wrote:It has animated colours for fire, flashing lights and company colours built in.