Skip to main content
main-content

Über dieses Buch

Unity for Absolute Beginners walks you through the fundamentals of creating a small third-person shooter game with Unity. Using the free version of Unity to begin your game development career, you'll learn how to import, evaluate and manage your game resources to create awesome third-person shooters. This book assumes that you have little or no experience with game development, scripting, or 3D assets, and that you're eager to start creating games as quickly as possible, while learning Unity in a fun and interactive environment.

With Unity for Absolute Beginners you'll become familiar with the Unity editor, key concepts and functionality. You'll learn how to import, evaluate and manage resources. You'll explore C# scripting in Unity, and learn how to use the Unity API. Using the provided art assets, you will learn the fundamentals of good game design and iterative refinement as you take your game from a simple prototype to a quirky, but challenging variation of the ever-popular first-person shooter. As can be expected, there will be plenty of destruction, special effects and mayhem along the way.

Unity for Absolute Beginners assumes that you have little or no experience with game development, scripting, or 3D assets, but are eager to get up-to-speed as quickly as possible while learning Unity in a fun and interactive environment.

Inhaltsverzeichnis

Frontmatter

Chapter 1. The Unity Editor

Abstract
The most exciting part of learning a new application is getting it installed and firing it up for the first time. Following that, the most frustrating part can be the process of becoming familiar with its editing environment. Unity is no exception, especially if you are already familiar with DCC (digital content creation) applications. In this chapter, you will be introduced to the Unity editor and many of its key concepts. As this will serve as a light overview for the rest of the book, don’t stress over trying to remember it all.
Sue Blackman

Chapter 2. Unity Basics

Abstract
While you can create some assets directly inside Unity, the building blocks for your scene will usually be based on imported assets. The in-game functionality, location, and final appearance, however, will be managed and completed within the Unity Editor. For that, it is necessary that you have a good understanding of Unity’s key concepts and best practices. In this chapter, you will explore and experiment with a good portion of the Unity features that don’t require scripting to be able to enjoy.
Sue Blackman

Chapter 3. Scene Navigation and Physics

Abstract
At this point, you have become familiar with creating, positioning, and manipulating various assets in a scene. The next logical step is to be able to experience your environment as a player. This is how you will be able to test the flow of your scene design and, as your game progresses, test functionality and game play.
Sue Blackman

Chapter 4. Importing Static Assets

Abstract
While Unity does have a handful of primitive objects, you will be importing most of the 3D art assets for your games. There are many pre-made assets available for free or for purchase at Unity’s Asset Store. If you are mainly a programmer, or are just looking to prototype a game quickly to test functionality before creating assets for it, the Asset Store is invaluable. If you are a 3D artist and are looking forward to creating your own assets, or are in charge of procuring the assets from various and sundry sources, you will inevitably need to learn how to prepare them for use once imported into Unity. In this chapter, you will be exploring the importing, preparation, and management of static assets. Animated assets have different needs and will be covered in Chapter 6.
Sue Blackman

Chapter 5. Introduction to Scripting with C#

Abstract
To bring your games to life in Unity, you will be adding scripts to trigger and manage the desired functionality. Scripting is about equal parts syntax, logic, and Unity functionality, with a good dose of math thrown into the mix. If math skills are part of your distant past, the Unity community is a good source for specialty scripts. If you already have programming skills, you will be able to tap the community for detailed advice, suggestions, and solutions.
Sue Blackman

Chapter 6. Mecanim and Animation

Abstract
While some games have no characters whatsoever, a great number feature compelling characters that drive both story and game play. A major part of their appeal and entertainment value comes from their animation. Unity’s Mecanim character-animation system is arguably one of the features that pushes it seriously toward the realm of AAA title game development. In this chapter, you will delve into some character set up and control, as well as traditional mechanical animation of non-character objects.
Sue Blackman

Chapter 7. Populating the Game Environment

Abstract
Before you can finish setting up the characters, you will have to get the game environment blocked in and ready for testing. Game flow, how readily the player can move through the game environment and accomplish tasks or goals, may look good on paper, but once implemented, it might not work as well as expected. In a larger game, you would probably use proxy geometry and simple primitives for characters to mock up the relevant features of the environment so you could test the functionality of the game early on. Even for something as simple as the game you are creating with the book, much of the early testing was done exclusively with Unity primitive objects (Figure 7-1). As issues were encountered, workarounds or solutions were developed, often leading to design changes in the garden structure assets.
Sue Blackman

Chapter 8. Weaponry and Special Effects

Abstract
With the garden currently being overrun by ravenous zombie bunnies, you will be thankful to get some weapon-craft knowledge under your belt. Hand in hand with the rocket launchers, death rays, and other weapons of mass—or even subtle—destruction are special effects. Mayhem and destruction, as Hollywood can tell you, is just massively more entertaining with a liberal dose of smoke, sparks, fireballs, the sound of exploding structure, and dying monsters. While your little Garden Defender game is nowhere near to being a triple-A title, you will be learning the basics of weaponry and special effects in this chapter to help with whatever your end goal may be.
Sue Blackman

Chapter 9. Incorporating Unity 2D

Abstract
With Unity’s major push into the mobile market and Adobe’s announcement that Flash would not be supported for Mobile, Unity stepped in and beefed up its 2D capabilities with the addition of several very nice features and options. While your game is mainly 3D, you will be taking the opportunity in this chapter to cover some of the basics by incorporating a 2D warning system into the game as an added stressor for your player. Before jumping fully into the newer features, you will finish up the scoring system.
Sue Blackman

Chapter 10. Menus and Levels

Abstract
In the last chapter, you implemented a means to end the game, the current level, or maybe just the current garden. With most of the game play in place, you will be delving into the concept of using levels for menus as you begin wrapping up the game. In the book, your game will have only one garden level, but the menus you will add can also be considered levels. With the addition of the menus and the elements required to navigate between them, you will be using the second of Unity’s GUI offerings, Unity GUI.
Sue Blackman

Chapter 11. Bonus Features

Abstract
With your game in a “finished” state, you may occasionally have the opportunity to add a few of those missing details that got cut due to time or budget. In this chapter, you will revisit Mecanim to give your Gnomatic Garden Defender another weapon to fight the zombie-bunny hordes, bring the electric slug in as a power-up, and introduce a means of locating that last pesky zombie bunny required to win the game. You will begin with the feature that will most help the player to finish the game.
Sue Blackman

Appendix A. Rigging with Mixamo

Abstract
Mixamo is a software tool that allows you to quickly rig your own character. In addition, you can also create a new character from one of the preset Mixamo characters and add preset Mixamo animations to your characters. As of this writing, you are allowed two free rigs for your own prebuilt characters for your personal use. Mixamo characters and Mixamo animations must be purchased. Mixamo is at www.mixamo.com .
Sue Blackman

Backmatter

Weitere Informationen

Premium Partner

    Bildnachweise