Tuesday, 23 April 2013

Rad decals and Score system - Francis Coding

This week I worked on decals, fixed  some of Jye's code and added in a score system. I actually had a lot of fun with the decals.

--------------------◄|~☼~|►--------------------

I painted up a few dirt decals in Photoshop just to give the walls a bit of variation. The have a high opacity and look like dirt. Because of this I won't post them here. I will post the graffiti decals I did, because I think they turned out pretty rad. These are demos, the in game images have an alpha and lots of opacity.

Click them for full size images.







--------------------◄|~☼~|►--------------------

The high score system took longer than I thought. Mainly because I really struggled with the C# array syntax. I was really hoping there would be a simple function for sorting multidimensional arrays. Something like

multiDimensionalArr.SortBy( 2 ,);

Maybe I haven't been getting enough sleep, but I haven't been able to figure it out. The Unity3D api script reference doesn't seem to have anything helpful and the stuff on the mdsn Visual Studio site doesn't work in Unity. This is just something I'll just have to figure out and I'll probably feel dumb when I do.

While I overcome this bout of poo-brain, I've put in a simpler high-score system using an array which holds names, and an array that holds scores. I wrote an insertion sort function which orders the scores from largest to smallest and moves the names around to match. I just need to start using playerprefs to save scores to the registry and the highscore system will be done.



--------------------◄|~☼~|►--------------------


The latest development is we realized that our game is hella unoptimized and barely runs on the iPad.  Which isn't really surprising considering that none of us have put much thought into optimization or know much about it. Another student passed by and pointed out my draw calls. It's recommended that you have 20 draw calls for an iPad game... we had 80. So that's something we need to look at.

Francis Out.

Tuesday, 16 April 2013

Zombie Health Systems

Francis programming

This week I've managed to implement everything needed for zombie damage. Up until this point zombies have taken one hit and died, now they can take a number of hits depending on where they've been hit and with which weapon. I've just added tagged hit boxes to the zombie prefab seen below.
Instead of the gun script simply deleting any ray cast hit tagged as "zomb" it now calls a health script, placed on each zombie, with the tag of the hit box the ray has passed through.

Hits on the arms, legs or head will decrease the health value of the arm, leg or head hit and the main health pool, while hits on the torso will only decrease the the value of the main health pool. Any health pool being depleted will result in the zombie dying. The individual health pools of the arms legs and head are all smaller than the main health pool, so shooting these is more effective. It also damages the main health just so every hit counts towards the death of the zombie. Each limb has individual health to facilitate the dismemberment mechanic which will hopefully get implemented eventually.


--------------------◄|~☼~|►--------------------


Since last post I have also implemented, different bullet damage for each gun and penetration for one of the guns. Our railgun is now able to hit more than one zombie per shot. An unanticipated benefit of the penetration is that, not only can multiple zombies be hit, but multiple hit boxes in each zombie can be hit. Worst case scenario, this might result in the zombie taking four times the normal bullet damage, to the main health pool, if the ray passes through both arm hit boxes the torso hit box and the head(with each arm and the head subtracting bullet damage from their individual health pools and the main health pool).

I'm not sure this is entirely a bad thing. It certainly shouldn't be hard to program away, but at the same time, if balanced properly it could turn into a cool mechanic. At the very least it merits further discussion.



--------------------◄|~☼~|►--------------------


So that just leaves the score system, balancing and tweaking.

Francis Out

Tuesday, 9 April 2013

GUI and Ammo stuff.

Francis Programming

Since last post I've designed and implemented the GUI and worked on some peripheral gun systems.


--------------------◄|~☼~|►--------------------

For the gui I knew we needed something over the top, gory and kind of dumb. So my first stop for reference images was 90s fighting game huds. Primal Rage stood head and shoulders above the rest by using hearts veins, veins, brains and spinal columns as hud elements. I looked around at some iPhone games as well to see how people had managed the small screen size.

After establishing the elements I needed and my basic layout. I spent a bunch of hours drawing blood splatters. I think it turned out well.


Health - I'm really pleased with how these hearts came out.




Multiplier - Arm, leg and head icons courtesy of Georgina - This will appear when the player consistently hits arms, heads or legs. This will be invisible most of the time. The multiplier system hasn't been made yet so this element doesn't function yet.


Timer - This was the hardest to get right in game, because I've tried to simulate an led screen by putting grey 0s behind the numbers. This means I had to be a lot more precise in lining up the timer text with the timer image. This element will probably get ditched because it's really big.


Score - it's the score.




Weapon - This is the weapon icon and ammo counter. If the weapon doesn't use ammo the ammo counter and the blood splash behind it won't be visible. These weapon icons are temporary. I'll probably post again with those soon.

--------------------◄|~☼~|►--------------------

I also implemented a simple ammo system, fire rate and fixed the weapon select. Different guns have different fire rates, the fire rates of each gun need some tweaking and balancing but that system is in game now. The player can also run out of ammo and gets ammo from killing zombies.

I think we can actually call this a game now. So that's cool.

Francis
out.