๐Ÿซ

Camel Quest

A family expedition through OCaml 5.5, from the first expression to a multicore game engine โ€” building games the whole way. Lessons check themselves right here in the browser; the big guns (dune projects, parallel domains) come with copy-paste localhost instructions. Every adventurer gets their own account, XP and saved code.

0
XP earned
โ€”
current rank
0/0
exercises conquered

How this works

The four phases

Phase 1 ยท 6 lessons

Bootstrapping & the Web Side Quest

Shapes on screen fast: the toplevel, functions, your machine's forge, the canvas, HTML/CSS for HUDs, and first motion.

  1. 1.1 Meet the Toplevel
  2. 1.2 Functions, Types & Choices
  3. 1.3 Forge Setup localhost
  4. 1.4 Painting with Pixels
  5. 1.5 Side Quest: HTML & CSS Maks
  6. 1.6 Motion & Input
Phase 2 ยท 5 lessons

Functional Game Loops & Immutability

Records, variants, lists and the pure tick: whole game worlds as immutable values โ€” no global mutable state, ever.

  1. 2.1 Records: The Shape of Game State
  2. 2.2 Variants & Pattern Matching
  3. 2.3 Lists & Recursion
  4. 2.4 The Tick: Pure Game Loops
  5. 2.5 Project: Snake project
Phase 3 ยท 4 lessons

Structuring Complexity: Modules as Values

Signatures, functors, and first-class modules โ€” pass whole engines as arguments and hot-swap renderers and rulesets.

  1. 3.1 Modules: Rooms for Your Code
  2. 3.2 Functors: Module Factories
  3. 3.3 First-Class Modules
  4. 3.4 Project: The Great Refactor project
Phase 4 ยท 4 lessons

OCaml 5.5 Power-Ups

The frontier: effect handlers for game scripting, true shared-memory parallelism with domains, and the capstone: a deterministic interstellar simulator.

  1. 4.1 Effects: Superpowered Control Flow
  2. 4.2 Coroutines: Directing the Action
  3. 4.3 Domains: True Parallelism localhost
  4. 4.4 Capstone: The Interstellar Simulator project

For the coach