โญ My First Video Game , Series 1 , Episode 2 of 9
๐ŸŽ๏ธ Ep 1 ยท Zoom Zoom - ๐Ÿฆ˜ Ep 2 , Jump Jump - ๐Ÿ’ฅ Ep 3 , Bang Bang - ๐Ÿงš Ep 4 , Fairy Survivors - barrels Ep 5 , Barrel Blast - ๐ŸŽฎ Ep 6 , Pixel Quest
๐ŸŽฎ Godot Workshop , Parent & Child
๐ŸŽ“ My First Video Game

Jump Jump! ๐ŸƒBuild Your Own Mario-Style Platformer

Run, jump, and stomp your way to your very first platform game! You'll make a character who leaps over gaps, bounces on enemies, and collects coins just like Mario!

๐Ÿ‘ถ Age 5+ with a grown-up โฑ๏ธ About 1-2 hours ๐Ÿ”ง Godot 4 (free!) ๐Ÿ“ 12 fun steps
๐Ÿƒ
โ–ถ๏ธ Starter Template
โญ
Starter Template Available, open it alongside this workshop! Pre-built Godot 4 project with all scenes and scripts ready to go. Download, open in Godot 4, then follow each step to build on top.
โฌ‡ Download Free
โญ
0 XP
Level 1
โญ0
๐Ÿ“Š Workshop Progress 0 / 12 steps
1
โญ
โ–ถ Current
Welcome, Game Developer!
A big hello before we start building!
Active
โญ
Goal for this step

Open Godot and get ready to build your first platformer.

๐Ÿ‘ถ For the child

We're going to make a REAL platform game like Mario! That means a little character who can run and JUMP over things. By the end, you'll have your very own game that you made yourself. That's amazing! Let's open Godot and get started! ๐Ÿš€

๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ง For the grown-up

This is Episode 2 of the My First Video Game series, no prior Godot experience is needed. Key concepts over the 12 steps: CharacterBody2D for a physics-based player, move_and_slide() with gravity, StaticBody2D platforms for level design, Camera2D to follow the player, Area2D for collectibles, and a simple group-based enemy stomp. Godot 4 must be installed (free at godotengine.org).

๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโญ
Grown-up note: Purple boxes like this one are just for you! The child can do most of the typing themselves, your job is to read the steps together and help when they get stuck. Celebrate every little win! ๐ŸŽ‰
๐Ÿ“
Fill in the Blanks
+15 XP
We are using a free game engine called to build a game, the kind where a character runs and jumps, just like Mario.
โ“
Knowledge Check
+15 XP
What kind of game are we building in this workshop?
AA racing game where you steer a car
BA Mario-style platformer where you run and jump
CA quiz game with multiple-choice questions
2
โญ
๐Ÿ”’ Locked
Make a New Project
Every game starts with a blank canvas!
Locked
โญ
Goal for this step

Create a new Godot 4 project called "My Platformer" and get it open.

๐Ÿ‘ถ For the child

Godot is like a magic toybox for making games, and it's completely FREE! First, we need to make a new project. Think of it like getting a fresh new notebook just for our game.

๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ง For the grown-up

Standard Godot 4 project setup. Choose the Compatibility renderer, it's the most stable for 2D beginners and works on all hardware. Point the project folder somewhere easy like the Desktop.

What to do:

  1. 1Open Godot 4. Click the big "New Project" button.
  2. 2In the Project Name box, type: My Platformer
  3. 3Click "Browse" and choose a folder, your Desktop is perfect!
  4. 4Make sure Renderer says Compatibility.
  5. 5Click the green "Create & Edit" button. Your new game opens up!
๐Ÿ•น๏ธ
Try it! Can you find the FileSystem dock at the bottom of Godot? That's where all your game files will live, like a folder on your computer, but just for your game!
๐Ÿ”ข
Put It In Order
+15 XP
Click these steps in the correct order to make a new Godot project:
Click "Create & Edit" to open the new game
Click the "New Project" button in Godot
Type a project name and choose a folder
โ“
Knowledge Check
+15 XP
Which renderer should beginners choose for a 2D game?
AForward+
BCompatibility, the most stable for 2D and works on all hardware
CMobile only
3
โญ
๐Ÿ”’ Locked
Build the Player
Make the little character who does all the jumping!
Locked
โญ
Goal for this step

