Wrapin' Up the Bonus System
The weirdest thing is happening, I'm finding I don't want to blog because I'd rather save my energy for actual development.
WTF is happening to me?
So anyway, I've hit a pretty major milestone that I didn't realize would be a major milestone because I thought this system would take maybe a week or two tops to develop but it's taken way longer than that. Though to be fair i've been working on it off and on and developing various bonus systems as we went along. It's easy to look back with 20 20 hindsight, but the fact is we didn't know all the things we needed this system to do when we started it and the only way to realize it was to revise it time and time again as we discovered new bells and whistles we needed along the way.
What made the bonus system complicated is when you think of a bonus, you think of something that makes you do something better.
Sometimes that thing is a multiplier and you need it to start at 1 and increase from there, and sometimes you need it to start at 0.
Sometimes you want that value to display as being 150% as strong as before, and sometimes you want it to say "Increases a property by 50%".
And often times we need multiple bonus modifiers per bonus. Like the bonus "Charger's". Which increases your charged attack damage, but also causes you to grow in size to be a bigger target for enemies by a % and it also reduces your charge speed by a modifier of that value to.
So you end up with 3 properties, the primary property defines how much extra damage your full charged attacks do. The secondary property is a constant that makes you grow 50% larger when charging, and the third property is a negative and lower modifier that reduces the rate that you charge attacks.
The problem with reducing a multiplier is it's not a straight linear mod to offset a multiplier that starts at 100%. You must first reduce the value by 1, then modify the value, then add 1 back to the value.
This requires me to have a several custom properties to be set per variable that allow all these properties to be easily shown numerically as a visible number in the bonus description while also having the proper value calculation at runtime.
That means that in order to display the right values that I need options displaying these values as a multiplier which means rounding them and multiplying them by 100.
Anyway, it doesn't sound like TOO much work here, but it took me quite a bit of work and time as i'm fairly new to making tools like this, but I'm now VERY happy with the whole system came together and I'm able to debug the values generated for my bonuses right in the editor in runtime!
I feel crazy saying this, but I think we may have created one of the very best systems for creating bonus values for an RPG ever. It makes setting them up super easy, and it's a breeze to see in real-time what the bonus does. without having to debug in the editor and mess around too much. "It just works".
Just before making this blog post I was going in to investigate a bug since revising my Enum list (GOOD GOD DON'T GET ME STARTED ON FUCKING ENUMS, ABSOLUTE TRASH SYSTEM THAT I ADVICE PEOPLE AVOID LIKE THE PLAGUE for any system that's used for storing skill data that you might ever revise for any reason at all. You're much better off devising your own list system that uses custom string you create from scratch. I'm actually dumbfounded that we're making games in 2024 and Enums are so sh*t and don't come with some kind of warning.
It never ceases to amaze me how SHIT many of the tools we just mindlessly use are in gamedev. But this is the quality of workflow with so many insufferable neckbeards who don't want to improve anything and would much rather horde their personal knowledge and keep everything broken. Or much more likely are incapable of fixing anything and would much rather just sit in their high tower and pretend to be above it all.
I know these random outbursts may sound absurd to people who have never had to work with coders, but holy crap am I f*cking tired of all these know it all, do nothing neckbeards out there ruining this industry.
Anyway. There was a bug causing the bully bonus to trigger on every single attack and after quickly investigating it, I was able to see immediatly that the bonus type was set to "Multiplier Start at One" which was wrong, and it should have been set to "Multiplier Start at Zero", otherwise it would always have a 100%+ chance of triggering. To be fair it shouldn't have been triggering every hit, because it only should have a chance of firing on stunned enemies, BUT GUESS WHAT OTHER BONUS WAS BROKEN?
Blackjack. This gives all hits a chance to cause stun.
The reason all of these were broken is because I recently changed the enum list to be in a better order and be less bloated but because ENUMS SUCK D*CK, any changes you make to an enum list we totally F*CK all the existing data you have set up, because to my knowledge there is no way to get the assigned variable to be tied to the string element of the list system, and it always defaults to the numeric index. But I digress.
Enums have haunted this project for years now, and borked so many systems and caused me to pull my hair out so many times. At this point it's my fault for using them and not migrating to some sort of improved custom solution based on strings. I'll add it to the todo list.
Another thing I want to do is break these bonuses into similar groups so it's easier to correct setting mismatches easier in the future should anything go awry again. So i'll be modifying the logic to allow for several sub folders where upgrades that share similar setups for their bonuses and their displays can easily be group selected and edited in tandem.
Whew, I was gearin' up to get to work, but feeling kinda beat as I finish up this blog. Think I'll hit this hard tomorrow. We got our blog done, we got our head back into the game.
AND OH SHIT! I ALMSOT FORGOT! We got this add on that was on sale called "Hot Reload" and holy shit our compile times went from like 10 seconds down to .25 seconds a great deal of the time! Most times I'm making a change i'm just adjusting one little value, and now we no longer have to wait ages for changes to take place and we can even make them at runtime!
I'm a little embarrassed I didn't already have this in my project as it's such an incredibly huge boost to our productivity. Oh well, better late than never!
If our health holds up, should be a banger of a week! Excited to mark through this f*cking muck and madness and whoop some ass! We're goin' strong after all these long years! And I couldn't be more excited for the future of the project.
So often I get in my own head. "Oh gosh, the demo won't be perfect, we've spent 7 years getting all this crap online then we're going to fall face first at the finish line and throw some assets together and barely get it out there?"
"F*CK NO!" Sure we're a bit burned out, but at some point in the near future we will be done with these key systems and all that will be left will be to polish the ever-living shit out of all the abilities and enemies and armor and rings and weapons and bosses (that aren't even in the game yet!"
SO MUCH FRIGGIN' STUFF TO DO! But in the most awesomely exciting way :D
We really reached deep the past years to give us a solid foundation to build on, and now we get to reap those rewards as all the fun stuff comes on line! And all while everyone else blew smoke up each others' asses, played their petty games, cowered in the corner and let this world go to hell.
Excited for this game to come online soon!
Get SeaCrit
SeaCrit
Deceptively Deep!
Status | In development |
Author | illtemperedtuna |
Genre | Action, Role Playing, Shooter |
Tags | Beat 'em up, Casual, Indie, Roguelike, Roguelite, Side Scroller, Singleplayer |
More posts
- A Mi Manera12 hours ago
- We gotta get some thoughts together2 days ago
- Blah, blah, blah3 days ago
- We Back5 days ago
- Down to Donkey Park6 days ago
Leave a comment
Log in with itch.io to leave a comment.