Learning Objectives

By the end of this lab, you will be able to: - Build a heads-up display (HUD) using Control nodes. - Bind on-screen UI elements to live game state. - Create start, restart, and “you win / game over” menus. - Load and transition between multiple levels or scenes.

Overview

This lab wraps your game in the screens and information players expect. You’ll build a HUD that displays state from Lab 5 (score, lives, timer), then create menu scenes for starting, restarting, and ending the game. Finally, you’ll implement level/scene transitions so the game can move between discrete screens or levels. Godot’s UI uses a separate family of Control nodes with their own layout and anchoring rules, which this lab introduces.

Steps

  1. Build a HUD with Control nodes (Label, container nodes) and anchor it to the screen.
  2. Update HUD elements live from your GameState values.
  3. Create a main menu scene with a start button and a game-over scene with a restart button.
  4. Wire buttons to scene changes using change_scene_to_file() or change_scene_to_packed().
  5. Split your game into at least two levels and transition between them.

Key Concepts

  • Control nodes, containers, anchors, and layout.
  • Binding UI to game state.
  • Button signals (pressed).
  • Scene/level loading and transitions.

Deliverable / Completion Check

A game with a live HUD, a start menu, a restart/game-over screen, and at least two levels the player can move between. Submit the running project or a recording showing the full menu-to-level flow.