Skip to content
Journey to Code

Series

Rustbound

Learn Rust / Build something real

Small function.
Bigger game.

A game is a collection of small systems working together. Build them in Rust, from your first damage function to a dependable game core.

  • Rust
  • Game systems
  • 9 published lessons
THE RUSTBOUND CORE
Every small rule turns something bigger.
main.rs / The first moving part
fn click_damage(base: u32, bonus: u32) -> u32 {
    base.saturating_add(bonus)
}

The mission log

Build on what you learned. Each lesson adds another working piece to the game.

  1. Skip Hello World.Learn Rust by building real game logic instead of stopping at Hello World. Write and test three small functions for damage, health, and enemy defeat. · 7 min read
  2. One Attack Is Not a Fight.Learn Rust by turning small functions into a combat loop. Build an attack() function, use mut and while, and create your first real game mechanic. · 7 min read
  3. Three Numbers Are Not a Player.When your attack takes three loose u32 values, Rust has no idea which belong to the player. Learn how structs give your game data a name and a shape. · 6 min read
  4. Borrowing Without the Lecture.Learn Rust ownership and borrowing by fixing three real compiler errors. Let a player attack an enemy with &Player and &mut Enemy, without a lecture. · 9 min read
  5. One Fight Is Not a Game.Learn Rust impl blocks and methods by giving your idle game one Game struct, tougher enemies by stage, and a game.click() that runs a full turn. · 8 min read
  6. Winning Is Not Progress.Learn Rust by making winning pay. Add gold, XP, and levels to an idle game, level up with a while loop, and calculate damage with a &self method. · 12 min read
  7. False Is Not an Answer.Our player has ninety-six gold and nothing to buy. Build a shop in Rust, then replace a vague true or false with an enum and let match handle every outcome. · 11 min read
  8. Idle Is Not a Timer.Make your Rust idle game progress while you are away. Add tick(seconds), a for loop, and tests that run an hour of game time instantly. · 12 min read
  9. We Accidentally Built a Game Engine.Split a Rust game into modules and a library crate, step by step, with tests passing after every move. Learn mod, pub, and pub use. · 15 min read