Introduction

How I Met Unity

Technically, I first started programming on a TRS-80 in my junior high school library, but really I just typed in the same BASIC code listing from a magazine every day until the librarian mentioned I could save the program on a cassette. I’m embarrassed to recall my first reaction when I heard the library had a computer: “What’s it good for?”

A year later, I saw the light when I got my hands on an Apple II. After cracking open the user manual and learning how to draw graphics in BASIC, I was hooked. Soon I was writing Reversi games (one in BASIC, one in 6502 assembly) and even a 3D wireframe display program.

In the intervening years I wandered the Windows wasteland and worked in small and large groups developing computer graphics and games. But fast forward to six years ago, when I happily got back into the Apple fold (now with Unix!) and attended my first Apple World Wide Developer Conference. Joachim Ante, one of the cofounders and the CTO of Unity Technologies, gave me an impromptu demo of Unity 1.5, and it was exactly what I’d been looking for—an inexpensive 3D game engine that ran on a Mac and was able to target multiple platforms, including Windows, Mac, and web browsers.

So I bought a Unity 1.5 Indie license as soon as I returned home (this was when Unity Indie wasn’t free), later upgraded to Unity Pro, and was pleasantly surprised a couple of years later that Unity would support iOS. I love it when a plan comes together!

In the meantime, my former employers at Hyper Entertainment granted me a license to port HyperBowl, a 3D arcade bowling game I worked on over ten years ago, to Unity and various platforms supported by Unity, so now I had a meaty project to work with, besides the smaller apps I’d been experimenting with.

It took me six months to get the first version of the HyperBowl remake running as a Unity webplayer, with standalone Mac and PC executables, and on the iPhone (and by the way, also Android, Linux, and Flash). And really, I only spent three months using Unity if you subtract the time I spent figuring out how to extract the art and audio assets from the original game.

With each new version of Unity, HyperBowl and my other games got faster and better-looking, utilized more iOS features and ran on more iOS devices (and, eventually, Android devices). I added capabilities using third-party plugins, a new pause menu, and even an entire new HyperBowl lane (level) with packages from the Unity Asset Store, which is conveniently integrated within the Unity Editor.

This has all taken place with a development team of one (not counting all the work put into the original licensed assets), and I didn’t have to learn a single line of Objective-C or create my own art. In a sense, I feel like I’ve returned to my programming roots, working on my own projects for fun, and as a bonus, profit! Hopefully, I can distill my experience with Unity over the past six years (both mistakes and successes) into this book.

About This Book

With any game development book there’s the problem of trying to be all things to all people; there are plenty of areas in game development, Unity, and iOS that could easily take up whole books in themselves. This book is an introduction to developing games for iOS with Unity, so my goal is to get everyone acquainted with Unity and moving into Unity iOS development smoothly, following the same progression I’ve made over the years (but in less time!)

On the way, we’ll go through step-by-step project examples to learn the Unity Editor and how to incorporate graphics, audio, physics, and scripting to make games, and then we’ll move on to developing specifically for iOS. We’ll take advantage of free art and audio from the Unity Asset Store, so we won’t be creating 3D models or sound samples from scratch and can stay within the comfy confines of Unity (except when we have to dabble in Xcode when making iOS builds). We will, however, do plenty of scripting with Unity’s version of JavaScript. Our focus will be on using the built-in Unity script functions, but I’ll point you to Unity plugins and packages that provide further capability.

You can find the source code on Apress.com at http://www.apress.com/9781430248750 or on http://learnunity4.com/.

Explore Further

No one knows everything. That’s why a key to successful development is knowing how to find the tools, assets, information, and help you need. So at the end of each chapter, I’ll suggest some reading and resources for you to explore further.

I’ll start here, with a recommendation of other worthwhile Unity books. Even on the same topic, it’s useful to read different books for their different takes on the subject. For example, Will Goldstone wrote one of the first Unity books, Unity Game Development Essentials, Sue Blackman’s Beginning Unity 3D Development is a hefty tome from an artist’s viewpoint that presents an adventure game, and Jeff Murray covers Unity iOS in Game Development for iOS with Unity 3D, using a kart racing game as an example.

Since I waxed nostalgic on Apple computers, I should follow up with some Apple historical reading. Revolution in the Valley is a fun collection of Mac development anecdotes by Andy Hertzfeld. iWoz by Steve Wozniak is an interesting peek at early Apple history and at the Woz himself, and Apple Design: The Work of the Apple Industrial Design Group by Paul Kunkel portrays the lineup of classic Macs (and by classic, I mean everything before 1997).

Although this book makes heavy use of example game projects, there won’t be much discussion on game design. But there’s certainly a lot of interesting reading on the subject. My favorite game design book is Richard Rouse’s Game Design: Theory and Practice, mostly a collection of interviews with famous game designers. And there’s a bounty of game design articles and blogs on the web site Gamasutra (http://gamasutra.com/).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset