Reader small image

You're reading from  Gamesalad Essentials

Product typeBook
Published inJan 2015
Publisher
ISBN-139781784391973
Edition1st Edition
Concepts
Right arrow
Author (1)
Miguel DeQuadros
Miguel DeQuadros
author image
Miguel DeQuadros

Miguel DeQuadros is a game developer and the founder of the independent development studio, Wurd Industries, based in Ontario, Canada. He has been developing iPhone games since the release of the App Store back at the exciting release of iOS 2.0. Since then, he has released 10 games and 1 entertainment app world-wide on the App Store with more to come from Wurd Industries. He was originally interested in 3D animation and graphical design, which he focused on mainly in 2004. But, he then got the game development bug and has been developing iPhone apps since 2008, which also allows him to use his creativity and knowledge of 3D animation for cut scenes and videos within his apps, and he is loving every minute of it. Starting from his first project, Toy Tennis, back in 2008, down to his current project, SpaceRoads, for PC, Mac, Wii U, and other platforms, he continues to develop high-quality apps and games alike. Moving away from simple game development tools, he now primarily uses Unity3D, 3D Studio Max, and the Unreal Engine for his current project in an aim to create very high-quality games. His games can be seen on the App Store on iOS, Steam Greenlight, Amazon, and IndieCity, and of course on his website, www.wurdindustries.com. His games have been reviewed on YouTube by Action Soup Studios, and you can also find his interviews there.
Read more about Miguel DeQuadros

Right arrow

Chapter 6. Diving In – Enemies

Would Super Mario be complete without Goombas, Halo without Grunts, or Portal without GLaDOS? No. No real game is complete without some solid enemies. That's just what we are going to work on in this chapter, because Kevin needs someone to stop him from rescuing Dom, right? Let's see what we are going to talk about.

  • Creating various enemies to make things difficult for Kevin

  • Making our enemies move, including a path finding system

  • How to make our enemies attack Kevin

  • How to give our enemies health and make them die too

Let's make things hard for Kevin.

Creating enemies


Let's start setting up our enemies. If you haven't drawn some up yet, no worries, you can use the ones I've created. Import all the enemy images into our project and create a new actor from the images. Open it up so we can bring the enemy to life.

First thing we should do is change his Bounciness to 0; we don't want him bouncing all over the place.

Secondly, we want to drag in a Collide behavior, and change the options so it's colliding with Any actor in the Platform tag.

If you want, you can de-select the Fixed Rotation option under the Physics drop down. This way, if your enemy falls off a platform, he doesn't flip around like crazy and fall flat on his face. For this guy, however, I am going to allow him to automatically rotate because when he reaches inclines and declines, I want him to rotate accordingly.

I also changed his Max Speed option to 250 so he doesn't start moving superfast.

Tip

Try this

Do you want an infinite horde of enemies instead of having to place them all...

Summary


Our game is getting more and more functional as we go on. Wow! We created some great enemies for our game. We even programmed a simple Artificial Intelligence system that helps them move around without pre-defining paths for them. Then we gave them health so that they can get hurt too! Let's be honest, Kevin is the one that is suppose to do the hurting, not just the enemies! Kevin has such a hard life.

We are almost done with the major mechanics of the game. In the next chapter, we are going to finish it up. We are going to look at doing some objectives, and then we will talk about what you can do with your game when you've finished reading this book.

On to the next chapter!

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Gamesalad Essentials
Published in: Jan 2015Publisher: ISBN-13: 9781784391973
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Miguel DeQuadros

Miguel DeQuadros is a game developer and the founder of the independent development studio, Wurd Industries, based in Ontario, Canada. He has been developing iPhone games since the release of the App Store back at the exciting release of iOS 2.0. Since then, he has released 10 games and 1 entertainment app world-wide on the App Store with more to come from Wurd Industries. He was originally interested in 3D animation and graphical design, which he focused on mainly in 2004. But, he then got the game development bug and has been developing iPhone apps since 2008, which also allows him to use his creativity and knowledge of 3D animation for cut scenes and videos within his apps, and he is loving every minute of it. Starting from his first project, Toy Tennis, back in 2008, down to his current project, SpaceRoads, for PC, Mac, Wii U, and other platforms, he continues to develop high-quality apps and games alike. Moving away from simple game development tools, he now primarily uses Unity3D, 3D Studio Max, and the Unreal Engine for his current project in an aim to create very high-quality games. His games can be seen on the App Store on iOS, Steam Greenlight, Amazon, and IndieCity, and of course on his website, www.wurdindustries.com. His games have been reviewed on YouTube by Action Soup Studios, and you can also find his interviews there.
Read more about Miguel DeQuadros