doc 1 of 9

Farming Game — Learning Plan

The goal: a top-down 2D pixel farm (32×32 art) where you till soil, plant crops that grow over days, and harvest into an inventory — built from scratch, every line typed and understood.

This isn't a copy-along tutorial. Early stages give you complete, explained code; later stages hand you less and less finished work on purpose — a skeleton to fill in, then just requirements — because writing it yourself is where the learning happens. Every stage ends with checks you can verify in the engine on your own.

When you're done, all of this is true#

  • The player walks in 8 directions and can't leave the field or walk through obstacles
  • At least one soil cell can be tilled, planted, and visibly grows over day-ticks
  • A matured crop can be harvested; the inventory count changes and is observable
  • The player runs on a state machine you can draw from memory
  • Zero untyped declarations — the warning panel is clean
  • You can explain every script file without opening it

What you'll learn#

New here: 2D movement and collision (CharacterBody2D, layers and masks) · tilemaps and cameras (TileMapLayer, Camera2D) · state machines · the definition/state data split. Practiced along the way: typed GDScript everywhere, custom Resources, signals, scene composition, git as a working habit.

Coming later as add-on modules: an inventory UI, a real day/night system, audio, and saving. The plan stays small on purpose — a working farm you fully understand beats a big one you don't.

Throughout, the typed GDScript rules apply to every line — stage 01 turns on the compiler warnings that enforce them.

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 project itself; a player walking 8-way at fixed speedproject setup · CharacterBody2D · typed GDScript · git
02Field borders and rocks that block you; a camera that follows with limitscollision shapes & layers · Camera2D
03A tile-painted field; pressing act tills the grass cell in front of youTileMapLayer & TileSet · keeping game state out of visuals
04Crops defined as data files, planted and growing over day-tickscustom Resources · definitions vs runtime state
05Player states — idle, walking, using a tool — with real timingenum state machines
06Harvesting credits an inventory anything can observeResource signals · data-first inventory design
07Nothing new — prove the whole slice is yoursrebuild-from-memory · self-review

A few stages ask you to make a real design decision between two sound options — those choices are flagged where they appear, with the trade-offs laid out. Record what you chose and why in the architecture document; future-you will thank you.