top of page
Search

Player HUD

  • Abbie Hipwell
  • Jun 12, 2022
  • 2 min read

Updated: Jun 13, 2022


As I had coded the stamina, it was time to create a stamina bar - and with this an ammo count. I made many iterations of the ammo count, as this changed with the feedback we had from the playtest ...


My original ammo bar displayed three canon balls which Harrison had textured, in the bottom left of the screen - although this worked very well it became clear that the players wanted something which conveys the ammo count in a more interesting way.



My initial code for an ammo bar is a progress bar which is bound to a function which changes how much ammo is displayed based on its count.



This function would take the amount of ammo which the player had, setting a percentage depending on each one. If the player had two canon balls to shoot, the percentage of the progress bar would be set to 0.6, meaning only two canon balls would be shown.


Here is the original code for this:



After our feedback from the playtest, Harrison created more UI for me to add onto the player HUD, he created his version of the HUD in Photoshop, which I then implemented into the game. The HUD was now looking a lot nicer and felt more intuitive, as opposed to how it was before - the viewports no longer looked too cluttered.


He created four different icons for the ammo - each one showing the player how much ammo they had left, this stops the player from being confused as to why they can't pick up anymore ammo, they now understand that the limit is three.




I had to code this differently to how I created the previous ammo bar, I couldn't use a progress bar for this as there were four different pictures, this meant that I had to overlap these images and set their visibility to hidden.


The branches would then determine how much ammo the player has, for example if the player had two canon balls, the visibility of 'Ammo 2' image would be set to visible, while all others remain hidden.



This is how the ammo bar would look without any canon balls - this is much clearer than what we had before ...



This is how the finalised Player HUD looks ...





 
 
 

Kommentarer


bottom of page