Need help for car customization

Godot Version

4.7.2

Question

I'm making a top-down 2d racing game, and I want to add car customization, such as changing the color. My current solution is to just make a bunch of sprites for each wrap, and let the player choose between them, but if anyone has a better or more versatile solution,please let me know.

You can use shaders to mix and match components depending on how you program them. Similarly you can set the sprite’s modulate property to different colors, this multiplies the sprite’s color dynamically thus changing the color but works best on near-white sprites.

+1 on @gertkeno’s point. Both modulate and custom shaders that map values from one to another (e.g. via LUTs) are good approaches for a versatile coloring system.

That said, if you aren’t planning on creating a huge array of color schemes for your car(s), you are better off just creating separate sprites as you’re currently doing. I did this for my first racing game in GameMaker many years ago, and there’s nothing wrong with doing it like that if your scope is small.


If you like, could you provide a better description of what your “car customization” system should be capable of doing (changing car components, stickers etc.)? Then we can focus on the individual parts of your description and come up with suggestions on how to implement them.

I’m not trying to make anything crazy. Since it’s top-down, the only changes would be the body color and maybe extra details, such as stripes or patterns if possible. I’m also going to make the spoiler separate from the actual body sprite so that it can be upgraded with other components, but still want it to match the body colorway.

Thanks. I’ll try to see if this works for me, but I’m still new to Godot, so I don’t know a lot of this.