* Update Platformer 2D to Godot v4.3 Before this change, if you tries to import the Platformer 2D project using Godot v4.3 (the latest stable version of Godot, at the moment), you would get the following warning: > Warning: This project was last edited in Godot 4.2. > Opening will change it to Godot 4.3. > > Open anyway? Project will be modified. This change updates the project to Godot 4.3 so that that warning no longer appears. When you upgrade to a newer version of Godot, sometimes certain files will automatically be updated by the Godot Editor after the upgrade has been completed. Specifically, the files won’t get updated until after they’re opened in the Godot Editor. When creating this commit, I tried to open every single file for Platformer 2D in the Godot Editor to make sure that all of those automatic changes are included in this commit. * Replace Platformer2D’s TileMap with a TileMapLayer Before this change, the Platformer 2D used a TileMap Node. TileMaps are deprecated. TileMapLayers should be used instead [1]. [1]: <https://docs.godotengine.org/en/4.3/classes/class_tilemap.html#tilemap>
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
Music
Pompy by Hubert Lamontagne (madbr)
