CLEARLINE CODE / FREE PROJECTSCoding pathways
FREE, PRACTICAL, NO SIGN-UP

Turn gaming time into a first programming project.

Choose the engine you can access, copy the starter code, predict what happens, then test it. These are independent educational activities—not official Roblox, Minecraft or Godot courses.

01 · ROBLOX STUDIO · LUAU

Build a color-changing touch pad

Goal: Walk onto a platform and watch its color change. Learn how an event triggers a conditional action.

  1. Open Roblox Studio on a Windows or Mac computer. Create a Baseplate experience.
  2. In Workspace, add a Part named ColorPad, set Anchored to true and CanTouch to true.
  3. Add a server Script inside that Part, and paste the code below.
  4. Press Play and walk onto the pad. Open View → Output if there is an error.
local pad = script.Parent
local coolingDown = false

pad.Touched:Connect(function(hit)
    local character = hit:FindFirstAncestorOfClass("Model")
    local humanoid = character and character:FindFirstChildOfClass("Humanoid")
    if not humanoid or coolingDown then return end
    coolingDown = true
    pad.BrickColor = BrickColor.Random()
    task.wait(1)
    coolingDown = false
end)

Challenge: Change task.wait(1) to task.wait(0.2). Predict whether touching repeatedly will change colors faster, then test.

Why does the debounce matter?

Touch events can fire repeatedly when several character body parts contact the pad. The coolingDown boolean prevents the handler from changing color more than once during its cooldown interval.

References: Roblox event scripting. This activity requires Roblox Studio, which is separate from this website.

02 · MINECRAFT EDUCATION · MAKECODE JAVASCRIPT

Build with a chat command

Software requirement: Minecraft Education with Code Builder is required. Consumer Minecraft Java and Bedrock editions do not provide the same MakeCode environment. A separate license or eligible account may be needed.

Goal: Type a word in Minecraft Education chat and have code place a block in front of you.

  1. Open Minecraft Education and an editable world where Code Builder is available.
  2. Open Code Builder and create a MakeCode project. Switch to JavaScript mode.
  3. Paste the script below; return to your world.
  4. Type stone in chat and test whether a block appears near your position.
player.onChat("stone", function () {
    blocks.place(STONE, pos(0, 0, 1))
})

Challenge: Change the position offset from pos(0, 0, 1) to pos(0, 0, 2). Explain what the last number changes in the placement location.

How does this teach coding?

The chat command is an event. The callback contains instructions. The position is a parameter. Changing the parameter changes the result you expect to see, and playtesting checks the hypothesis.

References: MakeCode chat commands and block placement.

03 · GODOT 4 · GDSCRIPT

Move a character around a 2D world

Goal: Connect arrow-key input to movement velocity and collision-aware physics.

  1. Install Godot 4.x desktop editor and start a new 2D project.
  2. Create a CharacterBody2D named Player and add a visual Sprite2D and CollisionShape2D with a suitable shape.
  3. Attach the following script to Player. Godot's default Input Map includes the ui_* direction actions.
  4. Run your scene. Use arrow keys, then adjust speed to see how movement changes.
extends CharacterBody2D

@export var speed := 220.0

func _physics_process(_delta):
    var direction = Input.get_vector(
        "ui_left", "ui_right", "ui_up", "ui_down"
    )
    velocity = direction * speed
    move_and_slide()

Challenge: Add a StaticBody2D wall and CollisionShape2D, run into it and observe what happens. If the character passes through, check the wall and character collision layers, masks and shapes.

What does move_and_slide do?

It applies movement in Godot's physics system and handles many collision responses automatically for a CharacterBody2D. The script calculates a desired velocity from player input, then asks the engine to move the body.

Reference: Godot 2D movement tutorial.

READY TO KEEP BUILDING?

Take the next step with a written course

These free projects are complete on their own. If you'd like a longer sequence of self-paced exercises, choose the editor you already use. Each purchase is one-time, with no live sessions or software included.

Roblox Creator

6 lessons · Luau, obstacles, checkpoints and an obby project.

$19 one-time

Buy Roblox →

Minecraft Coding

6 lessons · MakeCode JavaScript. Minecraft Education access required.

$29 one-time

Buy Minecraft →

Indie Game Developer

8 lessons · Godot 4 GDScript and a small original game.

$39 one-time

Buy Godot →

Or get all three for $59. Read the purchase and access information before buying. Engine testing and educator review are still ongoing.

Know a parent or coding educator?

Share these three free projects with someone who wants to try programming through games. There is no signup, and the activities can be used without purchasing a course.

For educators: feel free to try the projects and send technical corrections or curriculum feedback to Clearline Code. This is not a request for endorsement.

Prefer learning by playing first?

Our free browser arcade illustrates collisions, collectibles, checkpoints and finish conditions. It isn't a game engine and doesn't replace the projects above.

Play the free coding arcade

When you are ready for a longer self-paced pathway, compare the three written course options. The paid course materials remain separate from these free tutorials. No live lessons are included.