Hugo Locurcio 2a962929f3 Update demo files for Godot 4.2.1 (#1013) vor 10 Monaten
..
audio 1d5184e235 Update most demos for Godot 4.0.beta10 (#782) vor 1 Jahr
background 9484fbbace Fix errors in Physics-Based Platformer 2D demo (#958) vor 1 Jahr
coin 9484fbbace Fix errors in Physics-Based Platformer 2D demo (#958) vor 1 Jahr
enemy 9484fbbace Fix errors in Physics-Based Platformer 2D demo (#958) vor 1 Jahr
platform cbb297750f Update 2D physics platformer for 4.0 vor 1 Jahr
player cbb297750f Update 2D physics platformer for 4.0 vor 1 Jahr
screenshots fcc7d5c723 Optimize PNG images using oxipng vor 4 Jahren
README.md cbb297750f Update 2D physics platformer for 4.0 vor 1 Jahr
icon.webp cbb297750f Update 2D physics platformer for 4.0 vor 1 Jahr
icon.webp.import cbb297750f Update 2D physics platformer for 4.0 vor 1 Jahr
project.godot 2a962929f3 Update demo files for Godot 4.2.1 (#1013) vor 10 Monaten
stage.tscn 9484fbbace Fix errors in Physics-Based Platformer 2D demo (#958) vor 1 Jahr
tiles_demo.png fcc7d5c723 Optimize PNG images using oxipng vor 4 Jahren
tiles_demo.png.import cbb297750f Update 2D physics platformer for 4.0 vor 1 Jahr
tileset.tres cbb297750f Update 2D physics platformer for 4.0 vor 1 Jahr
tileset_edit.tscn cbb297750f Update 2D physics platformer for 4.0 vor 1 Jahr

README.md

Physics Platformer

This demo uses RigidBody2D for the player and enemies. These character controllers are more powerful than CharacterBody2D, but can be more difficult to handle, as they require manual modification of the RigidDynamicBody velocity.

Language: GDScript

Renderer: Forward Plus

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

How does it work?

The player and enemies use dynamic character controllers for movement, made with RigidBody2D, which means that they can perfectly interact with physics (there is a see-saw, and you can even ride enemies). Because of this, all movement must be done in sync with the physics engine, inside of _integrate_forces().

Screenshots

Screenshot of the beginning

Screenshot of the seesaw and the player riding an enemy

Music

"Pompy" by Hubert Lamontagne (madbr) https://soundcloud.com/madbr/pompy