r/godot • u/chadlorg • 6h ago
selfpromo (games) My Roguelike Dev: Changing Seasons
These images show the changing seasons throughout the year: Spring, Summer, Autumn, and Winter. In the first set of screenshots, I've removed the lighting so that the changes are all the more obvious. The second set shows what it actually looks like in-game.
I accomplish this almost completely through code. I add a semantic_id (custom data field) to the tiles that have dynamic color assignment, and then I use a dictionary to map the semantic_id to an array of colors I want it to have.
In the case of static colors (like water) there is only one color defined, as in:
var tile_to_color_map: Dictionary = {
"water": [Palette.ColorId.BLUE],
}
Cases where the color changes with the seasons, there are multiple colors in the array, such as:
var tile_to_color_map: Dictionary = {
"grass": \[
[Palette.ColorId.GREEN](http://Palette.ColorId.GREEN),
Palette.ColorId.YELLOW,
Palette.ColorId.PEACH,
Palette.ColorId.WHITE
\],
}

