Colour Depth & Zoom Level: Know the Facts
Posted: 11 May 2018 16:36
So in the last couple of weeks especially I've seen a lot of people not know the difference between extra zoom and 32bpp. This has frustrated me, so through the next couple of posts I shall explain.
Colour Depth
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.
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
Colour Depth
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.
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