JVDesignStudio · Godot 4 Guide

How To
Godot 4
Build Your First Platformer

A step-by-step beginner guide to building a complete 2D platformer using Godot 4 and GDScript. No game dev experience needed just follow along module by module.

Godot 4.3 GDScript 🆓 Free 📄 PDF Included Ages 10+
EngineGodot 4.3
LanguageGDScript
Modules8 + Bonus
Duration5+ Hours
LevelBeginner
PriceFree

What You'll Build & Learn

By the end you'll have a fully playable 2D platformer and the skills to keep building from there.

⚙️
Godot Basics
Master Nodes, Scenes, Signals, and the Editor. Understand how Godot projects are structured.
🏃
Player Control
Responsive running, jumping, and gravity using CharacterBody2D and GDScript physics.
🗺️
Level Design
Build interactive levels with TileMaps, TileSets, and parallax scrolling backgrounds.
👾
Enemies & Hazards
Patrolling enemy AI, collision detection, player death and respawn logic.
🎮
UI & Game State
Coin collectibles, HUD score counter, game over screens, managing state with signals.
🚀
Export & Ship
Sound effects, music, a main menu, and exporting your game for PC and web.
0 XP
Level 1
🔥0
Your Progress 0 / 9 steps
1
⚙️
Setting Up Your Project
Install Godot 4, explore the editor, and organise your folders
Current
🎯
Goal for this step

Get Godot 4 installed, create a new project, and understand the editor layout.

Get started

  • 1Download Godot 4.3 from godotengine.org — choose the Standard version (not .NET).
  • 2Launch Godot and click New Project — give it a name and pick a folder.
  • 3Explore the editor: Scene panel (top-left), Filesystem (bottom-left), Inspector (right), Viewport (centre).
  • 4Create your folder structure: res://scenes/, res://scripts/, res://assets/.
  • 5Set Project Settings → Display → Window to your target resolution (e.g. 1280x720).
💡
Godot is free and open source. No licence, no subscription. You own everything you make with it.
✏️
Fill in the Blanks
+15 XP
The panel on the right lets you edit properties of any selected node. Your project files live in the panel at the bottom-left.
🧠
Knowledge Check
+15 XP
Which version of Godot should you download for this tutorial?
AGodot 3.5 Standard
BGodot 4.3 Standard (not .NET)
CGodot 4.3 .NET version
2
🏃
The Player: CharacterBody2D
Create the player scene with sprite, collision, and your first script
Locked
🎯
Goal for this step

Build a Player scene with CharacterBody2D, Sprite2D, CollisionShape2D and attach your first GDScript.

Build the player

  • 1Create a new scene — add a CharacterBody2D node as root, rename it "Player".
  • 2Add a Sprite2D child node, assign your player texture in the Inspector.
  • 3Add a CollisionShape2D child — set Shape to CapsuleShape2D, size it to fit your sprite.
  • 4Right-click Player node → Attach Script → GDScript → Create.
  • 5Save the scene as res://scenes/player.tscn.
# player.gd starter script
extends CharacterBody2D

const SPEED = 200.0
const JUMP_VELOCITY = -450.0
var gravity = ProjectSettings.get_setting("physics/2d/default_gravity")
💻
Code Challenge
+20 XP
Fill in the blanks to complete the player script starter:
extends const SPEED = 200.0 const JUMP_VELOCITY = var gravity = ProjectSettings.get_setting("physics/2d/default_gravity")
💡 Hint: The player extends CharacterBody2D and jumps upward with a negative velocity.
🧠
Knowledge Check
+15 XP
What type of node do you use as the root of the player scene for a 2D platformer in Godot 4?
ARigidBody2D
BArea2D
CCharacterBody2D
3
🎮
Movement & Jumping
Implement gravity, horizontal movement, and jump velocity with move_and_slide()
Locked
🎯
Goal for this step

Write the _physics_process function so the player can run left/right and jump.

func _physics_process(delta):
    # Apply gravity when airborne
    if not is_on_floor():
        velocity.y += gravity * delta

    # Jump
    if Input.is_action_just_pressed("ui_accept"):
        if is_on_floor():
            velocity.y = JUMP_VELOCITY

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

    move_and_slide()
💡
move_and_slide() handles all collision response automatically. It moves the character and slides along surfaces — you don't need to write collision logic yourself.
💻
Code Challenge
+20 XP
Fill in the blanks for the physics loop:
func _physics_process(delta): if not is_on_floor(): velocity.y += gravity * if Input.is_action_just_pressed("ui_accept"): if is_on_floor(): velocity.y = JUMP_VELOCITY var direction = Input.get_axis("ui_left", "ui_right") velocity.x = direction * SPEED ()
💡 Hint: delta is the time since last frame. The function that handles movement and collisions is move_and_slide.
🧠
Knowledge Check
+15 XP
What does move_and_slide() do?
AMoves the character and handles collision response automatically
BOnly applies gravity to the character
CPlays a sliding animation on the sprite
4
🗺️
Creating Interactive Terrain
Build levels with TileSets, TileMaps, and collision layers
Locked
🎯
Goal for this step

