No Game Engine Game Dev: Word Sleuth 040: Finishing Tooltips then starting replay saves

1 month ago
2

Streamed on 2024-08-29 (https://www.twitch.tv/thediscouragerofhesitancy)

Game Engines are for sissies!

From yesterday we had a good start on Tooltips. Today I ran through the list of things I wanted to finish to make them more polished. Overall this was a pretty straightforward list of small tasks and didn't take very long.

Tangentially, I made some updates to EggTimer to handle callbacks when it "dings" and also loop if we want. With the new callbacks and looping I went through the uses of EggTimer and if appropriate, made it use the callback. Mostly this was the banner timer in GameScene and the blinking cursor timer in TextEdit. Not a huge effort, but the code is a bit cleaner.

With that out of the way, I had time to do a bit of design around Replays and start preparing the way for saving Replays and getting ready to watch Replays. There are some values we were getting from GameContext which will have to come from the Replay when we watch one. There are also the user actions that have to be recorded all going through a common point in code, and in a way that we can record and playback. This is being done now by going through an "addEvent" method that takes an OpCode and variable argument list. There is a switch on the OpCode, then the vargs are processed as needed and the appropriate methods dispatched. This is a solid base for what we need.

Loading comments...