Victor's Devblog

If you are interested to receive those weekly articles as a newsletter, poke me offline! Automated subscription is disabled because of bots...

Otherwise, Atom feed is here!

Display & Render Settings

This week I continued working on settings.

Display Settings

I spent most of the week working on display settings and making sure they would work appropriately in multi-monitor setups.

Overall, the idea is that any change is applied immediately to the game's window but only saved to `.ini` when menu is closed. Manually resizing the window (in Windowed mode obviously) also has to be saved in `.ini` immediately as the window is resized. Additionally, if the window was on a now disconnected monitor, its new monitor is correctly reflected in `.ini` so that the next relaunch picks up exactly where the player left. This also means I had to decide what monitor identifier to store in `.ini` to maximize chances of retrieving the monitor the player last played on; I went for a combination of a name, an id (unique until monitor is moved to a different port or GPU), and an index so I have multiple fallbacks available (you can see them in the video's `.ini` file).

Render Settings

This required moving a lot of code but was fairly straightforward: now, every time window size or render settings change, the various GPU resources that need resizing (e.g. most render targets) are re-created. The work from 2 weeks ago on better managing GPU resources through RAII paid off greatly (I just have to create new render targets, the old ones are automatically detected as unused and released).

Now everything changes live just like it would for a player. Later I will probably improve those render settings by exposing quality settings (e.g. Low | Medium | High) that are then mapped to more granular changes (e.g. instead of just changing the render size of reflections, I could change the maximum reflection distance).

What's Next

With both of those settings pages created and functional, I can now more easily share the game for playtesting!

Next week: I am hoping to work on 3D assets and art...