Saturday, March 29, 2014

2 Week Coding Project - Day 14 : Rebuilding the Raid Scripts

So, after taking a closer look at all the scripts pertaining to actual combat (CharacterScript, PerformsAttack, HasHealth, and Fight_GUI) I realized just how much I needed to change. From a coding standpoint, almost nothing was done in a way that would tie into the Main GUI. Because of this I spent most of the day trying to rewrite all of the scripts as efficiently as possible; and I think I got the brunt of it done. The only thing left to really do is to make sure the character's can be placed on the board, and that all the scripts tie into the Fight GUI's calls. Because I wanted to be efficient, I created uniform scripts for all the characters that check to see what value the character script has been given, and then they generate the proper information from there.

What this means is that now if you click on your character once it's placed on the battlefield, you can bring up a specialized menu for that character; which is minimal at the moment. Pretty much telling you what class and role that character is, and allowing you to perform its special attack. When you press the Special Attack button, it sends the current class and role as integers to the Character Script, which then interprets it and sends it along to the PerformsAttack script. The PerformsAttack script then checks the variables to see which ones coincide with an attack action and then sets that attack into motion.

The HasHealth script was updated so that it checks the integer value of the correct "characterLevel" PlayerPrefs file and then creates the right amount of health based on that value using a level multiplier. I wanted to get the level multiplier working for all the character attack scripts as well, but for now they are all uniform aside from the special attack. The enemy works in a similar fashion, it is given a bonus level and then that is taken into account when calculating its health pool. Because of this, it will be easier to create "hard mode" versions of the dungeons.

I need to create the enemies attack pattern still. I also need the characters to be movable when they are selected one at a time. For now the whole group moves as a unit, which is obviously not the way I want it to be. Both are simple to do in theory, but will take me a while to get done. That being said, with the rest of the fleshing out that some of the scripts need done, I'm going to say that I should have the prototype working as intended (for the first prototype at least) and that I will still try and release it by Sunday night; hopefully by midnight. I'm a little disappointed it's going to take me at least an extra day to finish the prototype; but when I look back at everything I learned, created, and replaced, I realize it was a large undertaking for a 2 Week Project. I'm just happy that it's coming together finally and I'll have something to show for all my work. It really has been a great experience.

No comments:

Post a Comment