Create a Player scene with a CharacterBody2D for your hero.

๐Ÿ‘ถ For the child

Now we build our main character! In Godot, every character is made of pieces called "nodes", like building blocks. The special one we need is called a CharacterBody2D. It knows how to walk and jump!

๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ง For the grown-up

Node tree: CharacterBody2D (root, rename to "Player") โ†’ Sprite2D + CollisionShape2D (RectangleShape2D, sized to a rough character body ~24ร—40px). Use a coloured rectangle or placeholder for the sprite. Save as player.tscn.

What to do:

  1. 1In the top menu, click Scene โ†’ New Scene.
  2. 2Click "Other Node" and search for and choose CharacterBody2D.
  3. 3In the Scene tree, double-click the node name and rename it Player.
  4. 4Click the + button to add a child node: Sprite2D. Give it a coloured square in the Inspector.
  5. 5Add another child: CollisionShape2D. Set its Shape to RectangleShape2D.
  6. 6Press Ctrl+S and save it as player.tscn.
๐Ÿ•น๏ธ
Try it! Make your character any colour you like! A red square, a blue blob, anything! We can make it look fancier later.
๐Ÿ“
Fill in the Blanks
+15 XP
Every character in Godot is built from pieces called . The one that knows how to walk and jump is the .
โ“
Knowledge Check
+15 XP
What does the CollisionShape2D node do for the player?
AIt plays the jump sound
BIt chooses the player's colour
CIt gives the player a solid body so it can bump into floors and walls
4
โญ
๐Ÿ”’ Locked
Make the Player Run!
Press left and right to move your character!
Locked
โญ
Goal for this step

Write a script so your character can run left and right using the arrow keys.

๐Ÿ‘ถ For the child

Time for some CODE! Don't worry, we'll go slowly. We're going to write instructions that tell our character: "when I press the right arrow key, move that way!" It's like programming your own remote control.

๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ง For the grown-up

Attach a GDScript to the CharacterBody2D root. This step focuses on horizontal movement only. We use Input.get_axis(), a Godot 4 shorthand that returns -1, 0, or +1. move_and_slide() handles all collision response.

๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโญ
Grown-up note: Leave gravity out for now, it's easier for kids to understand movement first, then add gravity in the next step. Breaking it up like this keeps confidence high!

What to do:

  1. 1Click on the Player node in the Scene tree.
  2. 2Click the scroll icon (Attach Script) and click Create.
  3. 3Delete everything in the script and type the code below.
  4. 4Press Ctrl+S to save!
extends CharacterBody2D

const SPEED = 220    # How fast we run

func  _physics_process(delta):
    # left/right movement, get_axis returns -1, 0 or +1
    
    var direction = Input.get_axis("ui_left", "ui_right")
    velocity.x = direction * SPEED

    move_and_slide()
๐Ÿ•น๏ธ
Try it! Press F5 to run the game. Does your character slide left and right? (They'll float in the air for now, that's fine, we fix that next!)
โšก
True or False?
+15 XP
Input.get_axis("ui_left", "ui_right") gives back -1, 0, or +1 depending on the arrow keys.
move_and_slide() handles bumping into floors and walls for us.
A bigger SPEED number makes the character move slower.
๐Ÿ’ป
Code Challenge
+20 XP
Fill in the blanks so the player moves left and right with the arrow keys:
var direction = Input.("ui_left", "ui_right") velocity.x = direction * move_and_slide()
๐Ÿ’ก Hint: One reads the arrow keys (-1 to +1); the other is the constant that decides how fast we go.
โ“
Knowledge Check
+15 XP
Why do we set velocity.x = direction * SPEED?
ATo make the player jump higher
BSo the player moves left (-1), stays still (0), or moves right (+1) at our chosen speed
CTo change the player's colour as it moves
5
โญ
๐Ÿ”’ Locked
Add Gravity & Jumping
Fall down, then press Space to leap!
Locked
โญ
Goal for this step

Add gravity and a Space-bar jump to your character.

๐Ÿ‘ถ For the child

