Collect and remove one token
See this course’s project requirements
A playable original Godot game with movement, token collection, score, pause, restart and a tested source-project handoff.
Keep your working files in your own notebook or software. Save a private description, checklist, and work link in My Proof.
What to include
- Complete importable Godot 4 source project.
- Movement and boundary calculations.
- Single-award collection and 4/4 completion tests.
- Pause/resume and restart from three states.
- Two intentional design choices with a playtest log.
Review and revise
Use these criteria to check your work and choose what to improve.
- Project opens with all required files.
- Collection, score and finish agree.
- Controls and restart behave consistently.
- Design changes and evidence are clearly explained.
Want more background?
The idea in everyday life
Build and refine Token Trail, an original four-token game with code-drawn shapes.
A collection rule changes both the visible objects and the stored state.
Collect and remove one token — guided practice
Use a distance rule and remove collected objects without counting them again.
Install the free Godot 4 editor suitable for your computer. Extract project.godot, main.tscn and main.gd into one new folder, keeping the names unchanged. In Godot Project Manager choose Import, select project.godot, then Import & Edit. Open main.tscn; use Run Project (F6 runs the current scene, while F5 runs the configured project). The game is a 640×480 top-down collection activity with no external assets. Arrow keys move; Space pauses; R restarts. Finish each changed case, then restore the supplied baseline before the next lesson.
1. Read the condition
Find player.distance_to(tokens[i]) < 22.0. Identify the player and token centers.
You should see: A distance strictly below 22 pixels triggers collection.
The visible square size and the collection distance are separate design choices.
2. Collect one square
Restart, approach one square and stop after it disappears.
You should see: Score becomes 1/4 and three squares remain.
Both score and remaining objects should reflect the same event.
3. Test repeat prevention
Move away and return to that empty position.
You should see: The score stays 1 until another remaining square is collected.
Removing the entry prevents repeatedly awarding the same token.
4. Inspect removal order
Read the loop from tokens.size()-1 down to 0. Explain why it walks backward when removing entries.
You should see: An unvisited lower index does not shift when a higher entry is removed.
Changing a list while walking forward can skip an entry after indices shift.
What to finish
A one-token test and explanation of distance, removal and score.
Watch for this
Incrementing score while leaving the token in the list allows the same token to score every update.
How can I tell I understand it?
Complete the changed case, explain your result, and pass the three application checks.
Quick knowledge check
Answer all 3 questions. Get at least 2 right and the lesson completes automatically.
You’ll get an explanation for each answer. Signed in? Your results save to your account.
Pass the check. We’ll save the progress.
Answer all 3 questions above and get at least 2 right. You can review the explanations and try again.
Go to the knowledge checkOptional course overview video · same video as Lesson 1
How to make a Video Game - Godot Beginner Tutorial
From Brackeys. Watch here or open it on YouTube .
Optional course overview. Follow the written steps below at your own pace.Tools, templates, and lesson sources
Tools and templates
Tools open in a new tab so you can keep your place here.
Sources and further reading
Explore the references behind this lesson.
Source & access notes · checked 2026-09-12
Opened and inspected on 2026-09-12: A playable 2D project, game state and restart workflow.
Access: Free public web page; no paid enrollment required.
Reuse: Public reference; link only. LifeStarter prose, exercises and files are independently authored.
Source & access notes · checked 2026-09-12
Opened and inspected on 2026-09-12: get_vector input directions and action mapping.
Access: Free public web page; no paid enrollment required.
Reuse: Public reference; link only. LifeStarter prose, exercises and files are independently authored.
Report a problem with this lesson
Tell us what went wrong. Please leave out personal information and private project contents.