Sunday, August 12, 2012

Week 5 of Midterm

This week I was placed in charge of doing two very important things. One was to complete the weapon and fix the distance issue that I was having. The second thing I was placed in charge was Mesh-Swapping. They were both fairly hard but all I had to do was ask myself the correct questions then I figured it out. I finished to quickly that I was able to get ahead in things I wanted and needed to do. I now got all the enemies excluding the bosses in the game and working perfectly. I was also able to look back on Uno's attack animation and give him more. I will now need to ask the team if they want to make it so that Uno will do a random one of them or so that it is a sequence. I'm sure they will want to make it a sequence, but I just want to make sure I don't put a lot of time into something that will be changed right away because it is completely wrong from the start.

Fixing the issue with the weapon wasn't easy at first but once I figured out what to do like everything else it just falls into place and becomes child's play. My issue which I originally thought was that the problem was in the weapon not having a set range. Later, I found out that it was the actual AI that I had to change not the weapon. Once I understood that I just had to add a distance check between the enemy and the player. We originally wanted the enemy to look at Uno then 'charge up' then attack him so that the player would have enough time to react, but after finding out that there are limited animation that we can call I made it so that when the enemy see's you they will just do there normal running animation and when they get a set distance they switch to there attacking animation. I thought that 'We'll I can make it do the attack animation when they see you then freeze up for a little while then attack.' the only problem with that is that what if the player doesn't see the enemy and the enemy does. It will defeat the whole purpose if him having the delay to react. So then I thought what if I make it so that as soon as the enemy gets a certain distance he will stop charge then attack. The problem with this is that if the player decides to just run away slightly after the charge up the enemy would walk to that line and start charging up again. Shortly after that I thought about adding fuzzy logic to the distance. Fuzzy logic was mentioned in one of my previous posts in this blog, it is when you blend the line between two things like red and yellow it is orange in the middle and between orange and red is orange red but up to what time it will stop being orange and start being orange red. The reason I had for not implementing fuzzy logic is that it would still be the same. but if I set it to random all the time what would stop the enemy from stopping all the time because he is in that fuzzy distance. So instead of dealing with all the stopping I just decided to remove it all together until we figure out a better way to approach this.

This is the fixed enemy melee weapon.

The other thing I was in charge to do was Mesh-Swapping. Mesh-Swapping is when you have lets say a character and something happens like he changed clothes. instead of loading a completely new model you would just swap the current model for the new one. You can also do it so that you have a box and something happens in the game that would change that box into a sphere. We require Mesh-Swapping for this game so that the enemy would go from a number to zero. For example, if your fighting a number 5 you will hit him with the sword of subtraction then he would be subtracted by one then he would get Mesh-Swapped to four, because 5-1=4 and that would also be a indicator of how much health they have left. Just like the distance problem with the weapon I had to ask my self the right question and that was 'Ok what makes this model have it's certain mesh?' Then it hit me, you would just have to change the variable that makes him start off with the default mesh then you would set another variable to check how many time you hit them. I had a problem that since my weapon does absolute damage and drops health down to zero the game engine would say ok this enemy is at zero stop everything that it's doing or is going to do. What I had to do was make sure that I was able to check if the enemy took damage so it would just check that it's health isn't 100% then at the very end it would take the extra damage to kill it but I would have to give him full health so that the enemy doesn't continue to get changed. The problem with that is that you just can't subtract health from a enemy, you can give them health but not subtract it. I had to figure out some crazy way to call on the damage function and have him take the extra little damage that my sword missed. After I had it all figured out all I had to do was plug in some variables so that it can load the proper model. That is when I had to finish the rest of the enemies.

The first enemy is stuck in the attack animation and I haven't been able to get him out of it without breaking the model.


Here is the Color Wheel we decided to use for the Numbers. We skipped Blue, Red, Purple, and Pink because those colors are for the main characters and we want them to be special.


Here are the animations that I was able to come up with, because I had a lot of extra time to do them. The little white nub is where the weapon is going to be placed, however if will not be rotated that way I just had to curve it so that it gets positioned in UDK correctly.

(First Attack - Second Attack)
(Third Attack - Fourth Attack)
(Fifth Attack)

No comments:

Post a Comment