Right now your character floats like they're in space! Let's add gravity, the invisible pull that brings everything back down. Then we'll give them a jump button. Gravity pulls down a tiny bit every single moment, which is why falling starts slow and gets faster.

๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ง For the grown-up

Gravity is added to velocity.y each physics frame, multiplied by delta so it's frame-rate independent. Jumping sets velocity.y to a negative value in one go. is_on_floor() is only reliable after move_and_slide() has run at least once, which it has by the second frame.

๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโญ
Grown-up note: The confusing bit for kids is that up is negative in Godot. The top of the screen is y = 0 and numbers grow as you go down, so a jump has to be a minus number. It's worth saying out loud, it comes up in every 2D engine.

What to do:

  1. 1Open your Player script again (double-click it in the FileSystem panel).
  2. 2Add the two new const lines at the top, under SPEED.
  3. 3Add the gravity block and the jump block above the left/right code.
  4. 4Press Ctrl+S to save.
extends CharacterBody2D

const SPEED = 220

const JUMP_FORCE = -400    # minus, because UP is negative!

const GRAVITY = 1200

func  _physics_process(delta):
    # gravity pulls us down a little bit every moment
    
    if  not is_on_floor():
        velocity.y += GRAVITY * delta

    # jump, but only if we are standing on something!
    
    if Input.is_action_just_pressed("ui_accept") and is_on_floor():
        velocity.y = JUMP_FORCE

    var direction = Input.get_axis("ui_left", "ui_right")
    velocity.x = direction * SPEED

    move_and_slide()
๐Ÿ•น๏ธ
Try it! Press F5 and tap the Space bar. Your character should shoot up and fall back down. They'll fall forever for now, because there's nothing to land on yet. We build the ground next!
๐Ÿ“
Fill in the Blanks
+15 XP
Every moment we add to velocity.y so the player falls. We only allow a jump when tells us the player is standing on something.
๐Ÿ’ป
Code Challenge
+20 XP
Fill in the blanks to make the player fall and jump:
if not is_on_floor(): velocity.y += * delta if Input.is_action_just_pressed("ui_accept") and is_on_floor(): velocity.y =
๐Ÿ’ก Hint: Both are the constants you typed at the top of the script, in CAPITAL letters.
โ“
Knowledge Check
+15 XP
Why is JUMP_FORCE a negative number like -400?
ABecause the player jumps backwards
BBecause in Godot y gets smaller as you go UP the screen, so up is a minus number
CBecause negative numbers make the game run faster
6
โญ
๐Ÿ”’ Locked
Build the Level & Platforms
Somewhere to land, and platforms to jump between!
Locked
โญ
Goal for this step

Build a Level scene with solid ground and floating platforms for your player.

๐Ÿ‘ถ For the child

Your character needs a world! We're going to build the ground, then some platforms floating in the air to jump up onto, like the bricks in Mario. Each platform is made of two things: a coloured rectangle you can see, and an invisible solid shape you can land on.

๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ง For the grown-up

Level scene: Node2D root (save as level.tscn). Each platform is a StaticBody2D with a CollisionShape2D (RectangleShape2D) plus a ColorRect for the visual. Duplicate with Ctrl+D. Instance player.tscn and drop it above the ground. Godot will ask you to pick a main scene the first time you press F5, choose level.tscn.

๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโญ
Grown-up note: Make the ColorRect and the RectangleShape2D the same size, or your child will land on invisible air (or fall through something that looks solid). It's the number one source of "why doesn't it work?" in platformers, and a good chance to talk about the difference between what a game looks like and what it does.

What to do:

  1. 1Click Scene โ†’ New Scene, then "Other Node" and choose Node2D. Rename it Level and save it as level.tscn.
  2. 2Add a child StaticBody2D and rename it Ground.
  3. 3Give Ground two children: a ColorRect (make it wide, green, and near the bottom) and a CollisionShape2D with a RectangleShape2D the same size.
  4. 4Click Ground and press Ctrl+D to duplicate it. Drag the copy up and to the right, that's your first floating platform!
  5. 5Duplicate two or three more. Put them at different heights so you have to jump up them like steps.
  6. 6Find player.tscn in the FileSystem panel and drag it into the scene. Move it above the ground on the left.
  7. 7Press F5. Godot will ask which scene to start with, choose level.tscn.
