Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

"Stop, Drop, and Roll" - Luke Cardelli | 10 November 2023

The Problem:

This week was one of those weeks where everything worked until it didn’t. As the team gets closer to wrapping development on the game, more and more systems and functions are beginning to overlap. Team members are now having more and more dependencies on others and as a result, more things are subject to breaking.

This week was tricky because while I was working on creating enemy reactions to specific elemental attacks, someone else was working on creating the attacks themselves. Individually, the spells and the reactions worked fine. It was when we merged them did issues arise.

The first issue was that the damage causer was not getting passed correctly so I had no way of checking which spell was causing damage. The second issue came in the form of what was causing the damage. What I mean by this is that the author of the spells themselves had multiple elements combined to create the full projectile. This took the form of a flying projectile and the AOE damage. Not knowing what to check for added to complication.

 

The Solution:

 I raised the alarm and got both Josh and Brandon on a call as they both had implemented some form of elemental attacks or elemental traps. The first thing we did was review the code. What we found is that the damage causer information was not being passed and therefor could not be checked. After some refactoring, we got all the elemental effects to pass the appropriate damage causer effect. From there, we reviewed what objects needed to be checked to determine what reaction the enemies should play.


<Reference Image of the Fire Trap passing in the Damage Causer information>

<Reference Image the hit reaction function conducting checks on all the possible elemental attacks>

After some trial and error, we were able to update the enemies HitReaction function. This ended up consisting of a handful of if checks to first determine who was the damage causer, the type of elemental effect, and then calling the appropriate response.

That being said, after some play testing, more work will be required in order to enhance the effects. The biggest outlier that needs the most work is the lightning spell. At the moment, the function is checking for the lightning bolt and ignores the AOE. Enemies hit by the lightning bolt will play a stun animation with the other enemies just taking in AOE damage. Instead, we plan to shift the check from the lightning bolt to the AOE so that all enemies within the AOE sphere get stunned.


<Reference Image of the lightning spell>

<Reference Image of the boss enemy getting stunned after lightning spell>

Support this post

Did you like this post? Tell us

Leave a comment

Log in with your itch.io account to leave a comment.