Create a playable level using TileMap and TileSet with proper collision, plus a smooth camera.

Build your level

  • 1Create a new scene — add a TileMap node as root.
  • 2In the Inspector, create a new TileSet resource — set tile size (e.g. 32x32).
  • 3Click the TileSet editor, drag your tileset texture in, then select tiles and add Physics Layer collision shapes.
  • 4Back in the TileMap, paint your level using the tile palette at the bottom of the screen.
  • 5Add a Camera2D node to the Player scene — enable Position Smoothing for a nice feel.
⚠️
Always set collision layers correctly. The player and tiles must be on compatible layers or they'll pass through each other.
🔢
Order the Steps
+15 XP
Click each item in the correct order for setting up a TileMap level:
Paint tiles onto the TileMap in the viewport
Add a TileMap node to the scene
Add a Camera2D to the Player scene
Create a TileSet resource and add collision shapes
🧠
Knowledge Check
+15 XP
What happens if the player and tile collision layers don't match?
AThe game crashes with an error
BThe tiles turn invisible
CThe player passes through the tiles
5
👾
Enemies & Hazards
Patrolling enemy AI, player death via Area2D, and respawn checkpoints
Locked
🎯
Goal for this step

Add a patrolling enemy that kills the player on contact, plus respawn logic.

# enemy.gd simple patrol AI
func _physics_process(delta):
    if direction == 1 and $RightWall.is_colliding():
        direction = -1
    elif direction == -1 and $LeftWall.is_colliding():
        direction = 1
    velocity.x = direction * SPEED
    move_and_slide()
💡
Use two RayCast2D nodes pointing left and right at the edge of the platform. When one detects a wall, flip the direction. Simple but effective.
True or False
+15 XP
RayCast2D can detect when an enemy reaches a wall or platform edge.
Area2D is used for the enemy's movement physics.
Flipping the direction variable from 1 to -1 reverses the enemy's patrol direction.
🧠
Knowledge Check
+15 XP
How does the patrol enemy know when to turn around?
AIt uses a timer to change direction every few seconds
BRayCast2D detects a wall, then the direction variable flips
CIt follows the player's position
6
🎮
Collectibles & UI
Coin pickups, score counter HUD, and game state with Autoloads
Locked
🎯
Goal for this step

Create coin collectibles, a HUD showing score and lives, and a global GameState Autoload.

# coin.gd collected by player
func _on_body_entered(body):
    if body.is_in_group("player"):
        GameState.score += 1
        emit_signal("coin_collected")
        queue_free()

Build the HUD

  • 1Create a CanvasLayer scene for your HUD — add Labels for score and lives.
  • 2Create an Autoload called GameState (Project Settings → Autoload) — store score and lives here.
  • 3Connect signals from coins/enemies to update the HUD.
💻
Code Challenge
+20 XP
Complete the coin pickup script:
func _on_body_entered(body): if body.is_in_group(): GameState.score += 1 emit_signal("coin_collected") ()
💡 Hint: The player belongs to the "player" group. queue_free() removes the coin from the scene.
🧠
Knowledge Check
+15 XP
What is an Autoload in Godot?
AA script that is always loaded and accessible from any scene — perfect for global game state
BA node that automatically saves your game to disk
CA setting that auto-loads textures when the game starts
7
🔊
Finishing Touches
Sound effects, background music, and a main menu with scene switching
Locked
🎯
Goal for this step

Add audio, build a main menu scene, and wire up scene transitions.

Add audio and a menu

  • 1Add AudioStreamPlayer nodes to the player — import WAV files for jump, land, and hurt sounds.
  • 2Add a separate AudioStreamPlayer to the main scene for looping background music (use OGG format).
  • 3Create a MainMenu scene with a TextureRect background, title Label, and Start button.
  • 4Connect the Start button to get_tree().change_scene_to_file("res://scenes/level_1.tscn").
💡
OGG files loop better than MP3 in Godot. Use Audacity (free) to trim your music to a clean loop point.
✏️
Fill in the Blanks
+15 XP
To play sound effects in Godot you use an node. The best audio format for looping music in Godot is .
🧠
Knowledge Check
+15 XP
Which function switches to a different scene in Godot 4?
Aload_scene("path")
Bget_tree().change_scene_to_file("path")
CSceneManager.goto("path")
8
🚀
Exporting Your Game
Configure export templates and build for PC and HTML5 web
Locked
🎯
Goal for this step

