PLECK lesson 94 · suggested week 19, day 4
Animate feedback without changing physics
Objective. Use a Tween on a visual child and offer reduced motion.
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-L093.
A Tween smoothly changes a property over time. C-TWEEN gently pulses a pickup’s Visual Node2D scale. Put the script on the visual child, not the physics body, so the collision boundary stays constant. Repeated scale animation is not necessary for understanding the game; a reduced-motion choice should leave a steady symbol and text cue. Avoid rapid flashing or shaking. Test that the visual effect does not restart every frame by accidentally creating a new Tween inside _process.
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-TWEEN — Animate only a visual child Setup: Create Node2D root Visual under a stationary physics actor, attach this script to Visual and keep its parent collider unchanged. Draw a small circle. A Tween interpolates properties over seconds; this is a visual pulse, not a flashing effect. Use modest scale changes and disable it in a reduced-motion setting. ```gdscript extends Node2D var pulse: Tween func _draw() -> void: draw_circle(Vector2.ZERO, 10.0, Color.GOLD) func _ready() -> void: pulse = create_tween().set_loops() pulse.tween_property(self, "scale", Vector2(1.08, 1.08), 0.6) pulse.tween_property(self, "scale", Vector2.ONE, 0.6) func stop_motion() -> void: if pulse != null: pulse.kill() scale = Vector2.ONE ```
Animate only a visual child
GDScript (Godot 4, not Scratch, Python, JavaScript or C#). Scaffold C-TWEEN. Copy starts from this text. The desk does not run it.
Scene and node setup
Create Node2D root Visual under a stationary physics actor, attach this script to Visual and keep its parent collider unchanged. Draw a small circle. A Tween interpolates properties over seconds; this is a visual pulse, not a flashing effect. Use modest scale changes and disable it in a reduced-motion setting.
extends Node2D
var pulse: Tween
func _draw() -> void:
draw_circle(Vector2.ZERO, 10.0, Color.GOLD)
func _ready() -> void:
pulse = create_tween().set_loops()
pulse.tween_property(self, "scale", Vector2(1.08, 1.08), 0.6)
pulse.tween_property(self, "scale", Vector2.ONE, 0.6)
func stop_motion() -> void:
if pulse != null:
pulse.kill()
scale = Vector2.ONE
Checks to run in the editor
- Visual gently grows and returns.
- Parent collider does not change size.
- stop_motion leaves a stable scale of one.
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.
Animate feedback without changing physics — evidence task
- 1. Add the gentle pulse to one visual child.
- 2. Implement a reduced-motion option that calls stop_motion or skips creating the Tween.
Deliverable. Animated/reduced-motion checkpoint and two-state test.
Acceptance checks
- VGC-L094-T1. Collision size stays constant.
- VGC-L094-T2. Reduced motion removes the pulse while preserving the object’s meaning.
Understanding question. Why not scale the entire physics actor for a decorative pulse?
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.
