Posted January 12, 2022 by Cross Couloir
#renpy #python #coding #adventure #color-theory #indie-dev #isometric #pixel-art #pixelart #mystery
Remember when MacOS had a desktop background that changed from day to night? That was pretty cool.
Employee A has a MacOS inspired UI. The reason I did this is to reflect the world in which the game takes place: real, actual Santa Clara, CA in April of 2018. OSX perfectly encapsulates the aesthetic of the South Bay tech world: sleek, minimalist, functional, and just a little bit generic. But functional minimalism can easily cross over into bland and uninspiring, and that's what the solid blue desktop background, based on OSX 10.4, of older Employee A builds was doing. So I wanted to spice things up.
For inspiration, I took a look at default wallpapers throughout the history of OSX. Every default wallpaper is hosted on this awesome site, in utterly massive resolution, so if you want to relive some Mac nostalgia check it out. Basically, the wallpapers are divided into four eras:
After thinking on all of these for some time, I came up with a plan: a monochrome gradient whose colour changes based on the in-game time of day. In-game time progresses when you complete certain events, and it's tracked by a global state, so it's easy to keep track of.
It's not strictly necessary for that main window cutout to be there, but due to how I split the old background it just kind of ended up that way. This extremely basic undithered gradient will be the base for our desktop background.
To colour this background, I defined a mapping from the current time to a background colour on my global state object. It looks like this:
@property def timecolor(self): tc = { 9: TintMatrix("#99abcc"), 10: TintMatrix("#9dc5d4"), 11: TintMatrix("#c3e5e8"), 12: TintMatrix("#c2f0e3"), 13: TintMatrix("#bfe3cf"), 14: TintMatrix("#c8e6ac"), 15: TintMatrix("#ede777"), 16: TintMatrix("#dbb867"), 17: TintMatrix("#de9259"), 18: TintMatrix("#e66f4e"), } return tc[self._time]
When showing the background, I show it with a transform that contains `matrixcolor gds.timecolor`. This creates a lovely coloured effect that changes over the course of the day, which you can see in the GIF below.
I think this simple hack really elevated the look of the game. I hope you all enjoyed this quick dev discussion!