GameDev Garden

Home

❯

Starter Template

❯

bttf

❯

States

States

One file per screen. The StateMachine just forwards enter / update / draw to whichever state is active — pattern explained in Game States.

  • BaseState.lua — empty interface every state inherits
  • TitleScreenState.lua — press enter to start
  • PlayState.lua — gameplay
  • WinState.lua — press enter to replay

Full tree: BTTF project page. Template: Starter Template.

  • Sep 13, 2026

    BaseState.lua

    • Sep 13, 2026

      PlayState.lua

      • Sep 13, 2026

        TitleScreenState.lua

        • Sep 13, 2026

          WinState.lua


          Graph View

          Finding Focus Productions © 2026

          • Source
          • Discord
          • Tashio
          • Blog