Implementing Kinematic System
With my last post, I figured it'd be good to clarify how I implement this Godot kinematic system (GKS). The system has a process method that is not one of the standard pre-made methods. It is a process method called in its parent _physics_process method and does the following steps:
- Receive input - the kinematic body should have a handle_input() method and if it does, the GKS calls it.
- Apply input & forces - the GKS takes the applied input and applies proper forces, including gravity. If there are maximums we care about (i.e. max walk speed or terminal velocity), we call a method to clamp these values.
- Pre-move - I've designed the system to have two methods to let the body do stuff just before and right after the move. The kinematic body should have a pre_move() method where they can put anything they want the body to do before the move.
- Move - the GKS checks the collisions before the move and records them as the previous state. The body's move_and_slide is called and then the checks are done again and recorded as the current state.
- Post-move - This is the same as pre-move but for... you know... post-movement.
School's Out Remake [Project Postponed]
Status | On hold |
Author | MPStudios-Old |
Genre | Platformer |
More posts
- Project Postponed/On HoldJan 26, 2022
- Developed Premise for the GameJan 17, 2022
- Lighting Added to the ShadersJan 15, 2022
- Color, Pixel Art, & PerfectionismJan 14, 2022
- Dialog SystemJan 12, 2022
- Progress in Health System & EnemiesJan 12, 2022
- Kinematics System ConceptJan 08, 2022
Leave a comment
Log in with itch.io to leave a comment.