Export your finished game for PC and web, and prepare it for itch.io.

Export your game

  • 1Open Project → Export — click Add and choose your platform (Windows, Mac, HTML5).
  • 2Click Manage Export Templates — download the templates for Godot 4.3.
  • 3For HTML5: set the export path, click Export Project — this creates an index.html + .wasm file.
  • 4On itch.io: upload as a ZIP containing all HTML5 export files, set Kind to HTML.
  • 5Test in browser before publishing — some features need HTTPS to work.
💡
The free itch.io HTML5 embed is the easiest way to share your game. Players can play instantly with no download.
🔢
Order the Steps
+15 XP
Put the export steps in the correct order:
Click Export Project to generate the HTML5 files
Open Project → Export and add a platform
Upload the ZIP to itch.io and set Kind to HTML
Download the export templates for Godot 4.3
🧠
Knowledge Check
+15 XP
What is the easiest way to share your Godot game online for free?
AEmail the project folder to friends
BUpload the Godot project to GitHub
CExport as HTML5 and upload to itch.io
Bonus: Particle Effects
Dust trails, sparkle pickups, and GPUParticles2D visual polish
Locked
🎯
Goal for this step

Add beautiful particle effects for landing dust and coin pickup sparkles.

Add particles

  • 1Add a GPUParticles2D node to the Player scene — it starts emitting immediately.
  • 2Create a new ParticleProcessMaterial — set Direction, Spread, Gravity, and Initial Velocity.
  • 3Set One Shot = true and Explosiveness = 1.0 for burst effects (landing, hit).
  • 4Trigger it from code: $DustParticles.restart() on landing detection.
# Detect landing to trigger dust burst
var was_on_floor = false

func _physics_process(delta):
    var just_landed = is_on_floor() and not was_on_floor
    if just_landed:
        $DustParticles.restart()
    was_on_floor = is_on_floor()
💻
Code Challenge
+20 XP
Fill in the blanks for the landing detection:
var was_on_floor = false func _physics_process(delta): var just_landed = () and not was_on_floor if just_landed: $DustParticles.() was_on_floor = is_on_floor()
💡 Hint: is_on_floor() checks if the character is grounded. restart() triggers the particle burst.
🧠
Knowledge Check
+15 XP
What two properties make GPUParticles2D fire once as a burst instead of continuously?
ALooping = false and Speed = max
BOne Shot = true and Explosiveness = 1.0
CEmit = once and Burst = true
🎉🏆⚙️🎮✨
Workshop Complete!
You've built a complete 2D platformer in Godot 4 from scratch — player, levels, enemies, UI, audio, and export. Amazing work!
0
Total XP
1
Level
0
Best Streak
0%
Accuracy
📊 View My Progress

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

Taste the Code

GDScript is Godot's beginner-friendly Python-like language. Here's a taste of what you'll write across the modules.

player.gd Jump Logic
if Input.is_action_just_pressed("ui_accept"):
    if is_on_floor():
        velocity.y = JUMP_VELOCITY

# Apply gravity when airborne
if not is_on_floor():
    velocity.y += gravity * delta
coin.gd Coin Pickup
func _on_body_entered(body):
    if body.is_in_group("player"):
        GameState.score += 1
        emit_signal("coin_collected")
        queue_free()
enemy.gd Patrol AI
func _physics_process(delta):
    if direction == 1 and $RightWall.is_colliding():
        direction = -1
    elif direction == -1 and $LeftWall.is_colliding():
        direction = 1
    move_and_slide()
level.gd Scene Transition
func _on_goal_reached():
    # Save score, load next level
    GameState.save_score()
    get_tree().change_scene_to_file(
        "res://scenes/level_2.tscn"
    )

Get the Full PDF

All 8 modules plus the bonus chapter step by step, with code examples throughout. Download free and go at your own pace.

How To Godot 4
Full Tutorial PDF
The complete guide offline. Every module, every code snippet, every tip in a single PDF you can print or read on any device.
Godot 4.3 GDScript 8 Modules + Bonus Free Forever Updated Nov 2025
📄 Download Free PDF
📄

What's Been Added

The tutorial is kept up to date with the latest Godot releases and community feedback.

Coming Next
Module 9: Animated Sprites & Character States
AnimationPlayer, state machines for player animations (idle, run, jump, fall), and blending transitions cleanly.
In Progress
Updated
Full Godot 4.3 Compatibility Check
Every module reviewed and updated — new editor UI changes, updated TileMap workflow, and revised export templates.
November 10, 2025
Added
Bonus Chapter: Particle Effects
GPUParticles2D for dust trails on landing, sparkle effects for coin pickups, and screen shake on enemy collision.
October 1, 2025

Keep Building

🛠️ 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 20 Free Tools →