Color filter API

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
FalcoGer
Long Handed Inserter
Long Handed Inserter
Posts: 78
Joined: Fri Sep 05, 2014 3:11 pm
Contact:

Color filter API

Post by FalcoGer »

Coloring based on who occupies a vehicle has been in the game since multiplayer came along, perhaps even before then. It uses a color filter on specific parts of a sprite, which in turn allows less memory and hard drive storage space to store different sprites which are basically the same except for their color, as well as allowing a wide array of colors, specifically 256³ = 2^24 without having to have that many sprites.
Furthermore there have been mods for colored flooring, colored trains, colored train tracks, colored cargo wagons and such. Especially with the train related ones having a huge impact on the memory used as trains have different sprites for all the different angles and they are relatively large.

It wouldn't be to far fetched to allow mod makers to just put a color filter over their sprite or replacing a specific color (such as pure purple or pure green as it is commonly used for such applications) in such sprites with a defined color either by script or by user input (into those scripts).
This would require that an additional variable is saved for any entity that can have such a filter applied to it, containing that color. For instance, a user could set the color to red, lay down red concrete floor, then change it to blue and lay down the very same concrete with the same properties except for it's color, instead of having a different type for each of a limited number of different colors.

It would be nice to have such features in vanilla for things like railways, trains and flooring with an UI to change those things on the fly for any containers/vehicles.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Color filter API

Post by ssilk »

Just a note: They added colors for the lamps in 0.13. See FFF about new combinators.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

FalcoGer
Long Handed Inserter
Long Handed Inserter
Posts: 78
Joined: Fri Sep 05, 2014 3:11 pm
Contact:

Re: Color filter API

Post by FalcoGer »

That's not what I meant. I mean stuff like built in support for color-coding belts, chests, locomotives/wagons, flooring, and many more. Either with a brush like tool, or by defining what color you wish the item to be before placing it, or by some kind of UI interface with the item itself.

Post Reply

Return to “Ideas and Suggestions”