Platform Behavior

The platformer engine allows to create controllable objects that can run and jump on other objects that are marked as platforms. It supports various features commonly found in platformers: grabbing the edge of a platform, sustaining the jump while a key is held, customizable gravity… It can be used for the player, but also for other objects moving on platforms. In this case though, it's recommended to first check if there is a simpler behavior that could be used. Read more explanations about it.

Platform

Platform that Platformer characters can run on.

Behavior actions

Change platform type
Change the platform type of the object: Platform, Jump-Through, or Ladder.

No expressions for this behavior.

Platformer character

Controllable character that can jump and run on platforms.

Behavior actions

Acceleration
Change the acceleration of an object (in pixels per second per second).

Platform grabbing
Enable (or disable) the ability of the object to grab platforms when falling near to one.

Deceleration
Change the deceleration of an object (in pixels per second per second).

Gravity
Change the gravity applied on an object (in pixels per second per second).

Ignore default controls
De/activate the use of default controls.
If deactivated, use the simulated actions to move the object.

Jump speed
Change the jump speed of an object (in pixels per second).

Jump sustain time
Change the jump sustain time of an object (in seconds).

Ladder climbing speed
Change the ladder climbing speed (in pixels per second).

Maximum falling speed
Change the maximum falling speed of an object (in pixels per second).

Maximum speed
Change the maximum speed of an object (in pixels per second).

Allow jumping again
When this action is executed, the object is able to jump again, even if it is in the air: this can be useful to allow a double jump for example. This is not a permanent effect: you must call again this action everytime you want to allow the object to jump (apart if it's on the floor).

Simulate control
Simulate a press of a key.
Valid keys are Left, Right, Jump, Ladder, Up, Down.

Simulate down key press
Simulate a press of the down key (used when on a ladder).

Simulate jump key press
Simulate a press of the jump key.

Simulate ladder key press
Simulate a press of the ladder key (used to grab a ladder).

Simulate left key press
Simulate a press of the left key.

Simulate release key press
Simulate a press of the release key (used when grabbing a platform ledge).

Simulate right key press
Simulate a press of the right key.

Simulate up key press
Simulate a press of the up key (used when on a ladder).

Behavior conditions

Acceleration
Compare the acceleration of the object (in pixels per second per second).

Can grab platforms
Check if the object can grab the platforms.

Can jump
Check if the object can jump.

Current falling speed
Compare the current falling speed of the object (in pixels per second).

Current jump speed
Compare the current jump speed of the object (in pixels per second).

Current speed
Compare the current speed of the object (in pixels per second).

Deceleration
Compare the deceleration of the object (in pixels per second per second).

Gravity
Compare the gravity applied on the object (in pixels per second per second).

Is falling
Check if the object is falling.
Note that the object can be flagged as jumping and falling at the same time: at the end of a jump, the fall speed becomes higher than the jump speed.

Is grabbing platform ledge
Check if the object is grabbing a platform ledge.

Is jumping
Check if the object is jumping.

Is moving
Check if the object is moving (whether it is on the floor or in the air).

Is on floor
Check if the object is on a platform.

Is on ladder
Check if the object is on a ladder.

Jump speed
Compare the jump speed of the object (in pixels per second).

Jump sustain time
Compare the jump sustain time of the object (in seconds).

Ladder climbing speed
Compare the ladder climbing speed (in pixels per second).

Maximum falling speed
Compare the maximum falling speed of the object (in pixels per second).

Maximum speed
Compare the maximum speed of the object (in pixels per second).

Behavior expressions

Expression Description
Object.PlatformerObject::Acceleration() Acceleration
Object.PlatformerObject::CurrentFallSpeed() Current fall speed
Object.PlatformerObject::CurrentJumpSpeed() Current jump speed
Object.PlatformerObject::CurrentSpeed() Current speed
Object.PlatformerObject::Deceleration() Deceleration
Object.PlatformerObject::Gravity() Get the gravity applied on the object
Object.PlatformerObject::JumpSpeed() Jump speed
Object.PlatformerObject::JumpSustainTime() The time during which keeping the jump button held allow the initial jump speed to be maintained.
Object.PlatformerObject::LadderClimbingSpeed() Get the ladder climbing speed
Object.PlatformerObject::MaxFallingSpeed() Get the maximum falling speed
Object.PlatformerObject::MaxSpeed() Maximum speed

This page is an auto-generated reference page about the Platform Behavior feature of GDevelop, the open-source, cross-platform game engine designed for everyone. Learn more about all GDevelop features here.