GameDevHQ Crash Course Day#8 User Interface for Facing the User…Data

Jason Dixon
2 min readMar 20, 2021

--

Beginning 2D space Shooter-User Interface

so as good as having the unity editor showing me data is, when having a finished product that won’t help anyone, so lets add some UI to show our lives and add a score for enemies killed.

Screen Real Estate is a bit thing for games, having your User Interface meaningful and minimal is important to many faster paced games as you don’t want them to be distracting, where as in slower strategy games you can make the UI larger to display more information as the player can take their time to process everything before making their decision. In our case we are making a fast paced space shooter, so I don’t want huge honking and flashing UI, so a small display to show lives and and score should be enough, I don’t want to put the lives at the top as that is where the enemies spawn and I do not want to be overlaying that information, the score however is mostly see through and having an enemy spawn there shouldn’t be invisible to the player. but will readjust if that becomes the case!

ooo lives

There we go, now we are getting there, for this UI I have everything under a single Canvas in unity, Then added an image file which I proceeded to add the lives images and some text components for the score.

UserInterFace Code

Add a bit of code to talk to those components and voila a working interface.

--

--

No responses yet