The Life Starter
0 of 6 complete0%
Course Library · Lesson 2 of 6
Create · Guided lesson

Move with time and bounds

About 36 minutes · 6 reading + 30 practice and checks
Time includes reading, practice, and questions. Extra videos or further study are optional.
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.
Open the full course project
Want more background?
Before you begin

The idea in everyday life

Build and refine Token Trail, an original four-token game with code-drawn shapes.

The idea

Movement per update equals direction times speed times elapsed seconds.

Follow along

Move with time and bounds — guided practice

Explain input direction, elapsed time and a bounded position.

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. 1. Trace the movement

    Find Input.get_vector and player += direction * SPEED * delta. Hold Right in the running game.

    You should see: The circle moves right; SPEED is 180 pixels per second.

    Multiplying by elapsed time avoids making speed depend directly on update count.

  2. 2. Work one update

    For direction (1,0), speed 180 and delta 0.5, calculate the displacement before bounds.

    You should see: Horizontal displacement is 90 pixels.

    A simple numeric case checks the meaning of speed and time.

  3. 3. Test the boundaries

    Hold Right until the circle stops, then hold Down. Read both clampf statements.

    You should see: The center stops at x620 and y460 inside the play area.

    Clamping keeps the position in the stated allowed interval.

  4. 4. Change one parameter

    Stop, change SPEED from 180.0 to 120.0, save and rerun. Compare travel time between the same two points, then restore 180.0.

    You should see: The circle moves more slowly; a half-second rightward displacement would be 60 pixels.

    One parameter change is easier to attribute than several simultaneous edits.

Now change one thing

At speed 120 pixels per second, how many pixels does a rightward move cover in 0.5 seconds before clamping?

Your work

What to finish

A movement calculation and recorded speed/boundary test.

Common mistake

Watch for this

Adding SPEED each frame without delta makes the result depend on how many frames occur.

How can I tell I understand it?

Complete the changed case, explain your result, and pass the three application checks.

Try 3 questions

Quick knowledge check

Answer all 3 questions. Get at least 2 right and the lesson completes automatically.

Not yet passed

You’ll get an explanation for each answer. Signed in? Your results save to your account.

1A character moves 100 pixels per second for 0.2 seconds. Unbounded displacement?
2The allowed x interval is 20–620. A move proposes x650. What does clamping produce?
3Why multiply movement by delta?
0 of 3 answeredApply the lesson to a short question, then review the explanation.
2
Finish this lesson

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 check
Optional course overview video · same video as Lesson 1
BrackeysHow to make a Video Game - Godot Beginner TutorialYouTube
Optional course overview

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.

Godot: Your first 2D game
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.

Godot: Input class
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.

No sign-in needed.