๐Ÿ•น๏ธ
Try it! Run and off you go! Can you jump from the ground onto the first platform? If your platforms are too far apart to reach, drag them closer together, you're the level designer now.
๐Ÿ”ข
Put It In Order
+15 XP
Click these in the right order to build your level:
Press Ctrl+D to duplicate the platform and drag the copy higher up
Make a new scene with a Node2D root and save it as level.tscn
Drag player.tscn into the scene above the ground
Add a StaticBody2D with a ColorRect and a CollisionShape2D
โ“
Knowledge Check
+15 XP
Why does every platform need a CollisionShape2D as well as a ColorRect?
AThe ColorRect is only the colour you can see; the CollisionShape2D is the solid part you land on
BGodot will not let you save a scene unless every node has two children
CThe CollisionShape2D is what paints the platform its colour
7
โญ
๐Ÿ”’ Locked
Add a Camera That Follows You
Make the level bigger than the screen!
Locked
โญ
Goal for this step

Add a camera that follows your character.

๐Ÿ‘ถ For the child

At the moment your character can run off the edge of the screen and disappear! A camera fixes that. It's like a friend holding a video camera who always keeps you in the middle of the picture. Now your level can be enormous.

๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ง For the grown-up

A Camera2D added as a child of the Player inherits the parent's transform, so it follows for free with no code at all. Godot 4 makes the first Camera2D in the tree current automatically. Position Smoothing adds a little lag so the camera glides rather than snapping.

What to do:

  1. 1Open player.tscn (double-click it in the FileSystem panel).
  2. 2Click the Player node, press the + button and add a Camera2D as a child.
  3. 3With Camera2D selected, look in the Inspector for Zoom and set both numbers to 2, everything gets nice and big.
  4. 4Scroll down to Position Smoothing and tick Enabled.
  5. 5Save with Ctrl+S, go back to level.tscn and stretch your ground much wider.
๐Ÿ•น๏ธ
Try it! Run the game and hold the right arrow. The camera should glide along with you instead of leaving you behind. Try turning Position Smoothing off and on to feel the difference!
๐Ÿ“
Fill in the Blanks
+15 XP
A Camera2D that is a of the Player follows it with no code at all. Turning on Position makes the camera glide instead of snapping.
โ“
Knowledge Check
+15 XP
Why do we put the Camera2D inside the Player instead of in the Level?
ABecause cameras only work inside a CharacterBody2D
BBecause a child node moves with its parent, so the camera follows the player for free
CBecause the level is too big for a camera to fit inside it
8
โญ
๐Ÿ”’ Locked
Add Coins to Collect
Sprinkle treasure all over your level!
Locked
โญ
Goal for this step

Make a coin that disappears when you touch it.

๐Ÿ‘ถ For the child

Every platform game needs treasure! A coin is different from a platform: you don't land on it, you walk through it. In Godot that special "notice me but don't block me" node is called an Area2D.

๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ง For the grown-up

Coin scene: Area2D root + ColorRect + CollisionShape2D (CircleShape2D). Connect the built-in body_entered signal to a script on the coin. The player is added to a group called "player" so the coin can tell the difference between the hero and anything else that wanders in. queue_free() deletes the coin safely at the end of the frame.

๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโญ
Grown-up note: Groups are Godot's simple name-tag system. Adding the Player to a group called "player" means every coin, flag and enemy can ask "was that the hero?" without needing to know where the hero lives in the scene tree.

What to do:

  1. 1Open player.tscn, click the Player node, then open the Node panel (next to the Inspector) and click Groups. Type player and click Add.
  2. 2In the Player script, add the line var score = 0 just under the const lines. Save.
  3. 3Click Scene โ†’ New Scene, choose Area2D, rename it Coin and save it as coin.tscn.
  4. 4Give Coin a small yellow ColorRect and a CollisionShape2D with a CircleShape2D.
  5. 5Click Coin, attach a script, and type the code below.
  6. 6With Coin selected, open the Node panel, double-click body_entered and press Connect.
  7. 7Go back to level.tscn and drag coin.tscn in. Duplicate it with Ctrl+D and scatter coins along your platforms!
