Game development

Organize scenes without tangled state

A title screen, a playfield and a result screen each need a clear entry and exit. A scene should release its input listeners and timers when it no longer owns the screen.

Write down the state transferred between scenes. Prefer a small result object to a shared collection of mutable values that any screen can change.

Continue the study

Work through a small code example, make one deliberate change and record the effect. The reading links below connect this exercise with animation, input and retro game design.