Video Game Design and Coding

PLECK lesson 95 · suggested week 19, day 5

Organize visual assets for maintainability

Objective. Use stable paths and a scene-based visual wrapper.

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.

Shape language, SVG, visual hierarchy and restrained animation

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: Godot Standard 4.7.2 desktop editor (GDScript, Compatibility renderer), Local course folder and prior checkpoint, No paid assets or public account required.

Comes after VGC-L094.

Organized assets reduce broken references. Put original icons under art and reusable visual scenes under scenes/visuals. Rename or move imported resources through the Godot FileSystem dock when possible so references update. Keep one visual wrapper scene for a shared pickup appearance. If every instance points to it, a shape correction can be made once. Restore-test the project after reorganizing; a game that runs only because an old cache remembers a moved file is not a reliable artifact.

Worked example

An original safe-object icon could be a rounded triangle with a line marker. A dangerous-object icon could be a square with a cross, remaining distinct without hue. Scaffold C-DRAW — Draw an original geometric actor Setup: Create Node2D root Actor. Attach actor.gd. Save Actor.tscn. A draw command uses coordinates relative to Actor. Set its Position to (200,150) in the Inspector. Change the blue color or white marker to make original art. No imported artwork is needed. ```gdscript extends Node2D func _draw() -> void: draw_circle(Vector2.ZERO, 14.0, Color(0.15, 0.5, 0.9)) draw_line(Vector2(-8, 0), Vector2(8, 0), Color.WHITE, 3.0) ```

Draw an original geometric actor

GDScript (Godot 4, not Scratch, Python, JavaScript or C#). Scaffold C-DRAW. Copy starts from this text. The desk does not run it.

Scene and node setup

Create Node2D root Actor. Attach actor.gd. Save Actor.tscn. A draw command uses coordinates relative to Actor. Set its Position to (200,150) in the Inspector. Change the blue color or white marker to make original art. No imported artwork is needed.

extends Node2D
func _draw() -> void:
    draw_circle(Vector2.ZERO, 14.0, Color(0.15, 0.5, 0.9))
    draw_line(Vector2(-8, 0), Vector2(8, 0), Color.WHITE, 3.0)

Checks to run in the editor

  • Actor is visible centered at its position.
  • Move root: both circle and marker move together.

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.

Organize visual assets for maintainability — evidence task

  1. 1. Organize original visual assets and one shared visual scene.
  2. 2. Restore the project ZIP in a clean folder and run it.

Deliverable. Organized project artifact and path audit.

Acceptance checks

  • VGC-L095-T1. No missing texture or scene path appears.
  • VGC-L095-T2. Shared appearance changes propagate to all intended instances.

Understanding question. Why test a clean restored copy after moving assets?

Include a downloadable project ZIP with project.godot, .tscn, .gd and original asset files when code changes. A private, teacher-accessible download link to that ZIP is equivalent. Screenshots or a playthrough do not replace editable source.

If this is still shaky. Use only circles, rectangles and text. Keep physics colliders unchanged while replacing a visual child. Start with the first assigned task and re-run its acceptance test before adding the remaining feature.

Optional extra. Make a second visual theme without changing any gameplay script. Document one changed parameter, your prediction, and the observed effect; optional, not required for completion.

Turn in typed notes and a JPEG, PNG, or WebP screenshot. One https address is stored as text and is not opened, extracted, or run. An MP3, WAV, M4A, MP4, or WebM file up to 4 MB can show a demo. The demo does not replace editable source. Zip and code files are refused. If there is no private link, keep the project on the family computer and review the code in person.

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

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