Wednesday, December 2, 2015

Capstone Week 15 - Level Importing, Backstab Hack, and Character Selection

This week was one hell of a week for getting work done.

First, I got the backstab hack card done. This one was actually fairly difficult as the attack that deals damage to a player had to know where the attack was on the player so it could check if the attack was a "backstab". This proved difficult as Unity has a weird way of handling angles on a player. So I had to do a lot of debugging and trial and error to find the correct way to go about this. The function is shown below for those curious.


Fun note: That question mark is fun C# operator I found out about called a conditional operator. Basically it tests whether or not the line of code to its left returns true or false, and returns the first option if its true, and the section option if its false. It is great for getting rid of pesky if-statements that only have one line of code in them.

I also fixed Character Selection so that it includes all of the hacks, viruses, weapons, and armor. Previously it had weapons, armor, and "terrain mods". The terrain mods no longer exist and obviously we need access to the other abilities for playtesting so this was a priority fix.

Finally, I also imported Mario's level he made in Axis Game Factory into Unity. It looks great, although it still needs some optimization on the Unity end so that it runs at >60 fps (hopefully).

No comments:

Post a Comment