doc 1 of 10

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 Crop node 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
01The 3D project; a player who walks on a lit field under a following camerathe 3D delta · CharacterBody3D · environment & light · camera decision
02A generic, nestable state machine built from scratch, driving Idle/WalkState/StateMachine · registration · travel · the finished signal
03Facing that reads as a turn, run, and gravity that keeps you on the fieldatan2 facing · per-axis acceleration · get_gravity()
04A cell grid; planting lands on the cell you face, and the truth is in a dictionaryworld_to_cell/cell_to_world · the floori origin trap · data before visuals
05Crops as .tres files with mesh stages; a third crop with zero codeCropData/Plot/Crop · the definition/state split in 3D
06Day-ticks that grow crops through their meshes, on a debug-gated keyinteger-division growth · the debug registry · release-gating
07Nothing new — the requirements for what comes next, no codeharvest · 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.