Platformer Starter for Godot 4: 3 levels
Platformer Starter is a complete 2D platformer project for Godot 4 that you can open, play and turn into your own game. The code is plain GDScript with explicit types and comments, and every movement value sits in the Inspector with a note on what it does.
What you get
- A CharacterBody2D player with acceleration, friction, turn boost and air control
- Variable jump height, coyote time and jump buffering
- Wall slide and wall jump, optional double jump, and a dash with cooldown
- Jump set by height and time to peak; the script works out speed and gravity, and the jump reaches the exact height you set
- A small node-based state machine (idle, run, jump, fall, wall slide, dash, dead) that is easy to extend
- A camera with look-ahead, smoothing and level limits
- TileMapLayer levels on a 16x16 pixel tileset with solid ground, stone blocks, one-way planks and decorations
- Coins, spikes, a patrolling slime you can stomp, checkpoints, moving platforms, and a level exit that loads the next level
- Lives, death and respawn at the last checkpoint, game over
- 3 short demo levels: First Steps, Walls and Dashes, The Climb
- HUD with coins, hearts and messages
- Main menu, pause menu and settings: Master, Music and SFX volume, fullscreen, and key rebinding saved to disk
- Keyboard and gamepad actions in the InputMap, stored as physical keys so WASD works on any keyboard layout
- Named sound hooks (Sfx.play(&"jump")) with generated placeholder beeps; drop your own files in assets/audio/ and they are used automatically
- A headless test suite with 89 checks: movement physics, coyote time, jump buffer, wall jump, dash, one-way platforms, moving platforms, coin pickup, checkpoint respawn, enemy stomp, level loading, pause and level exit
Formats
- Godot 4.4 project (tested on 4.4.1, Compatibility renderer, so it runs on low-end PCs, mobile and web)
- GDScript source, .tscn scenes, .tres resources
- PNG pixel art: player (11 frames), slime, coin, spikes, checkpoint, exit, moving platform, hearts, tileset, 4 parallax background layers
- Level layouts as text files, plus the builder scripts that generate the art and levels
How to use
- In Godot, choose Import and select project.godot.
- Press F5 and play.
- Select the Player and tune the Run, Jump, Wall and Dash values in the Inspector.
- Duplicate a level, paint the tiles, drag in objects from objects/, and add the scene to the level list in autoload/game.gd.
README.txt covers adding player states, driving the player from code, sounds, key rebinding and running the tests.
How it was made
The code, the pixel art and the levels were built from code written with an AI assistant. The art is drawn by a Python script included in the project. No AI image or audio generation models were used, and there are no samples or third-party assets. The UI uses Godot's built-in default font. Everything was checked by the included tests and by rendering the game.
Licence
Use it in unlimited commercial and non-commercial games, modified or unmodified, without attribution. You may not resell or redistribute the template or its files on their own or as part of another template or asset pack. Full text in LICENSE.txt.