The HP bars.

In the game The Summoning there will be a Demon player and a Human player, which will play against eachother. The Demon are able to spawn units and build buildings which can be commanded. To make this fair, the units will need to have something which indicates the HP, which is why a HP bar has been created.

The HP bars work in the same way as the normal HP bar for the Human, which means that they are Images on a canvas which can be filled. They will however hang above the units in the game, and not be static in the HUD. To do this we use the camera function WorldToScreenPoint, which is a camera function that returns the the position of a object in the world to where it is on the screen. By adding some extra space you can make the HP bar to hover above the units. This method have thou showed some complications, as the HP bar does not scale when you zoom in, and they seems to render above other HUD elements as well as trough the game objects in the game. The scaling has been worked on a little, as the bars scales up when zooming in, which makes it easier to see. But the bar is still to big and covers a lot of space on the screen. This will hopefully be worked on later, as it is a very little time left to work on this.hpbars

The HP bars.


Fyll i dina uppgifter nedan eller klicka på en ikon för att logga in: Logo

Du kommenterar med ditt Logga ut /  Ändra )


Du kommenterar med ditt Google+-konto. Logga ut /  Ändra )


Du kommenterar med ditt Twitter-konto. Logga ut /  Ändra )


Du kommenterar med ditt Facebook-konto. Logga ut /  Ändra )


Ansluter till %s