Alright time for a real Weekly Update! The last one was just a relatively short list of overall changes I've made, but the updates from now on are going to focus on specific things or things I've just finished.
This one is about listeners. A listener is something I use in the game that allows something to happen when something else happens. That's a very vague term, but it's the shortest way to describe every listener. Basically a listener "listens" for something to happen, and it applies its own event as a result either through modifying the event it's listening for, or creating a new event.
For instance, Damage Reduction through a Passive Spell or an Item is "listening" for when you take Damage, reducing the damage as a result. Pretty much every Passive Spell and Item Special uses listeners, and even some Status Effects apply their own listeners. They're incredibly modular, meaning they can serve an extremely broad range of scenarios, making them very diverse.
So what does this have to do with the Full Release Update? Well I've completely overhauled how listeners are applied and used. The old game had code that I manually put in for when listeners are supposed to activate. For instance, when I coded listeners that listen for a stat change, I then had to go into the stat change code and put in the stat change listener activation. I did that for all the other listeners, and when I had an idea for a new listener I had to go through that same process. It was very tedious and not very efficient. I'm now using Flash's built-in event system, which allows you to dispatch events when something happens and run code as a result. My listeners are now "listening" for when these events are dispatched, instead of manual code inputted where the listeners are supposed to activate. Hopefully that makes sense.
So with the new efficient listener system, I've been able to expand my listeners and create a wider spectrum to have the capabilities to make things I couldn't before. There's now listeners that do something when a Buff or Debuff is applied, a listener that applies a party-wide bonus when an item is equipped, and listeners that apply or modify a stat change utilize a new priority system that ensures there's no weird issues that arose before.
There was a problem before that someone noticed with the Shatter Debuff. This Debuff converts all damage taken into Divine Damage, which sounds good on paper. Unfortunately, the Shatter was converting before other damage modifiers were processed, meaning they would Attack the enemy and their Attack Buffs weren't processed because the damage was converted. This means they were dealing less damage overall than they would've dealt before the Shatter. So I created a new priority system that allows certain listeners to process before others, completely negating this problem. That's just one example of the old code acting a little strange at some points. I'm hoping with this rework that listeners become extremely efficient, diverse, and fun to work with as well as play.
Alright, I think that's a good stopping point. I hope I helped you better understand the inner workings of my game. I also hope that I made sense in my description of the listener code, it has a lot of moving parts and may be difficult to grasp without actually seeing it in action. Next week I'll try to tackle something that isn't as difficult to explain or understand, but I really wanted to talk about this since I'm proud of the changes! See you next week!
