A small modification to Platform.c
implementing walkable stairs in platformer mode.
- Eject the engine from your game.
- Copy the file
Platform.c
from the folderStairClimbMod/assets/engine/src/states/
in this mod to the same folder in your project. For example:YourGreatGame/assets/engine/src/states/
- Add stairs to the collisions in your game.
In this mod, stairs are represented by a combination of collision types.
Type of Stair | Collision Combination |
---|---|
Climbed from the left | Collision Left & Ladder |
Climbed from the right | Collision Right & Ladder |
When the engine sees these collision types placed together it interprets it as climbable stairs.
NOTE: This means that the player cannot stand on top of these stair blocks. Instead, a platform can be placed right below them.
Please check out the example project included here to see exactly how they work.
- Sometimes a player may pass through a climbable stair instead of climbing it. This is unusual, but happens.
- All climbable stairs are also ladders.
- Climbable stairs cannot also be solid standing surfaces.
This game was built with GB Studio 2.0-beta 5. I'm not sure if it will work with other versions.
- Code and sample project by Paige Ashlynn.
- GB Studio is created by Chris Maltby and others.
This mod may be used in your own games, including commercial and proprietary games.
See the LICENSE
file for details.