extends Area2D

func  _on_body_entered(body):
    # was that the hero, and not a platform or an enemy?
    
    if body.is_in_group("player"):
        body.score += 1
        queue_free()  # the coin disappears!
๐Ÿ•น๏ธ
Try it! Run and walk into a coin. It should vanish! You can't see the score yet, that's the very next step.
๐Ÿ’ป
Code Challenge
+20 XP
Fill in the blanks so the coin scores a point and disappears:
func _on_body_entered(body): if body.is_in_group(""): body.score += ()
๐Ÿ’ก Hint: The group is the name tag we gave the hero. The last one is the command that safely deletes a node.
โ“
Knowledge Check
+15 XP
Why does the coin check body.is_in_group("player") first?
ASo an enemy wandering into the coin doesn't collect it for you
BBecause every Area2D in Godot must check a group before it works
CTo make the coin spin round as you walk past it
9
โญ
๐Ÿ”’ Locked
Show the Score on Screen
Count those coins where everyone can see!
Locked
โญ
Goal for this step

Put a coin counter in the corner of the screen that goes up as you collect.

๐Ÿ‘ถ For the child

Collecting coins is more fun when you can see the number going up! We'll put some text in the corner. It needs to stay stuck to the screen even when the camera moves, so it goes in a special box called a CanvasLayer.

๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ง For the grown-up

A CanvasLayer draws its children in screen space, ignoring the camera, which is exactly what a HUD needs. The Level script reads player.score each frame. @onready grabs the node references once the scene tree is ready, and str() converts the number into text.

What to do:

  1. 1Open level.tscn. Click the Level root, then add a child CanvasLayer.
  2. 2Add a Label inside the CanvasLayer and rename it ScoreLabel.
  3. 3Drag the Label to the top-left corner. In the Inspector, open Theme Overrides โ†’ Font Sizes and make it nice and big.
  4. 4Click the Level root, attach a script and type the code below.
  5. 5Press Ctrl+S and run it!
extends Node2D

# grab these two nodes when the scene is ready
@onready var player = $Player
@onready var score_label = $CanvasLayer/ScoreLabel

func  _process(delta):
    score_label.text = "Coins: " + str(player.score)
๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโญ
Grown-up note: If you get an error mentioning a null instance, the node names don't match. $Player and $CanvasLayer/ScoreLabel have to be spelled exactly as they appear in the Scene tree, capital letters and all. Great first lesson in why programmers care about spelling!
๐Ÿ•น๏ธ
Try it! Run and grab a coin. Does "Coins: 1" appear in the corner? Try changing the word "Coins" to your own word, maybe "Treasure" or your name!
๐Ÿ“
Fill in the Blanks
+15 XP
The Label goes inside a so it stays stuck to the screen when the camera moves. We turn the score number into text using ().
โ“
Knowledge Check
+15 XP
What does str(player.score) do?
AIt adds one more point to the score
BIt turns the score number into text, because a Label can only show text
CIt saves the score onto your computer
10
โญ
๐Ÿ”’ Locked
Add a Goal Flag
Give your level a finish line to reach!
Locked
โญ
Goal for this step

Put a flag at the end of the level that shows a "You Win!" message when the player reaches it.

๐Ÿ‘ถ For the child

A game needs a way to win! We'll pop a flag at the far end of your level. When your character touches it, big letters appear saying You Win, and everything stops. That's your level finished, properly finished.

๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ง For the grown-up

The Goal is another Area2D using the same body_entered pattern as the coin, so this step reinforces rather than introduces. It reveals a hidden Label and sets get_tree().paused = true. Rendering carries on while paused, so the message stays on screen.

What to do:

  1. 1In level.tscn, add a Label inside your CanvasLayer and rename it WinLabel. Type You Win! in its Text and make the font huge.
  2. 2With WinLabel selected, untick Visible in the Inspector so it's hidden at the start.
  3. 3Click the Level root and add a child Area2D. Rename it Goal.
  4. 4Give Goal a tall thin ColorRect (a flag!) and a CollisionShape2D the same size.
  5. 5Drag Goal to the far right end of your level.
  6. 6Attach a script to Goal, type the code below, then connect its body_entered signal in the Node panel.
