Video Game Design and Coding · PLECK lesson
PLECK lesson 172 · suggested week 35, day 2
Understand optional native export
Objective. Use matching free templates without making export a barrier.
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.
Source artifacts, local export, optional web and final checks
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-L171.
Godot can export a runnable build using export templates matching the editor version. A guardian may download the free templates through the editor’s export-template manager. Choose a desktop preset appropriate to the target machine and export into a separate build folder, not over the source. Do not disable operating-system protections to run an untrusted file. If templates or compatible hardware are unavailable, document that and use editor play; the full source artifact remains the required assessment path.
Worked example
A source archive contains editable scenes and scripts. A runnable export may contain a binary and pack, which is useful for play but not a substitute for editable evidence. Scaffold C-TESTS — A tiny pure-function test harness Setup: Attach to Node TestLab. If using command line, create a separate SceneTree harness rather than running this Node script with --script. Run current TestLab scene in editor; assert reports a failed condition in Debugger. No external test framework or package is needed. ```gdscript extends Node func bounded_score(old_score: int, change: int) -> int: return clampi(old_score + change, 0, 999) func _ready() -> void: assert(bounded_score(10, 2) == 12) assert(bounded_score(0, -3) == 0) assert(bounded_score(998, 9) == 999) print("3 score checks passed") ```
A tiny pure-function test harness
GDScript (Godot 4, not Scratch, Python, JavaScript or C#). Scaffold C-TESTS. Copy starts from this text. The desk does not run it.
Scene and node setup
Attach to Node TestLab. If using command line, create a separate SceneTree harness rather than running this Node script with --script. Run current TestLab scene in editor; assert reports a failed condition in Debugger. No external test framework or package is needed.
extends Node
func bounded_score(old_score: int, change: int) -> int:
return clampi(old_score + change, 0, 999)
func _ready() -> void:
assert(bounded_score(10, 2) == 12)
assert(bounded_score(0, -3) == 0)
assert(bounded_score(998, 9) == 999)
print("3 score checks passed")
Checks to run in the editor
- All three assertions pass.
- Intentionally change expected 12 to 13 and observe a failure, then restore.
Native Godot 4.7.2.stable.official.ed1daf0bf headless compile and representative node-tree/runtime tests passed; see native-qa-results.json. Visual UI, audible output, exports and website submission still need separate checks.
Understand optional native export — evidence task
- 1. Either create a local native export with matching templates or write an export plan based on the editor’s Export dialog.
- 2. Compare required source versus optional runnable-build contents.
Deliverable. Optional native build or export plan, plus source/build comparison.
Acceptance checks
- VGC-L172-T1. Source is preserved independently of export.
- VGC-L172-T2. Any unavailable template/platform limitation is stated honestly.
Understanding question. Why must export templates match the editor version?
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. The required deliverable is an editor-runnable source ZIP. Native or web export is optional if templates or hardware are unavailable. Start with the first assigned task and re-run its acceptance test before adding the remaining feature.
Optional extra. Compare an optional export with editor play and report one platform-specific limitation. Document one changed parameter, your prediction, and the observed effect; optional, not required for completion.
- Your first 2D game
Free public tutorial; no account; external asset download is optional, not used by this course.
· Opening this link does not submit the lesson. - Exporting for the Web
Free public documentation. Local editor play is the required alternative to web export.
· Opening this link does not submit the lesson.
Name ____________________ Date ____________________