Getting Started with Unity 2018
eBook - ePub

Getting Started with Unity 2018

Dr. Edward Lavieri

Share book
  1. 336 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Getting Started with Unity 2018

Dr. Edward Lavieri

Book details
Book preview
Table of contents
Citations

About This Book

Learn how to use Unity 2018 by creating your very own 3D game while developing your essential skills

Key Features

  • Learn to create immersive 3D games and Virtual Reality experiences with Unity 2018
  • Build custom scripts to make your game characters interactive
  • Explore and implement AritificiaI Intelligence techniques to bring your game to life

Book Description

The Unity game engine has revolutionized the gaming industry with its complete set of intuitive tools and rapid workflows, which can be used to create interactive 3D content. With Unity, you can scaffold your way from the basics and make make stunning interactive games.

This book will guide you through the entire process of creating a 3D game, from downloading the Unity game engine to publishing your game. It not only gives you a strong foundation, but puts you on the path to game development.

Beginning with an overview of the Unity engine and its interface, you will walk through the process of creating a game environment and learn how to use built-in assets, as well as assets created with third-party 3D modeling tools such as Blender.

Moving on, you will create custom scripts to control non-player character behaviors and gameplay. You will master exciting concepts such as Heads-Up-Displays, mini-maps, game navigation, sound effects, and lighting effects. Next, you'll learn how to create your first VR experience, right from setting up the project to image effects. You'll be familiarized with all the tools that Unity has to offer to create your own immersive VR experiences.

Each section is a stepping stone toward the completion of the final game. By the end of the book, you'll have learned advanced topics such as cross-platform considerations which enable your games to run on multiple platforms.

What you will learn

  • Set up your Unity development environment and navigate its tools
  • Import and use custom assets and asset packages to add characters to your game
  • Build a 3D game world with a custom terrain, water, sky, mountains, and trees
  • Animate game characters, using animation controllers, and scripting
  • Apply audio and particle effects to the game
  • Create intuitive game menus and interface elements
  • Customize your game with sound effects, shadows, lighting effects, and rendering options
  • Debug code and provide smooth error handling

Who this book is for

If you are an aspiring game developer interested in learning Unity 2018 and becoming familiar with its core features, then this book is for you. No prior knowledge of Unity is required.

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Getting Started with Unity 2018 an online PDF/ePUB?
Yes, you can access Getting Started with Unity 2018 by Dr. Edward Lavieri in PDF and/or ePUB format, as well as other popular books in Informatique & Programmation de jeux. We have over one million books available in our catalogue for you to explore.

Information

Year
2018
ISBN
9781788832915

Implementing Our Non-Player Characters

In the previous chapter, we focused on our game's player character, the Cucumber Man. We imported the character, reviewed the controls, examined the animations, and made the necessary configuration changes to fully use our character in the game. We reviewed the player character's animations and the character's animation controller. We also identified scripts relevant to the player character and reviewed several of them. In addition, we made modifications to our game's terrain to better accommodate the player character during gameplay.
In this chapter, we will focus on the non-player characters. Our Cucumber Beetles will serve as our game's non-player characters and will be the Cucumber Man's enemies. We will incorporate Cucumber Beetles in our game through direct placement. We will review the beetles' 11 animations and make changes to the non-player character's animation controller. In addition, we will write scripts to control the non-player characters. We will also add cucumber patches, cucumbers, and cherries to our game world.
In this chapter, we will cover the following topics:
  • Understanding the non-player characters
  • Importing the non-player characters into our game
  • Animating our non-player characters
  • Incorporating the non-player characters into our game
  • Terraforming the terrain for our Cucumber Beetles
  • Adding cucumber patches to our terrain
  • Adding cucumbers to our terrain
  • Scripting our non-player characters

Understanding the non-player characters

Non-player characters, commonly referred to as NPCs, are simply game characters that are not controlled by a human player. These characters are controlled through scripts, and their behaviors are usually responsive to in-game conditions.
Our game's non-player characters are the Cucumber Beetles. These beetles, as depicted in the following screenshot, have six legs that they can walk on; under special circumstances, they can also walk on their hind legs:
Cucumber Beetles are real insects, and are a threat to cucumbers. They cannot really walk on their hind legs, but they can in our game.
In the next section, you will import a Cucumber Beetle asset package prepared specifically for this game. There will only be one beetle in that asset package. We will, through scripting, make multiple copies of the beetle.
Before you move on to the next section, you should open your Unity game project. Alternatively, you can download the Starting-Chapter-08 Unity project available from the publisher's companion site.

Importing the non-player characters into our game

You are now ready to import the asset package for our game's non-player character, the Cucumber Beetle. Go through the following steps to import the package:
  1. Download the Cucumber_Beetle.unitypackage file from the publisher's companion website
  2. In Unity, with your game project open, select Assets | Import Package | Custom Package from the top menu
  3. Navigate to the location of the asset package you downloaded in step 1 and click the Open button
  4. When presented with the Import Asset Package dialog window, click the Import button
As you will notice, the Cucumber_Beetle asset package contains several assets related to the Cucumber Beetles, including a controller, scripts, a prefab, animations, and other assets:
Now that the Cucumber_Beetle asset package has been imported into our game project, we should save o...

Table of contents