Training Center

"Asteroids" Game - Part 2

"Asteroids" Game - Part 2

In this module, the second of three parts in the Asteroid game creation track, you'll create a system of levels and dynamically spawn asteroids, modify the laser beam, and add an in-game GUI for total lives, asteroids remaining, and total score.

We further develop the asteroids game from an earlier module, adding dynamic asteroid spawning, modifying the laser, and adding a GUI for total lives, asteroids remaining, and total score.

Tagged under

Additional Info

  • Runtime 03 min 37 sec
  • Software Unity

We'll create a new function to handle the asteroid spawning, adding asteroids in random positions and sizes throughout the play area and giving us control of how many we want to spawn each level.

Additional Info

  • Runtime 21 min 06 sec
  • Software Unity

Now we utilize our asteroid spawning function to generate asteroids at the beginning of each level. We set up the level system and dynamically spawn asteroids based on the current level.

Additional Info

  • Runtime 20 min 10 sec
  • Software Unity

We need to fine tune the laser beam to spawn at a more suitable location on the ship model, and we also need to destroy it once it's offscreen.

Tagged under

Additional Info

  • Runtime 07 min 23 sec
  • Software Unity

The spaceship is currently part of the hierarchy at the game's beginning. We set it up so it's instantiated from a prefab at game start and after player death.

Tagged under

Additional Info

  • Runtime 09 min 29 sec
  • Software Unity

We add a simple firing sound effect to every laser beam fired by playing a cached audio clip.

Tagged under

Additional Info

  • Runtime 08 min 03 sec
  • Software Unity

We'll set up the system for detecting when the asteroids are all gone and incrementing the levels accordingly. We'll also trigger and fine tune the asteroid spawning script.

Additional Info

  • Runtime 06 min 18 sec
  • Software Unity

We'll set up the framework for creating a GUI for your asteroids game that gets information from all the variables you want to display onscreen, including remaining lives, score, and remaining enemies.

Tagged under

Additional Info

  • Runtime 13 min 36 sec
  • Software Unity

"width:100%;height:400px;" class="mceEditor">

We'll set up the remaining lives GUI by creating a plane with a heart texture, detecting the camera's viewport, and creating a way to consistently place the plane within the viewport.

Tagged under

Additional Info

  • Runtime 11 min 29 sec
  • Software Unity

We position the lives counter plane objects based on current player lives, giving an accurate readout for the player.

Additional Info

  • Runtime 10 min 18 sec
  • Software Unity

ols="40" rows="5" style="width:100%;height:400px;" class="mceEditor">

We'll set up the “score” and “remaining enemies” GUI by using 3D Text Meshes and a similar positioning technique as the “remaining lives” GUI.

Additional Info

  • Runtime 11 min 04 sec
  • Software Unity

We tie in the “score” and “remaining enemies” GUI to the actual values in our game, giving the player an interactive GUI readout of their game performance.

Additional Info

  • Runtime 13 min 49 sec
  • Software Unity

Chapter List

Questions? ¿Preguntas? 有问题吗? Domande? Вопросы? 質問はありますか? सवाल? الأسئلة؟
This email address is being protected from spambots. You need JavaScript enabled to view it.

About design3

design3 is THE game production web portal. Whether you’re an industry veteran keeping up with new tools and trends or an aspiring developer searching for professional training, expert advice and career tips – design3.com is where you need to be.

Sign-up for our newsletter!

:

Copyright © 2006 - 2012 design3. All rights reserved.

Sign In or Become a member

Facebook user?

You can use your Facebook account to sign into our site.

Log in with Facebook

LOG IN