Training Center

"Asteroids" Game - Part 1

"Asteroids" Game - Part 1

This is the first of a three-part module on creating an Asteroids-like game. In this section you'll set up a moving player with laser weapons and fully destructible asteroids. Learn about collision physics, importing graphic assets, the Input class, audio sources, dynamic enemy spawning, limiting a playing area, the Detonator effect library, and how to create a star cloud to simulate 3D space within a 2D plane.

This is the first of a three-part tutorial on creating an Asteroids-like game. This part will teach you how to set up a player that can move using the physics system and fire lasers and how to set up destroyable asteroids in your scene.

Additional Info

  • Runtime 01 min 51 sec
  • Software Unity
Login to download project files

We import a ship model, add a texture, and give it a collider and rigidbody to facilitate physics interactions.

Additional Info

  • Runtime 05 min 41 sec
  • Software Unity

This section sets up the lateral rotation of the player ship. We use the physics system to add torque to the ship upon player input.

Additional Info

  • Runtime 12 min 08 sec
  • Software Unity

We enable forward and backward momentum on the ship with boosters. We add forward force upon player input, and we also tie in a particle system to illustrate the boosters behind the ship.

Additional Info

  • Runtime 14 min 37 sec
  • Software Unity

We finish implementing the particle effects in the booster feature so they behave as we'd expect them to.

Additional Info

  • Runtime 10 min 15 sec
  • Software Unity

We import and texture an asteroid object, and we give it some basic properties  setting up the framework for its dynamic creation and destruction later in the development process.

Additional Info

  • Runtime 09 min 03 sec
  • Software Unity

We create a laser for the ship to fire, and enable that firing upon player input. The laser is made up of a plane, a rigidbody, and a cube collider, is instantiated by the player fire button, and is moved by adding force to its rigidbody.

Additional Info

  • Runtime 10 min 56 sec
  • Software Unity

We'll add some acceleration to the laser beam and also detect when it hits an asteroid. We'll give the asteroid health and explode it once its health has been depleted from laser hits.

Additional Info

  • Runtime 08 min 29 sec
  • Software Unity

We'll spice up the beam/asteroid collision by adding explosions on impact and one big one upon and asteroid's destruction.

Additional Info

  • Runtime 13 min 58 sec
  • Software Unity

We need to set up collision between the spaceship and the asteroids and tie in explosions by adding colliders and using OnCollisionEnter functions.

Tagged under

Additional Info

  • Runtime 06 min 41 sec
  • Software Unity

To make this game more manageable, we'll limit the space in which the player can fly the ship.

Additional Info

  • Runtime 11 min 41 sec
  • Software Unity

Here we create a script to handle global game logic. For now we'll just use it to handle respawning after a player collision.

Tagged under

Additional Info

  • Runtime 03 min 22 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!

:

©2014 Design3 LLC. 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