Make Simutrans speak your language.

Player colors and transparency

Started by nrg, September 21, 2020, 07:54:57 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


While trying to figure out why the player colors didn't seem to be working on a bus stop I made, I put together a quick png test image (attached).  This has each shade of the primary player color on the left and the secondary on the right, decreasing in opacity as you go away from the center.  As you can see the transparent colors are sometimes way off.  This happens with every combination of colors.


Thank you for your report.

The code for player colour transparency (and graphics generally) is unaltered from Standard and is not a part of the code that I know anything about. However, if I understand correctly, I believe that this is a general issue with transparency, not just in Simutrans, but in a large proportion of computer graphics using colour blending of various kinds: see here for details.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.


This was picked up when transparency was introduced. The difficulty is that having gamma correction would be potentially much slower, and with only 15 bit images gains in accuracy wouldn't necessarily be huge. Hence simple averages had been (largely) felt to be good enough.