Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Mon Dec 10, 2018 6:53 pm

All times are UTC




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Fri May 11, 2018 4:36 pm 
Offline
Chief Executive
Chief Executive
User avatar

Joined: Mon Apr 17, 2017 4:52 pm
Posts: 644
Location: Western Ile-de-France Region
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 :wink:. 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.

Image

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


Last edited by Gwyd on Fri May 11, 2018 4:55 pm, edited 1 time in total.

Top
   
PostPosted: Fri May 11, 2018 4:46 pm 
Offline
Chief Executive
Chief Executive
User avatar

Joined: Mon Apr 17, 2017 4:52 pm
Posts: 644
Location: Western Ile-de-France Region
What does this mean for GRF devs? Whats the benefit of each?
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/NML:Alternative_sprites#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


Top
   
PostPosted: Fri May 11, 2018 4:48 pm 
Online
Tycoon
Tycoon
User avatar

Joined: Fri Oct 17, 2008 12:17 pm
Posts: 2408
Location: Virgo Supercluster
Well, don't know how crucial this really is, but if we're talking about it -
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.


Top
   
PostPosted: Fri May 11, 2018 4:53 pm 
Offline
Chief Executive
Chief Executive
User avatar

Joined: Mon Apr 17, 2017 4:52 pm
Posts: 644
Location: Western Ile-de-France Region
The final post: my opinion. You can ignore this one.
Colour depth
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.
Extra Zoom
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.


Top
   
PostPosted: Sun Jun 17, 2018 8:52 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Nov 27, 2004 3:05 pm
Posts: 5380
Location: Canada
Gwyd wrote:
It has animated colours for fire, flashing lights and company colours built in.
and water, and some brown shades used, I think, by one of the default industries . :D

_________________
wallyweb on tt-forums: Screenshots - Projects - Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2018 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2018.
Hosted by Zernebok Hosting.