Documentation

Making Flappy Bird in Glaze!

Let's make a real-world 2D video game on Glaze! which you can run on PC platforms.

Making Flappy Bird in Glaze!

Complexity: 20s (1 graph) (?) Skill Level: ★★★★☆ (Advanced)
Difficulty: ★★★☆☆ (Intermediate)
Rewards: ★★★★☆ (High)
Read Time: 15 min
Status: WIP
Revision: 001
Last Update: 2025-06-11

Realtime graphics debugging is difficult, especially since Glaze is a low-level graphics framework.

THIS TUTORIAL IS A WORK-IN-PROGRESS AND IS NOT FINISHED YET.

Requirements:

  1. Divooka Community edition, or Divooka Compute with Glaze! workload
  2. A PC/laptop with either Windows, Linux or Mac
  3. 30min-1.5hr of time, depending on your skill level

Techniques you will learn:

  1. Load resources from file
  2. Perform 2D collision between shapes
  3. Advanced state management
  4. Create GUI from scratch

Language features involved:

  • Procedural contenxt
  • State management
  • Functions (using Custom Event)
  • Glaze! interactive media framework

Helpful Prior Knowledge

  • Knowledge on Procedural Context in Divooka
  • Knowledge on Debugging Procedural Programs in Divooka

Overview

Fig. Screenshot of Final Result
Fig. Screenshot of Final Result

In general, the main technical challenge of this task is 2D collision detection. The rest (state handling etc.) is typical in any procedural applications. After this access, you will have solid understanding of how 2D video games work.

Below is the setup snapshot in Divooka.

Setup in Divooka

Game knowledge involved:

  1. Entity spawn & management
  2. Collision detection
  3. Coordinate systems
  4. Rigid body kinematics
  5. HUD and rendering order
  6. Keyboard events

Preparation

Assest Download

Folder Structure

(Screenshot/Tree of game folder)

Program Setup

The Simplest Functional Game

A single frog The moving backgrounds

Structure The Program Parts

Piece together Adding GUI

Tidy Things Up

Add Sound Effects (SFX)

Debugging & Testing

End Words

In this tutorial we've seen how you can make Flappy Bird in Divooka with Glaze! The main challenge from software engineering perspective is with collision handling and source code & assets management.

With techniques covered in this tutorial, you are now able to develop simple 2D video games with HUDs and solid objects - however, you are not yet able to handle objects that are "deformable", e.g. Angry Birds.

Further Development

For simplicity, we used custom events to vreak down procedural logoc, a better way is to define functions as subgraphs.

Some improvements you can make to the game:

  1. Add sound effect when the bird flapts/hits/dies.
  2. Handle procedural generation of the tubes by automatically delete ones of out sight and generate new ones on the fly
  3. Better handle background image

References

  • Video walkthrough: YouTube
  • Glaze! framework documentation: Wiki
  • Glaze! audio API: Wiki
  • Graphics and audio assets download: here
  • Finished Divooka program download: here