Today you bring it all together: a proper menu screen, game-over screen, a state machine that controls the whole game, and a cloud high score that saves between sessions.
Before touching Scratch, take a piece of paper and draw three boxes:
gameState, score, lives.When you know exactly which screens exist and what connects them, the code almost writes itself. Programmers call this a state diagram โ it is a real technique used in the games industry.
"menu" in the gameState block is just a label โ any word works, but you must use the exact same word everywhere you check it. Stick to lowercase throughout.After clicking the flag, the stage shows your Menu backdrop. Pressing SPACE switches to the Game backdrop and the game begins.
Note: Cloud variables require a signed-in Scratch account. This step is demonstrated by the teacher โ you can watch and understand how it works.
Use this checklist to make sure your final game is complete:
In six weeks you went from your first Scratch block to building a complete game with menus, collision detection, variables, clones, and persisting state. That is real programming โ well done!