Hello world!!!
This bi-week was rather hectic… For everything but ARANA unfortunately.
Let’s talk positives first, I’m on break until the fourth of January! So I have time to finish the conversion of the AI to the new system. Speaking of which…
Progress report:
Not much this time around. But I do want to show an example of some of the new changes.
First, how is this new AI formatted compared to before?
Before, the AI was messy. I mean- Really, really messy. If I could describe it through a document:
-brain object
——had some of the commonly used variables used for enemies,
——had all collision,
——had a draw event for flashing effect for getting hit (all enemies needed to use it)
-individual enemy objects
——defined variables that most of the enemies were already using along with other msc tasks
——each with their own AI scripts (in some cases, copies of other scripts)
——each used different alarms (timers for attacking, reloading, etc) in inconsistent ways, making modifications to existing enemies more confusing than it should have been
——each used their own drawing event, even if the scripts were the same for each enemy
-wall collision was just bad…
You will notice the primary issue with this system. The individual enemies has most of the work, while the “brain” (technically called “parent”) is left with minute tasks.
This new system intends to push most of the load that each individual enemy had to the parent object. Thus, changing the system into this:
-brain object
——has some of the commonly used variables used for enemies,
——has a “master AI” script, with the sole purpose of being a templete for more complex enemies
——has most of the alarms for all enemies, still leaving alarms for more unique and complex enemies
——has all collision, with remade wall collision
——has a single draw event for all enemies
-individual enemy objects
——defines properties about the enemy, such as whether or not is uses custom movement
——uses small modular scripts to add to the AI
——occasionally can use a modular draw script if needed
So this system will make adding new enemies much less of a headache, more compact (and organized), and quicker to implement.
As an example of compactness, I have a picture of two initialization scripts for the same enemy. The left is before, the right is after.
Needless to say, it removes a fair bit of strain when looking for something in this script. It also just plain looks nicer.
With that said
That’s about it for this bi-week.
I’m still in the conversion phase of this AI overhaul. I’ve been running into some issues with some enemies from Arena 2, that are suffering due to bad programming choices…
Regardless, the next bi-week won’t actually be on the next bi-week, as I’ll be on break (hopefully from ARANA too). The bi-weekly updates will return on the tenth of January. Unless I get so much done that I’ll go ahead and do it the third, but that’s unlikely.
Anyway, with that said, Merry Christmas! And until next year!!!
0 comments