Implementing a climbing system
Hi all!
Some time ago I implemented one of the key features for the exploration and puzzle solving part of the game. The climbing allows the player to reach different areas of the levels and will be also used for puzzle-solving and platforming. Jumping to reach climbing points feels great when testing the game and will probably be a key part of the game.
How does it work?
The climbing system is rather simple. Climbing points are implemented in so-called Climbable components. In the editor, I create and define these climbable points and the player is capable to interact with them in-game through the interaction system. Whenever the player interacts with a Climbable, it is smoothly moved towards the closest point of the climbable. From there, the player can navigate through the climbing points using the left or right input. While climbing, there is a speed restriction defined per climbable and no gravity is applied on the player. It is possible to exit the climbable by performing a small jump up in order to reach higher areas when there is no obstacle or simply let the player fall down. Images below show the in-game climbing system when the player is moving to the right and jumping up.
The interaction with the Climbable happens via trigger colliders. The player has an interactor trigger placed just in front of it and the climbable has another one. There is a separate system that keeps track of triggers overlapping the interactor of the player and whenever there is an overlap and the player presses the interaction button, the interaction starts if and when there is no obstacle in between the climbable and the player, otherwise you could go through walls!
In editor it was crucial to implement gizmos support and some tooling to make the creation of climbables easier and faster. Note that the level is full of climbing areas! Below you can find an image of how the climbable looks like in the editor.
The red boxes are the trigger colliders of the different climbables. The orange lines depict the direction in which the player will be facing. The climbable also accepts two facing directions depending from where the player innteracts. There is a purple line connecting the climbable points which is hardly visible in the image, but it is mainly a visual support to know the path the player will be following.
I have also implemented a tool to place the climbing points faster and easier. See image below.
With this tool you can create climbing points easily by clicking on the screen with the mouse and selecting vertices of the existing colliders. This way I could easily create all climbables for the ground and any other meshes in the level.
I hope you find this post interesting, as always, I appreaciate feedback in any form to improve both, the way I show the progress and to redirect the game development towards what you all would like to play!
Get 3D game project
3D game project
3D game development project using the OpenTK framework
More posts
- Implementing a spawnable attackAug 02, 2024
- New enemy visuals and covering mechanicJul 26, 2024
- Implementing an inventory systemJul 19, 2024
- Graphics upgradeJul 13, 2024
- Prototype level designJul 02, 2024
- Implementing world events and cutscenes systemJun 21, 2024
- How game development process looks like when using a custom-made game engine.Jun 18, 2024
- Testing stealth prototype game mechanicsJun 17, 2024
- Enemies field of view rendering and detectionJun 07, 2024
- Demo of the prototype available to download!May 25, 2024
Leave a comment
Log in with itch.io to leave a comment.