Thursday, 7 January 2016

Day 66: Health and Ammo

Today I continued work on my GUI and as I proposed yesterday, I finished the health bar and ammo text. Currently they are both working, and look really nice. It took a while to get the health bar in place, but once that was done, everything became quite simple. From there, I was able to use the coordinates of the health bar and text to help determine where to put everything else, and it made putting in the ammo text much easier as well.From there I had to edit the hotbar sprite to remove one of he gauges on the right side to accommodate some space for the ammo text. I added in a bit of a shaded background behind the text as well just to add some more depth. Also, while in debug mode, I noticed that there were many instances of the bullet objects as the game goes on, and I realized that they are just going on forever(which isn't necessarily good). I made it so that the bullets get destroyed if they travel a distance of 650 units away from the player in either the direction of left or right. That way I can help to reduce lag for the future. Tomorrow I will work on making a "selected weapon" type thing for the hotbar, in the sense that it is just showing what weapon is being used at the moment. So basically just a sprite that will hover over slots 1 through 5 accordingly.I just need to make a good sprite for it, and find out where to draw the sprites over each box.

No comments:

Post a Comment