Training Center

Knights 3D Game

Knights 3D Game

Learn how to create an arcade minigame that you can customize with your own sounds and models! Punch knights out of the water, whack-a-mole style. In the process you'll learn about collision detection, raycasting, the Input class, the GUI system, very basic enemy AI, and designing and scaling a dynamic level system with javascript.

 

Learn about the project and get your playing area set up correctly.

Additional Info

  • Runtime 02 min 02 sec
  • Software Unity
Login to download project files

We setup our scene with a camera and a pool of water.

Additional Info

  • Runtime 02 min 32 sec
  • Software Unity

We import our knight model and orient it correctly in the game world. We'll have to texture it as well using the provided material.

Additional Info

  • Runtime 01 min 46 sec
  • Software Unity

We're going to change the default arrow cursor to a boxing glove that animates when the player clicks down with the mouse. We'll use the Screen class, the Input class and a GUI Texture to achieve this.

Additional Info

  • Runtime 10 min 04 sec
  • Software Unity

We've disabled the default cursor and added an animated GUI Texture replacement, but we still need to make it move around the screen using the Input class to access mouse coordinates.

Additional Info

  • Runtime 02 min 38 sec
  • Software Unity

We need to reward the player for hitting the enemy. A great way to do that is to add visual and aural effects to that event. In this chapter we add an explosion force after an enemy's been hit.

Additional Info

  • Runtime 05 min 21 sec
  • Software Unity

The enemy knight will be propelled upwards using Unity's physics system. We'll have to use the rigidbody component and the Physics class to create this effect.

Additional Info

  • Runtime 05 min 59 sec
  • Software Unity

Here we add sparks to an enemy hit. This utilizes prefabs, timeouts, and an ellipsoid particle system. We'll experiment with spark-like particle settings, but feel free to create your own!

Additional Info

  • Runtime 07 min 09 sec
  • Software Unity

Another effect to add to your “enemy hit” event is a metal impact sound. This uses the Audio Source Component and a prefab with a timed object destructor script.

Additional Info

  • Runtime 03 min 15 sec
  • Software Unity

We give the enemy a voice in this chapter by adding brief grunts and statements that get played at random once an enemy's hit. We'll use Audio Sources again, but we'll also create custom scripts to randomize the audio clip and the clip's pitch.

Additional Info

  • Runtime 10 min 44 sec
  • Software Unity

The knights are sitting ducks at this point, so we add some lateral movement and vertical bobbing above and below the water plane.

Additional Info

  • Runtime 05 min 05 sec
  • Software Unity

We have to create a system of levels that spawn more and more knights as the game progresses. We'll have to track the total enemies in play and then instantiate more enemy prefabs once they're all gone.

Additional Info

  • Runtime 13 min 39 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.

©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