Home Creators Posts Import Register Favorites Logout

Content

This week has certainly been an unexpected journey.

As I thought, including Damage Numbers has allowed me to do all kinds of playtesting and bug hunting; I simply didn’t expect to find the bugs that I found. Which, to be fair, I don’t expect to find most of the bugs that I find.

Adding damage numbers was pretty much as easy as I expected it to be. It’s more or less a particle system—not the built-in particle system that the GameMaker engine has, but functionally very similar—that spawns a bit of text showing how much damage the target took. The text rises slightly by decreasing it’s position on the Y axis, with its movement on the X axis randomized. A simple dropshadow effect for readability, and voila! Damage Numbers.

Now, the system isn’t perfect. Right now, as you saw above, walls produce damage numbers because they also run the damage handling code necessary to make the bullets destroy themselves upon impact which is extremely crucial in a game with this many bullets flying around the screen. Otherwise there could easily be some serious memory issues, and that would be Bad. Also, GameMaker isn’t exactly the greatest with scaling most fonts, so it looks a bit blurry. You’ve probably noticed this issue on the Game Over screen. But, like pretty much all visual elements currently in the build, It’s Good Enough For Now.

The best part is that the code already supports rescaling the damage number when you get a Critical Hit.

The size is dependent on your Overcrit rather than the actual raw damage, to be clear. If my base damage is 500 or something ridiculous, it will show the damage number at the exact same size as if it was only 1.

But I mentioned bugs, did I not? And oh boy, were there some bugs that I found.

First of all, the Overcrit system resulted in unintentional exponential damage output, not linear. This is a problem because it means that there was literally no way to make a character build in this game that would be anywhere near as good as increasing your Critical Hit Chance to over 200%. While I could simply limit your Critical Hit Chance, that feels against the spirit of letting players create procedurally generated absolute nonsense character builds and bullet hell nightmares to slaughter enemies with.

I also discovered a strange problem when shooting the walls. If you happen to hit two objects simultaneously, they both run the damage code on the same bullet, which makes sense. What I had not realized is that if, for example, I increased the damage of the bullet because of a Critical Hit, then whichever object the engine has run the code second will already be taking the Critical Hit Damage and could possible crit again.

Both of these problems had the same solution: a temporary variable in the bullet that stores the base damage of the bullet. The Critical Hit uses this number to achieve linear grown instead of repeatedly doubling or tripling the base damage, and at the end of the script I reset the damage back to the base damage, so the second object gets a clean bullet to work with.

Easy.

I also discovered another respawn bug, in that I was not properly resetting the player’s Critical Multiplier, so every time you died and respawned, your Critical Hits got stronger. This is not what I would call intended behavior, so I quickly fixed that too. Perhaps this was the source of the peculiar bug that I thought I saw last week that made enemies suddenly die? I may never know for sure.

Until next Devlog!

-DeusVerve

Special thanks to my Tier 3 Patrons, Haelerin and Christos Kempf!

Files

Comments

No comments found for this post.