Video Game Design and Coding · PLECK lesson

PLECK lesson 111 · suggested week 23, day 1

Separate project files from saved progress

Objective. Explain res://, user:// and why saves use plain data.

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.

JSON, user://, schema validation and safe failure

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-L110.

res:// names project resources, which are not a portable writable save location after export. user:// is Godot’s per-user data area. Save plain values such as an integer best score or a fixed checkpoint ID, not a live node reference. JSON can represent dictionaries, arrays, strings, numbers, Booleans and null; Vector2 must be decomposed or represented another way. This course uses approved checkpoint IDs instead of loading arbitrary scene paths from a save file.

Worked example

A validated save contains known scalar fields and a version. An array instead of a dictionary is syntactically valid JSON but should still be rejected by the schema.

Separate project files from saved progress — evidence task

  1. 1. Create a save schema table for version, seed, water and checkpoint.
  2. 2. Mark types, allowed ranges and default values.

Deliverable. Save schema and res/user path explanation.

Acceptance checks

Understanding question. Why not save a Node object directly as JSON?

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 the course-specific save filenames in C-SAVE and C-STATE-SAVE. Never edit unrelated game saves or load scripts from save data. Start with the first assigned task and re-run its acceptance test before adding the remaining feature.

Optional extra. Add a new fixed scalar field with a safe default and explicit validation. Document one changed parameter, your prediction, and the observed effect; optional, not required for completion.

Name ____________________ Date ____________________