extends Area2D

func  _on_body_entered(body):
    if body.is_in_group("player"):
        # show the message FIRST, then freeze the game
        get_node("../CanvasLayer/WinLabel").visible = true
        get_tree().paused = true
๐Ÿ•น๏ธ
Try it! Run the level and race to the flag. You Win! Now go back and move the flag somewhere trickier, maybe on top of the highest platform.
โšก
True or False?
+15 XP
The Goal is an Area2D, so the player walks through it instead of bumping into it.
We show the win message before pausing, so the player can actually read it.
get_tree().paused = true makes the game run faster.
โ“
Knowledge Check
+15 XP
Why is the goal flag an Area2D and not a StaticBody2D?
ABecause a StaticBody2D cannot be given a colour
BBecause an Area2D notices the player walking in without blocking them like a wall
CBecause only an Area2D can be placed at the end of a level
11
โญ
๐Ÿ”’ Locked
Add an Enemy to Stomp
Bounce on its head, just like Mario!
Locked
โญ
Goal for this step

Make a patrolling enemy you defeat by jumping on top of it.

๐Ÿ‘ถ For the child

Time for a baddie! It marches left and right on its own. Here's the clever bit: the enemy works out how you touched it. If you were falling downwards, you squashed it. If you weren't, it got you, and you go back to the start.

๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ง For the grown-up

The stomp check is body.velocity.y > 0, meaning the player was moving downwards at the moment of contact. Remember y grows downwards, so falling is positive. We also add a respawn() function to the Player, its first custom function, and a lovely introduction to the idea that objects can be asked to do things.

What to do:

  1. 1Open the Player script and add the start_pos variable and the respawn() function shown below. Save.
  2. 2Click Scene โ†’ New Scene, choose Area2D, rename it Enemy and save it as enemy.tscn.
  3. 3Give Enemy a small red ColorRect and a CollisionShape2D.
  4. 4Attach a script to Enemy, type the enemy code below, then connect its body_entered signal.
  5. 5Drag enemy.tscn into level.tscn and stand it on one of your platforms.
# ADD THESE to your Player script

var start_pos = Vector2.ZERO

func  _ready():
    start_pos = position

func  respawn():
    position = start_pos
    velocity = Vector2.ZERO
# The Enemy script

extends Area2D

const SPEED = 60

var direction = 1

var start_x = 0.0

func  _ready():
    start_x = position.x

func  _process(delta):
    position.x += direction * SPEED * delta
    # turn around after walking 80 pixels each way
    
    if position.x > start_x + 80:
        direction = -1
    
    if position.x < start_x - 80:
        direction = 1

func  _on_body_entered(body):
    if body.is_in_group("player"):
        if body.velocity.y > 0:
            # falling downwards, that's a stomp!
            queue_free()
            body.velocity.y = -300    # little bounce
        
        else:
            body.respawn()
๐Ÿ•น๏ธ
Try it! Jump on the enemy's head, you should squash it and bounce! Now walk into it from the side and you'll zip back to the start. Try changing SPEED to 120 to make a fast one.
๐Ÿ’ป
Code Challenge
+20 XP
Fill in the blanks so the enemy can tell a stomp from a bump:
if body.is_in_group("player"): if body.velocity.y > : queue_free() body.velocity.y = else: body.()
๐Ÿ’ก Hint: Falling means velocity.y is bigger than zero. The bounce goes upwards, so it's a minus number. The last blank is the function you just added to the Player.
โ“
Knowledge Check
+15 XP
How does the enemy know it was stomped rather than bumped into?
AThe player was falling downwards, so velocity.y was bigger than 0
BThe enemy counts how many times it has been touched
CThe player has to hold the down arrow key while touching it
12
โญ
๐Ÿ”’ Locked
Design Your Level & Play!
Make it truly yours, then show someone!
Locked
โญ
Goal for this step

Design and tune your own level using everything you've built.

๐Ÿ‘ถ For the child

