June 2021
Beginner
344 pages
8h 9m
English
Games typically run in modes. Modes specify what the game should do on the current tick, for example, displaying the main menu or the game over screen. In computer science, this is often formalized as a state machine. It’s a good idea to start by defining your game’s basic mode structure, which acts as an outline for the rest of the program.
Flappy Dragon requires three modes:
Transitions between these modes are relatively straightforward:

Game modes are best represented as an enum. Enumerations allow you to limit ...
Read now
Unlock full access