--------- Sections ---------

<Index> - >DevDiary< - <Characters> - <Lore>

ichi rss

--- DevDiary ---

<Back>

- 2023/05/27 -

This week, I worked on the options menu.


Even though SD2020 did not have an options menu, I think it is a vital component of a PC game. Unlike the typical menu buttons, the buttons in the options menu have a lot more going on, and so I had to extend the code for some additional types of buttons: namely, the slider and the selector, for the volume setting and the resolution setting respectively.




The volume slider is something I have not really done before in my GML time - every game I have made in GML has a fixed volume for its sounds. SDR, however, now lets the player set the audio volume themselves, ranging from standard volume (0.0 dB) to mute (-100.0 dB in the code, but it's effectively -inf).


For audiophiles who may be reading this, the possible volumes in SDR right now are [ -100.0, -62.4, -41.6, -29.4, -20.8, -14.1, -8.6, -4.0 and 0.0 ]


The cryptically named Dot Scale is a selector that offers three options for resizing the game's window. Every option multiplies the dimensions of every pixel by its designated value. Following a good practice, the selected option is only applied after the player's confirmation, to not subject them to a rapidly resizing window of the game on every new choice.


The values are saved while the game is running. I plan to introduce an initialization file that will keep the saved values and reapply them with every launch of SDR, but for now the selected settings are reset between sessions.


Another necessary setting is the ability to rebind keys. Sunrise Doll uses seven keys: the two sword keys, the four directional keys and the escape key. Ideally, each and every of these should be rebindable, and I will add this option once I figure out how to handle arbitrary key presses in Godot.


With the addition of the volume slider, in order to troubleshoot it, I also implemented actual audio into the game. This is another large chunk of SD2020 content that must be carried over to SDR, and I hope I can mirror the sound queue system that I used in GML in Godot.