Video Game Design and Coding

Week 35 packet

Student instructions, tasks, and checks. The answer key is not in this packet. Links stay as text. This page does not embed a clip or run a file.

# Week 35 — Packaging and release without public publishing

## VGC-L171 — Package source so another person can inspect it

**Objective:** Create a clean source archive and clear launch instructions.

**Time:** 55 minutes

### Instruction
The source artifact must include project.godot, all referenced .tscn and .gd files, original assets and required notices. Exclude regenerable .godot cache and unrelated personal files. Keep filenames stable and paths relative. Write a readme with engine version, renderer, main scene, controls, goal, richer system, comfort features, known issues and credits. Extract into a fresh local folder and run through the editor. A ZIP that contains only an executable is not an editable source submission.

### 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")
```

### Assignment
1. Create the clean source ZIP and complete readme.
2. Restore it and inspect every referenced resource.

### Acceptance checks
- Fresh editor import succeeds without missing files.
- Teacher can locate the main scene and key scripts.

**Submit:** Final source package and readme.

**Question:** Why exclude unrelated personal files and caches?

**Support:** 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 extension:** 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.

**Optional free reading:** [Your first 2D game](https://docs.godotengine.org/en/stable/getting_started/first_2d_game/index.html), [Exporting for the Web](https://docs.godotengine.org/en/stable/tutorials/export/exporting_for_web.html)

---

## VGC-L172 — Understand optional native export

**Objective:** Use matching free templates without making export a barrier.

**Time:** 55 minutes

### Instruction
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")
```

### Assignment
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.

### Acceptance checks
- Source is preserved independently of export.
- Any unavailable template/platform limitation is stated honestly.

**Submit:** Optional native build or export plan, plus source/build comparison.

**Question:** Why must export templates match the editor version?

**Support:** 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 extension:** 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.

**Optional free reading:** [Your first 2D game](https://docs.godotengine.org/en/stable/getting_started/first_2d_game/index.html), [Exporting for the Web](https://docs.godotengine.org/en/stable/tutorials/export/exporting_for_web.html)

---

## VGC-L173 — Test optional web export accurately

**Objective:** Explain WebGL2, user activation and storage constraints.

**Time:** 55 minutes

### Instruction
A Godot 4 web export uses GDScript here, the Compatibility renderer and a browser supporting WebAssembly and WebGL2. Prefer the default single-threaded export for this small course game. Install matching templates only with permission. Use the editor’s browser-run support or a proper local web server; opening index.html as a file is not a reliable test. Keep generated files together. No public hosting is required. If web export is unavailable, submit a written platform checklist and continue with local editor play.

### 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-AUDIO — Local audio playback with a reversible mute
Setup: Create Control AudioLab with Button Play and CheckButton Mute. Child AudioStreamPlayer Sound: copy the supplied student-support/audio/course-tap.wav into your project audio folder and assign it (or another short original WAV/OGG), autoplay Off, volume_db -12. Attach script to AudioLab. Recording is optional: a teacher-provided original file is equivalent. No microphone or face recording is required and all recording stays private.
```gdscript
extends Control
func _ready() -> void:
    $Play.pressed.connect(_play)
    $Mute.toggled.connect(_mute)
func _play() -> void:
    if not $Mute.button_pressed:
        $Sound.play()
func _mute(enabled: bool) -> void:
    if enabled:
        $Sound.stop()
```

### Assignment
1. Create an optional local web test or a platform checklist covering renderer, templates, serving, audio and saves.
2. Record what was actually tested versus planned.

### Acceptance checks
- No claim of successful browser execution lacks a real test.
- Browser save and audio limitations are documented.

**Submit:** Optional web bundle/test log or web-readiness checklist.

**Question:** Why not claim web support solely because editor play works?

**Support:** 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 extension:** 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.

**Optional free reading:** [Your first 2D game](https://docs.godotengine.org/en/stable/getting_started/first_2d_game/index.html), [Exporting for the Web](https://docs.godotengine.org/en/stable/tutorials/export/exporting_for_web.html)

---

## VGC-L174 — Audit licensing, privacy and submission safety

**Objective:** Check the final package before sharing it privately with a teacher.

**Time:** 55 minutes

### Instruction
Review every bundled asset and engine notice requirement, then remove unused files, private recordings and accidental personal metadata. Keep original project source and only necessary test evidence. The course never requires public publication. A submitted HTTPS reference should point to a private downloadable artifact the teacher is permitted to access; it is stored as text, not executed by the assignment page. If ZIP upload is unavailable, keep the local artifact and use the approved private hand-in process rather than exposing files publicly.

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

### Assignment
1. Complete final asset/privacy/package checklist.
2. Verify any submitted link resolves to the intended downloadable source with appropriate access.

### Acceptance checks
- No unrelated personal data or unauthorized asset remains.
- Link submission is a reference to evidence, not executable page code.

**Submit:** Final rights/privacy checklist and clean source artifact.

**Question:** Why should the site store a project link as text instead of executing its contents?

**Support:** 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 extension:** 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.

**Optional free reading:** [Your first 2D game](https://docs.godotengine.org/en/stable/getting_started/first_2d_game/index.html), [Exporting for the Web](https://docs.godotengine.org/en/stable/tutorials/export/exporting_for_web.html)

---

## VGC-L175 — Run the final release gate

**Objective:** Make a release decision supported by evidence.

**Time:** 55 minutes

### Instruction
A release gate is a final checklist, not an accreditation or automatic grade. Run all twelve required tests, key content checks, comfort tests, repaired-bug reproductions and source restoration on the named final candidate. Mark each pass, fail or not applicable with a reason. If a blocker remains, label the artifact a candidate and continue repair; do not call it finished. Minor known limitations can be disclosed. The parent/teacher decides how to evaluate the work using the separate rubric.

### 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")
```

### Assignment
1. Execute the final release checklist from a restored artifact.
2. Write a release or continue-repair decision with supporting evidence.

### Acceptance checks
- Decision matches test results.
- Final version and known limitations are consistent across readme and logs.

**Submit:** Final release-gate report and named artifact.

**Question:** Can a release checklist by itself confer school credit or accreditation?

**Support:** 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 extension:** 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.

**Optional free reading:** [Your first 2D game](https://docs.godotengine.org/en/stable/getting_started/first_2d_game/index.html), [Exporting for the Web](https://docs.godotengine.org/en/stable/tutorials/export/exporting_for_web.html)

---