Devlog #035: Options options options
I'm booking nice progress with the options menu.
I have made a reusable dropdown component that supports scrolling though buttons and the mouse wheel.
At first I wanted the text to smoothly scroll in and out of view by partially rendering the text when it's partly outside view, but unfortunately SFML does not really have a good option for that.
I could convert the text to a texture and then partially render it through a sprite, but this just seems like too much effort for a very small detail. I chose to scroll text completely in or completely out, avoiding this situation all together.
My first scroll attempt was pretty hilarious.
But a few adjustments later, scrolling was working like a charm.
Technically the dropdown component reuses my TextInput component used in the save menu (to enter the save file name) and als reuses the SelectionTable component I made for the tile editor.
The TextInput is used for the top part of the dropdown that will show the surrently selected value. The SelectionTable is used for the scrollable options part that also highlights the currently selected option.
The SelectionTable already had the selection colouring implemented. I simply expanded the class to support scroll buttons as well, and voila, a working dropdown!
Thinking about the settings I should add, the amount of work seemed to continuously increase.
I want to implement settings for resolution, language, controls, fullscreen/windowed mode, brightness, and of course music and sound. The language setting is easily implemented because I already finished the base localization code.
The other settings need some more investigation. SFML seems to be able to handle the difficult parts regarding the resolution and fullscreen/windowed settings, which is nice.
The controls however are currently hard coded, so I will have to create some mapping in between for those settings. The brightness setting will introduce me to the world of shaders. I will make a shader that brightens or darkens the whole screen based on this setting. It will be my first shader ever, which is exiting, but also daunting.
I've honestly never worked with shaders, let alone wrote them. They always sounded like this hugely complex magical thing that only wizards could conjure.
All in all, coding these settings is a big task. But I'll probably gloat in pride when it's done!
Get Rocket Shipment
Rocket Shipment
A tricky physics based rocketship delivery game with an integrated level editor
Status | In development |
Author | ChocolatePinecone |
Genre | Puzzle |
Tags | 2D, Flight, Level Editor, Minimalist, Physics, Pixel Art, Puzzle-Platformer, Retro, Singleplayer, Space |
Languages | German, English, Spanish; Castilian, Spanish; Latin America, French, Italian, Japanese, Korean, Dutch, Polish, Russian, Turkish, Chinese (Simplified), Chinese (Traditional) |
Accessibility | Configurable controls, Interactive tutorial |
More posts
- CHANGELOG v0.12.1Sep 07, 2023
- CHANGELOG v0.11.1Oct 10, 2022
- CHANGELOG v0.11.0Apr 06, 2022
- CHANGELOG v0.10.0Jan 12, 2022
- CHANGELOG v0.9.1Nov 22, 2021
- CHANGELOG v0.9.0Aug 26, 2021
- Update v0.8.0: Introducing powerupsJun 22, 2021
- Update v0.7.0: Lowering difficultyMar 23, 2021
- Update v0.6.0: Improving player experienceFeb 26, 2021
- Update v0.5.0 featuring new conveyor tilesFeb 05, 2021
Leave a comment
Log in with itch.io to leave a comment.