Unity 3D Game Development by Example Beginner's Guide
上QQ阅读APP看书,第一时间看更新

Chapter 3. Game #1: Ticker Taker

So far, we've taken a look at what other developers, large and small, are doing with Unity. We talked about what it's going to take for you as a small developer to succeed to finish a fully functional game. Now it's time to roll up your sleeves, tie up your inner procrastinator and lock it in the trunk of your car, and start learning to build a game with Unity.

Here's what we're gonna do:

  • Come up with a game idea
  • Distil it down to that small, singular piece of joy
  • Start building the game in Unity using placeholder objects
  • Add lighting to the Scene
  • Tie into Unity's built-in physics engine
  • Modify a GameObject using components to bend it to your steely will

Let's get cracking!

Kick up a new Unity project

Let's get to that crucial decision-making stage where we're staring at a wide-open 3D frontier in an empty project file.

  1. Open Unity 3D. The last project you had open should appear. (This might be the Island Demo from Chapter 1, That's One Fancy Hammer).
  2. In the menu, click on File | New Project….
  3. Under Project Location, type in or browse to the folder where you want your project created. It's a good idea to create a new folder somewhere on your computer where you'll be able to find it again, and name it something that makes sense. I created a folder on my desktop called Unity Games, and created my new project in an empty folder called Chapter1Game.
  4. Make sure that Standard Assets.unityPackage is checked. It should be checked by default. Toon Shading.unityPackage can be left unchecked.
    Kick up a new Unity project
  5. Next, click on the Create button. Unity will briefly close and restart. After importing a number of assets, the program will open.
  6. Close the Welcome to Unity start screen if it's open. You'll find yourself staring face-to-face with that wide-open 3D plane.

The Standard Assets package that we imported with our project contains a bunch of really handy pre-made elements. We'll be using some of these assets as we build our first game.

Where did everything go?

If you're staring at nothing but a 3D plane in the Scene view, Unity has pulled a switcheroo on you. To get back to a layout like the one you saw in the Island Demo, choose 2 by 3 from the Layout drop-down at the top-right of the screen. Note that there are other choices here, and that Unity enables you to save and restore your own custom layouts.

Where did everything go?