Build Your First Game
This beginner guide walks from zero to a playable Flappy-style loop.
No prior GoudEngine knowledge is assumed. Use one of these tracks:
- C# track:
examples/csharp/flappy_goud/ - Python track:
examples/python/flappy_bird.py
What you will build
By the end of this guide, your game can:
- Open a window and run a frame loop.
- Draw a player sprite.
- Handle jump input.
- Move one obstacle lane.
- Detect collision and reset.
Step 0: Run the reference project first
Run the final reference before writing code.
./dev.sh --game flappy_goud
./dev.sh --sdk python --game flappy_bird
If this fails, fix setup first using:
Step 1: Create a minimal frame loop
Goal: open a window and render empty frames.
Verification:
- Window opens.
- Escape closes (desktop).
- Frame timing (
dt) updates each frame.
Reference files:
- C#:
examples/csharp/flappy_goud/Program.cs - Python:
examples/python/flappy_bird.py
Step 2: Add a player sprite and gravity
Track per-frame state:
x,y- vertical velocity
vy - gravity constant
- jump impulse
Update loop:
vy += gravity * dty += vy * dt
Verification:
- Player falls without input.
- Jump input applies one upward impulse.
- Player stays in visible bounds (clamp or reset).
Step 3: Add input
Map one-shot jump input:
- C#: key press from input API
- Python: same behavior through Python wrapper
Verification:
- Pressing jump changes
vyonce per intent. - Holding jump does not spam if your design expects one-shot input.
Step 4: Add one pipe lane
Represent one lane with:
- lane
x gap_ygap_height
Per frame:
- move lane left
- when off-screen, reset to the right and randomize
gap_y
Verification:
- Pipe lane scrolls smoothly.
- Reset logic reuses the lane without crashes.
Step 5: Add collision + restart
Check AABB overlap between:
- player and top pipe
- player and bottom pipe
- player and floor/ceiling
On collision:
- reset player state
- reset pipe state
- reset score
Verification:
- Collision triggers a full reset.
- New run starts in a clean state.
C# beginner variant
Use this order:
- Getting Started — C#
- Build the five steps above.
- Compare to
examples/csharp/flappy_goud/only when stuck.
Run command:
./dev.sh --game flappy_goud
Python beginner variant
Use this order:
- Getting Started — Python
- Build the five steps above.
- Compare to
examples/python/flappy_bird.pyonly when stuck.
Run command:
./dev.sh --sdk python --game flappy_bird
Downloadable final project handoff
The hosted docs now ship generated bundles for the final reference projects:
- Download C# Flappy Goud
- Download Python Flappy Bird
- Download TypeScript Flappy Bird
- Download Rust Flappy Bird
Canonical source locations in this repository:
examples/csharp/flappy_goud/examples/python/flappy_bird.pyexamples/typescript/flappy_bird/examples/rust/flappy_bird/
To refresh the downloadable bundles locally:
PATH="$HOME/.cargo/bin:$HOME/.dotnet/tools:$PATH" bash scripts/clean-room-regenerate.sh --docs
Next step
After this tutorial, run the dedicated Sandbox Guide and the generated Example Showcase to cover more of the SDK surface. Keep Feature Lab as the supplemental smoke path.