You have all the pieces now: platforms, coins, a baddie and a flag. This step is the fun one, you're the level designer! Build a journey from the start to the flag. Make some coins easy and some really tricky to reach.

๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ง For the grown-up

This is the playtesting step, and it's where the real learning lands. Encourage changing one number at a time (GRAVITY, JUMP_FORCE, SPEED) and playing after each change. That change-test-change loop is genuinely how professionals tune game feel.

๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโญ
Grown-up note: If a jump can't be made, don't reach for the code first, try moving the platform. Designers change the level far more often than they change the character. Saving the code for last keeps the game predictable.

What to do:

  1. 1Duplicate platforms with Ctrl+D and build a path from your player to the flag.
  2. 2Scatter coins, put a few in places you have to jump for!
  3. 3Add one or two more enemies on the platforms.
  4. 4Play the whole level from start to flag. Can you actually finish it?
  5. 5Tune the feel: bigger GRAVITY for a snappier fall, bigger JUMP_FORCE (more negative!) for a floatier jump.
  6. 6Change the colours of everything until it looks like your game.
  7. 7Get a grown-up or a friend to play it, and watch where they get stuck!
โญ
You did it! You've built a real platform game from an empty project: a character who runs and jumps, solid platforms, a camera, coins with a score, a goal flag and an enemy you can stomp. That's the same set of ideas behind every Mario game ever made.
๐Ÿ”ข
Put It In Order
+15 XP
What's the best order for finishing a level?
Play it yourself from the start all the way to the flag
Watch someone else play and see where they get stuck
Build the platforms, coins, enemies and flag
Change one number, like GRAVITY, and play again to feel the difference
โ“
Knowledge Check
+15 XP
Your character hangs in the air too long and the jump feels floaty. What's the best thing to change first?
AMake GRAVITY bigger, so the player is pulled back down faster
BMake SPEED bigger, so the player runs faster
CAdd more coins to the level

๐Ÿ”จ What We're Building

A side-scrolling platform game just like Mario or Sonic! Your character runs left and right, jumps over gaps, lands on platforms, and tries to reach the end of the level.

๐Ÿ‘ฆ For the Child

Have you ever played Mario? We're going to make our VERY OWN version! You'll build a little character who can jump, collect coins, and even stomp baddies. You're going to be a real game developer!

๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ง For the Grown-Up

This is Episode 2 of the My First Video Game series, no prior Godot experience needed (start with Episode 1: Zoom Zoom if you're brand new!). New concepts introduced: CharacterBody2D, gravity & jumping, StaticBody2D platforms, Camera2D, Area2D for coins, goals and enemies, groups, and writing your first custom function. We keep code ultra-short and friendly.

โœจ What You'll Make

  • A character who runs left and right
  • Gravity and a jump button
  • Solid platforms to jump between
  • A camera that follows your character
  • Coins to collect with a score counter
  • A goal flag to finish the level
  • A simple enemy to stomp
  • Your very own Mario-style level!
โญ My First Video Game ยท Series 1
You finished Episode 2! ๐ŸŽ‰
Next up, shoot enemies and explore a randomly generated map!
๐ŸŽ๏ธ Ep 1 ยท Zoom Zoom โ–ถ๏ธ Next: Ep 3 , Bang Bang! ๐Ÿ’ฅ โญ View My Progress & Certificates

This workshop was free and took many hours to build. If it helped you learn something new, consider supporting the project.

☕ Support on Ko-fi

๐Ÿ†“ Free In-House Dev Tools

Make It Yours

Use these free browser tools alongside this workshop to create custom sprites, sounds, levels and colour schemes for your game. No installs. Free forever.

โญ
Pixel Studio
Draw sprites & animations
โญ
Level Designer
Build 2D tile maps
โญ
SFX Studio
Create custom sound effects
โญ
Colour Palette
Build a game-ready colour scheme
โญ
Game Idea Gen
Random game concepts & prompts
๐Ÿ“‚ See All Free Tools โ†’

๐Ÿงฉ JavaScript Game Basics

Drag the JavaScript game steps into the correct order:

Draw all game objects
Update positions and check collisions
Clear the canvas each frame
Create the game loop with requestAnimationFrame
Get the 2D context with getContext
Get the canvas with getElementById