Video Game Design and Coding

PLECK lesson 106 · suggested week 22, day 1

Model a tiny resource adventure

Objective. Define items, costs and an achievable objective.

Godot Engine Standard desktop editor 4.7.2-stable, GDScript (Godot 4), Compatibility renderer. Headless Godot 4.7.2.stable.official.ed1daf0bf passed 106 assertions on the supplied scaffolds, including malformed JSON saves. Audio used the Dummy driver and a synthetic WAV, not a speaker. The visual editor, browser export, and signed-in submission were not tested. The desk still does not run a student's own upload.

About 55 minutes. The due date is chosen by a parent.

Seed Station items, dictionaries, costs and data-driven UI

Suggested pace: Recall and predict 5 min; Read instruction and scaffold 12 min; Build or design the assigned artifact 25 min; Run acceptance tests 8 min; Explain and checkpoint 5 min.

Materials: Paper and pencil or a private text document, Local course folder and prior checkpoint, No paid assets or public account required.

Comes after VGC-L105.

Seed Station is a one-room resource puzzle. The player collects three seeds and two water units, spends one seed and one water to plant a bed, and wins after two beds are planted. Provide enough resources for the minimum solution and a way to restart. Store item types as stable IDs, not decorative labels. Sketch the data flow before building the room: collection changes inventory, planting validates both costs, success changes bed state, and the HUD displays counts.

Worked example

With two tickets and one token, a purchase costing one of each succeeds once. A second request must preserve the remaining ticket if no token is available.

Model a tiny resource adventure — evidence task

  1. 1. Draw the room and resource/cost table.
  2. 2. Trace a complete two-bed solution and one insufficient-resource attempt.

Deliverable. Seed Station design and resource trace.

Acceptance checks

  • VGC-L106-T1. The planned resource supply can satisfy both beds.
  • VGC-L106-T2. Failed planting changes no inventory or bed state.

Understanding question. Why must both costs be validated before subtracting either?

Submit readable text or photos/scans of each numbered design page. Audio explanation may supplement a diagram or text, not replace requested artifacts.

If this is still shaky. Use C-INVENTORY in a blank lab and test add/spend before connecting any button or pickup. Start with the first assigned task and re-run its acceptance test before adding the remaining feature.

Optional extra. Add one new allowed item ID and its tests without changing the transaction algorithm. Document one changed parameter, your prediction, and the observed effect; optional, not required for completion.

Turn in a typed answer, a JPEG, PNG, or WebP photo, a PDF scan, or an MP3, WAV, M4A, MP4, or WebM file up to 4 MB. A parent can log paper. One https address is stored as text and is not opened or run. Zip and code files are refused.

This is a preview. A parent assigns the lesson and chooses the due date after the student is enrolled. The answer key is not on this page.

Print this lesson