You are browsing as a guest. Sign up (or log in) to start making projects!

3h 27m 20s logged

DevLog №3 :
What I worked on: Started implementing the Pause state during gameplay. To make this work properly, the game needs to preserve the current state of both the Snake and Food objects when transitioning into pause and back. Slightly refactored the main loop architecture and updated the SnakeGameHandle function.

The Struggle: decided to write a helper function to update values inside my StateMachine (handling states like Game, Menu, Pause, Snake, FlappyBird).Blaming it on late-night fatigue, I wrote the function in the most overcomplicated way possible… and called it even worse.

The result? Every time I exited the Snake game, I was greeted by a blank black screen because the Menu state was never getting assigned correctly.
I spent over an hour staring at the code, completely stumped as to why it was breaking.

I think it happened because of self-assignment

The Fix: Decided to get some sleep. Woke up the next morning with a fresh head and fixed the black screen issue in 20 minutes.

Next Goal: Finish up the Pause feature completely

0
131

Comments 0

No comments yet. Be the first!