Video Game Design and Coding · PLECK lesson
PLECK lesson 11 · suggested week 3, day 1
Draw a visible actor in a coordinate system
Objective. Place an original shape using local and scene coordinates.
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.
A visible actor, reusable scenes and measured movement
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-L010.
In Godot 2D, positive x goes right and positive y goes down. A Node2D’s position is relative to its parent; draw commands use coordinates relative to the node. C-DRAW places a circle at its own local origin. Moving the root moves the entire drawing. Save Actor.tscn so this scene can be reused. A drawing is only visual: it does not automatically create a physics collision shape. Keep the parent unscaled while learning so pixel distances are predictable.
Worked example
A circle drawn at Vector2.ZERO belongs to its Node2D origin. If its parent is at (100,80) and its local position is (20,10), its world origin is (120,90) when neither parent is rotated or scaled. 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.
Draw a visible actor in a coordinate system — evidence task
- 1. Build C-DRAW at (200,150), then place it at (400,100).
- 2. Sketch the axes and label local origin versus scene position.
Deliverable. Actor scene/script and annotated coordinate sketch.
Acceptance checks
- VGC-L011-T1. The marker and circle move together.
- VGC-L011-T2. Changing the root position does not require changing draw_circle coordinates.
Understanding question. Does draw_circle create a solid physics obstacle?
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 a 640 by 360 viewport, one unscaled Node2D and the C-DRAW recipe before adding movement. Start with the first assigned task and re-run its acceptance test before adding the remaining feature.
Optional extra. Add a second independently colored actor without changing the first actor’s script. Document one changed parameter, your prediction, and the observed effect; optional, not required for completion.
- Godot 4.7.2 stable archive and platform downloads
Free public page; download required once for offline desktop use; no account required.
· Opening this link does not submit the lesson. - Godot step by step: nodes, scenes, GDScript, input, signals
Free public documentation, no account. Same class help is available within the desktop editor.
· Opening this link does not submit the lesson.
Name ____________________ Date ____________________