Problem: A Round of Ground Pound for Everyone!
Reported By: David Tarnowski
October 5th, 2023
THE PROBLEM
Figure A: The problematic block of code
During recent playtests, a glaring issue with the ground pound ability was detected. While the ability was designed to devastate enemies within its damage range, we noticed that it was unfortunately a double-edged sword. It killed every character within its effective radius, including the very player initiating the ground pound. On digging into the root cause, I pinpointed the culprit: our OnTriggerEnter()
function.
This function was designed to detect collisions and then perform checks based on the tags of the colliding objects (Figure A). We did this in the hopes of being able to use the functionality for both enemies and players. Ideally, it would discern between enemies and the player, but due to the fact that it was called upon every collision, both if checks - one for the player and one for the enemies - were being passed. This, in effect, was leading to a catastrophic outcome where everyone, without exception, was getting eliminated.
THE SOLUTION
Image B. Shhhhhh. Go to sleep.
In response to this, I revamped our collision handling logic. To ensure a more discerning and specific response, I partitioned the OnTriggerEnter()
checks, delegating them to two separate scripts: one for the enemy and another for the player. This segregation ensures that only the relevant tag check gets triggered based on the character involved in the collision.
With this new structure, the ground pound ability now works as originally intended. The player can execute this ability without fearing self-destruction, and enemies caught within its radius face the anticipated consequences. This modification not only addressed the gameplay issue but also enhanced the game’s overall experience, making the ability satisfying and impactful to use (Image B).
As we continue our journey of refining the gameplay mechanics, we remain committed to ensuring that every feature, big or small, performs at its best, offering players an engaging and seamless experience.
Get Psyche
Psyche
Welcome to your next great souls-like adventure!
Status | In development |
Author | Sad Ogre Studios |
Genre | Role Playing, Adventure |
Tags | Atmospheric, Fantasy, Indie, mind-bending, psyche, Sci-fi, Singleplayer, Souls-like, Third Person |
More posts
- Problem: Harder Isn't Always More FunDec 14, 2023
- How to make the controller feel more responsiveDec 14, 2023
- ModelMayhem: A Programmer's TaleDec 08, 2023
- Problem: Face Your FearsDec 03, 2023
- Time to show our real main characterDec 01, 2023
- Problems: melee combat system is too boringNov 24, 2023
- Problem: Frames Win Games?Nov 17, 2023
- Problem with camera transitionNov 16, 2023
- Combo Attack systemNov 11, 2023
- Problems with code reusabilityNov 03, 2023
Leave a comment
Log in with itch.io to leave a comment.