No Game Engine Game Dev: Word Sleuth 051: Last tech debt, sound playback speed and practice mode

1 month ago
6

Streamed on 2024-09-18 (https://www.twitch.tv/thediscouragerofhesitancy)

Game Engines are for sissies!

The last item of tech debt that I tackled today was in the form of inconsistency. When I made compound components (Button, SpinBox, TextEdit) I was inconsistent in the way I implemented them. Some exposed the underlying components (mostly the Text sub-component) for direct manipulation. Others kept the component itself private and implemented delegate methods. I went through and just exposed the child components. If I was working with a larger team, I would consider the private/delegates approach. But I'm a solo developer on this and I trust myself not to screw it up, so this approach is easier.

That was the last of the technical debt for now, so we moved on to some improvements. The first was sound playback with respect to scaled time. The playbacks can be played at different speed. But the sounds were playing in real time, not scaled time. So we updated that. Speeding the sound up was pretty easy, but there was a bookkeeping issue that impeded the slowing down. Once I found that bookkeeping issue it worked pretty slick. It will work with any integer time scale factor or it's reciprocal (e.g. 1, 2, 3, 4, 1/2, 1/3, 1/4, etc.). Anything more would involve adding more complexity than I want to deal with.

There was still time to work, so I implemented a Practice game mode. In this mode you only guess one word, there are no replays and no highscores. Also, you can set the number of guesses. It runs the timer in case you are practicing for a Sprint run. Then to fill some time at the end I added more text to the AboutScene. All-in-all a very productive day.

Loading comments...