No Game Engine Game Dev: Word Sleuth 046: Starting playback of replays

3 months ago
1

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

Game Engines are for sissies!

Today I started playing back the replays. Step 1 was to disable user inputs. This turned out to be quite simple because of the way the code was structured. We added a Stopwatch to Replay and an event callback mechanism and some basic controls. It wasn't too long before things were starting to happen on their own.

Of course there were a few bumps in the road. For example, at first I was starting at the beginning of the playback buffer, not the beginning of the Events section. For another, there wasn't a mechanism for selecting a word from an RNG seed value. But the biggest challenge was waiting while the level transitioned after guessing a word correctly. I tried a couple of different ways to get the info I needed, but the Stopwatch in the level was not fit for that purpose. In the end I highjacked the Stopwatch in Replay that is used for playback. While recording, it is available, so a simple pair of Freeze, and Thaw commands during recording was able to measure a duration, then I inserted a Wait instruction into the replay. During playback, the Wait command just did what was written on the tin, and it was glorious.

Loading comments...