No Game Engine Game Dev: Word Sleuth 042: Loading a replay file

4 months ago
5

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

Game Engines are for sissies!

With Replay files being saved out, it is now time to load them in. There is more game status to keep track of, especially in the MainMenu and the Game itself. Replay now has three modes (Off, Record, Playback) and will fail if a method is called in the wrong mode. MainMenu checks to see if there is a "latest replay" file. If there is, it shows a replay button and clicking that button will start the game with that replay file.

Replay is set with the correct mode on Game start. If in Playback mode, it loads the replay file and completely logs out what is in it so we can see what is in the file without looking at hex. Also, there are various validations performed on the Replay to make spoofing results more difficult. It isn't cryptographically secure, but it should require some non-trivial effort.

Loading comments...