Ammo Count Feature:

  • When the player is out of ammo, provide feedback through on-screen elements or sound effects. (ie:beep or ammo count displayed on screen)

Solution Steps:


Shield Strength feature:

  • Visualize the strength of the shield. This can be done through UI onscreen or color changing of the shield.
  • Allow for 3 hits on the shield to accommodate visualization.

Steps


Thrusters move the player at an increased speed when the ‘Left Shift’ key is pressed and return the player to normal speed when the ‘Left Shift’ key is released.

Receipt

  1. If the left Shift key is depressed, increase the speed variable.
  2. Write a condition that checks if the left Shift key is pressed up.
  3. If the left Shift key is pressed up, set the speed variable to the default value.

Solution


Before you build your game in exclusive full-screen mode, you should first think about adding an exit feature to your application, otherwise there will be no way to exit the game or close the game window.

This is easy to do, just use the condition and check the input key for “Escape” and then use the “Quit” method of the “Application” class:


The option to upload and host games to the web gives us the ability to share games easily. It’s certainly much easier to send someone a URL link than a large file that you have to download first before you can run it.

To start publishing to the web, open “Build Settings” and change the platform to “WebGL”. Then click on “Switch platform to WebGL” and the project will recompile.


One of the best moments of game development is when we can finally build and test our game. To deploy a game in Unity to desktops (Windows, OSX, Linux) we must first open the build settings from “File/Build Settings” and select the platform.


Adding sounds to Unity requires little code, just create a variable for the sound source and play it in a method based on some event or condition.

The easiest way to play audio is to attach it to some object when it appears. Simply add an “Audio Source” component to…


To make a game a complete creation and add excitement to it, you need to add music to it. Fortunately, in Unity it is easy to add background music to your project.

Adding background music

  1. Add to this object a child empty object and name it ‘Background’.
  2. Add to ‘Background’ object, an ‘Audio Source’ component.
  3. In ‘Audio Source’ component, add an audio file to the ‘AudioClip’ field and select ‘Play on Awake’ and ‘Loop’.

Just a few post-processing effects can completely change the look and feel of our game. Let’s try out two effects that can add a nice look to the game.
The Bloom effect is nice to add some light to our scene. It is a fairly easy to configure.


Unity provides post-processing and full-screen effects that can enhance the appearance of your application. You can use these effects to simulate physical camera and movie properties or to create stylized visual effects.

Installing Post Processing Package

To start using post-processing, you need to install a package under Package Manager window.

Damian Dąbrowski

Hi, I’m Damian, a Unity Software Engineer who loves building education and simulation games.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store