Alien Farming Game — Learning Plan
The goal: a 3D farm on a grid where a character walks, faces where they go, and plants data-driven crops that grow through mesh stages on day-ticks — the first 3D project in the almanac, built from scratch, every line typed and understood. The art is placeholder meshes deliberately; the systems are real.
This is the 3D twin of the farming game. If you've built that one, skip nothing but reread fast — the coordinate system, the physics, and the camera are all different animals, and every "wait, that worked in 2D" in this plan is a lesson in the delta. If you haven't, the data-driven pattern and the state machine transfer directly and the 3D parts are new territory, which is what this curriculum is for.
Like the rest of the almanac: early stages give you complete, explained code; later stages hand you less — a skeleton, then requirements — because writing it is where the learning happens. Every stage ends with checks you verify in the engine yourself.
When you're done, all of this is true#
- The player walks a 3D field with acceleration, run, and gravity, and turns to face their movement — no snapping, no sliding feet
- Movement runs on a node-based state machine you built, that can nest
- The farm is a grid of cells; planting lands on the cell you're facing, not the cell you're in
- A crop is a
.tres— adding a third one takes zero code - Days advance by a debug key, crops grow through mesh stages, and the day math is integer division you can explain on paper
- Delete every
Cropnode in the scene and nothing is lost — you can prove it - Zero untyped declarations — the warning panel is clean
- You can explain every script file without opening it
What you'll learn#
New here (the 3D delta): the XZ plane and Y-up · CharacterBody3D and move_and_slide
in three dimensions · gravity via get_gravity() · facing as a vector and rotation as
atan2 · a camera that follows from a distance · CSG vs Mesh ground · placeholder meshes
as a legitimate art pipeline.
Transferred from 2D, re-earned in 3D: the node-based state machine (built from scratch, not the enum version you know) · the definition/state split · keeping truth out of visuals · debug actions that are dead in release.
Coming later as add-on modules: harvest and inventory · a real day cycle · saving · shapeshift and synthesize (two states the machine already reserves). The plan stays small on purpose — a working farm you fully understand in three dimensions beats a big one you don't.
The 3D modeling shelf is where the placeholder meshes eventually become models; this curriculum is where they become systems.
House motto: aim for improvement every day. One stage is one sitting; if a stage regularly spills into tomorrow, it's sized wrong — shrink the bite, not the ambition.
Stages#
| # | What you build (observable) | What you learn |
|---|---|---|
| 01 | The 3D project; a player who walks on a lit field under a following camera | the 3D delta · CharacterBody3D · environment & light · camera decision |
| 02 | A generic, nestable state machine built from scratch, driving Idle/Walk | State/StateMachine · registration · travel · the finished signal |
| 03 | Facing that reads as a turn, run, and gravity that keeps you on the field | atan2 facing · per-axis acceleration · get_gravity() |
| 04 | A cell grid; planting lands on the cell you face, and the truth is in a dictionary | world_to_cell/cell_to_world · the floori origin trap · data before visuals |
| 05 | Crops as .tres files with mesh stages; a third crop with zero code | CropData/Plot/Crop · the definition/state split in 3D |
| 06 | Day-ticks that grow crops through their meshes, on a debug-gated key | integer-division growth · the debug registry · release-gating |
| 07 | Nothing new — the requirements for what comes next, no code | harvest · inventory · a real day cycle · saving · the reserved states |
A few stages ask you to make a real design decision between two sound options — record what you chose and why in the architecture document; future-you will thank you. When you're done with the build stages, the code reference is the map of what exists where — written the way you'd hand it to a colleague.