Hugo Locurcio 7befd7c718 Enable physics interpolation in all 2D demos (#1070) 3 週間 前
..
enemy 4d49bbd1b8 Update demos for Godot 4.4 1 ヶ月 前
gui 4d49bbd1b8 Update demos for Godot 4.4 1 ヶ月 前
level 4d49bbd1b8 Update demos for Godot 4.4 1 ヶ月 前
player 7befd7c718 Enable physics interpolation in all 2D demos (#1070) 3 週間 前
screenshots 4d01a2678f Port demos with remade art assets to Godot 4 (#922) 1 年間 前
README.md 16d8ba09fb Replace instances of KinematicBody with CharacteBody in READMEs 10 ヶ月 前
default_bus_layout.tres 4d01a2678f Port demos with remade art assets to Godot 4 (#922) 1 年間 前
game.gd bac1e69164 Use static typing in all demos (#1063) 11 ヶ月 前
game.gd.uid 4d49bbd1b8 Update demos for Godot 4.4 1 ヶ月 前
game_singleplayer.tscn 7befd7c718 Enable physics interpolation in all 2D demos (#1070) 3 週間 前
game_splitscreen.gd ffd600917d Update, clean up, and reorganize the 2D platformer 2 年 前
game_splitscreen.gd.uid 4d49bbd1b8 Update demos for Godot 4.4 1 ヶ月 前
game_splitscreen.tscn 7befd7c718 Enable physics interpolation in all 2D demos (#1070) 3 週間 前
icon.webp 4d01a2678f Port demos with remade art assets to Godot 4 (#922) 1 年間 前
icon.webp.import 4d01a2678f Port demos with remade art assets to Godot 4 (#922) 1 年間 前
music.ogg ffd600917d Update, clean up, and reorganize the 2D platformer 2 年 前
music.ogg.import 4d01a2678f Port demos with remade art assets to Godot 4 (#922) 1 年間 前
music.tscn 4d01a2678f Port demos with remade art assets to Godot 4 (#922) 1 年間 前
project.godot 7befd7c718 Enable physics interpolation in all 2D demos (#1070) 3 週間 前

README.md

2D Platformer

This demo is a pixel art 2D platformer with graphics and sound.

It shows you how to code characters and physics-based objects in a real game context. This is a relatively complete demo where the player can jump, walk on slopes, fire bullets, interact with enemies, and more. It contains one closed level, and the player is invincible, unlike the enemies.

You will find most of the demo’s content in the level.tscn scene. You can open it from the default game.tscn scene, or double click on level.tscn in the src/level/ directory.

We invite you to open the demo's GDScript files in the editor as they contain a lot of comments that explain how each class works.

Language: GDScript

Renderer: Compatibility

Check out this demo on the asset library: https://godotengine.org/asset-library/asset/120

Features

  • Side-scrolling player controller using CharacterBody2D.
    • Can walk on and snap to slopes.
    • Can shoot, including while jumping.
  • Enemies that crawl on the floor and change direction when they encounter an obstacle.
  • Camera that stays within the level’s bounds.
  • Supports keyboard and gamepad controls.
  • Platforms that can move in any direction.
  • Gun that shoots bullets with rigid body (natural) physics.
  • Collectible coins.
  • Pause and pause menu.
  • Pixel art visuals.
  • Sound effects and music.

Screenshots

2D Platformer

Music

Pompy by Hubert Lamontagne (madbr)