Wednesday 2 May 2012

Health system...

The health system would work in a similar way where the script would look to see if the collider of the sword or skeleton are colliding with the player, if so they will trigger the health system to update the amount of lives.

Originally the health system was to be displayed in an array, which is a number of images that a script can run through to display on the screen. The starting images would be Gutsy's health bar in the top left, with a full meter of hearts. Once the collision takes place with the enemy the array will update to display the next image of a lesser health. This system in theory was ideal, but hard to implement, due to errors conflicting with other scripts for an unknown reason and a lack of experience on my part.

I then decided that we could not use this system. As I knew I could operate the pickups system, to display a value. I decided to display the lives in the same way. The idea would be similar to the Crash Bandicoot series with a logo for the player in the top left, then followed by the number of lives. The lives will be displayed with a 'guiText', this is a layer of text that can be displayed on screen and aligned to any part of the screen. The logo displayed as a 'guiTexture' would be displayed before the 'guiText' to show what the number indicated.

Here is an early build of the game demonstrating the enemyAI script and the health system:


In the video you can see the enemyAI script is working correctly and they are colliding with the player and each other to prevent and glitches in the gameplay. Once they reach the player they will stop within a certain distance and attack and take damage. This however only worked with the gui.box health shown in the top left. This was later adapted to work as a counter as mentioned above.
The camera in the video is the default unity camera with a default smoothfollow script attached with the target set as the player. The height and the distance from the player were edited to my liking.
Since looking at Spiral knights while researching influential games I implemented a script to make the player rotate towards the mouse, i found this a good addition and after a few problems with the scripts it got it to work with an adapted move script for the player.

Here is is a screen of the build when I had implemented a few other elements: 


GUI
In this image you can see the three health systems. Top left shows the default gui.box used purely from script indicating the players heath and the enemies health in two bars, displaying 1 health point to 100. This was functional but could not be customised with the current script. The top left displays my second version of the health where the gui.texture was used displaying gutsy's hearts in an array. This as mentioned above did not function properly and therefore a counter system was used.

ENEMY
The skeleton models were imported as fbx files through Maya. To test the anchor point of the model and to make sure it would move correctly.

SCENE
The scene shows a basic layout of our game level. I modelled basic geometry before receiving the concepts from Ken to test them within unity with colliders added and meshes imported.


No comments:

Post a Comment