Member-only story
Last time, I shared an article on how I improved my shield powerup. It’s now time to work on an ammo counter. Infinite firepower is a feature of some games, but I want to include some limitations.
Create a replenishable ammunition system for the player. Include a way to display ammo information on the UI.
I had already planned for this feature in my UI.
The space UI element for the ammo counter is ready. All I need now are some graphic elements for the numbers.
Rather than using pre-made fonts, I chose to create graphics for the numbers. I had to make sure the numbers matched the style of the background art.
Afterimporting and slicing theSprite Sheet, I used individualImage Elements to place each number in the UI.
The Post Processing effects already help to make the numbers look illuminated.
Now comes the fun part. I created a newScript to handle my AmmoCounter. The first thing I added was twoSprite Type Arrays to hold my numbered sprites. The neat thing about this is that each sprite’s index corresponds with the number in the image.
Experienced digital artist, Unity game developer & coder with a knack for problem solving and a passion for video games.