Thursday, March 21, 2013

Pathfinding, GUI and Combat

Yesterday (20th March 2013) I started working on research for putting pathfinding, GUI and combat into Unity for the students. I worked from 2:30pm to 7:00pm then 7:30pm to 12:00am (10 hours -phew!) researching and developing software to allow the students to move enemy to find the player, GUI technology to show score, ammo and health on their display and then mount a gun and fire projectiles.

Below are some screen shots of the work.

Attached is the resource I developed.

This is part of the code to allow the enemy to find any object the student wants to drop into its properties.

This is more of the code and is called every 3 seconds to relocate the player.

Here is the path finding in action, using a Grid Graph to draw a path to the player.

The student is instructed to attach a gun to the player, then add a nozzle displaced along the barrel  to provide a launch point for the bullets.
With the gun socketed to the player object and the projectile code in place the player can now loose off a few rounds.


Using NGUI the student can easily customise their own UI to meter vital statistics in the game.
Once the student has exported the font they want, they can the assign it to an Atlas map and place UI elements into the game.