Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Unity 2020 Game Development

You're reading from   Hands-On Unity 2020 Game Development Build, customize, and optimize professional games using Unity 2020 and C#

Arrow left icon
Product type Paperback
Published in Jul 2020
Publisher Packt
ISBN-13 9781838642006
Length 580 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Nicolas Alejandro Borromeo Nicolas Alejandro Borromeo
Author Profile Icon Nicolas Alejandro Borromeo
Nicolas Alejandro Borromeo
Arrow right icon
View More author details
Toc

Table of Contents (24) Chapters Close

Preface 1. Chapter 1: Designing a Game from Scratch 2. Chapter 2: Setting Up Unity FREE CHAPTER 3. Chapter 3: Working with Scenes and GameObjects 4. Chapter 4: Grayboxing with Terrain and ProBuilder 5. Chapter 5: Importing and Integrating Assets 6. Chapter 6: Materials and Effects with URP and Shader Graph 7. Chapter 7: Visual Effects with Particle Systems and VFX Graph 8. Chapter 8: Lighting Using the Universal Render Pipeline 9. Chapter 9: Fullscreen Effects with postprocessing 10. Chapter 10: Sound and Music Integration 11. Chapter 11: User Interface Design 12. Chapter 12: Creating Animations with Animator, Cinemachine, and Timeline 13. Chapter 13: Introduction to Unity Scripting with C# 14. Chapter 14: Implementing Movement and Spawning 15. Chapter 15: Physics Collisions and Health System 16. Chapter 16: Win and Lose Conditions 17. Chapter 17: Scripting the UI, Sounds, and Graphics 18. Chapter 18: Implementing Game AI for Building Enemies 19. Chapter 19: Scene Performance Optimization 20. Chapter 20: Building the Project 21. Chapter 21: Finishing Touches 22. Chapter 22: Augmented Reality in Unity 23. Other Books You May Enjoy

Game concept

Why not just start developing our game instead of designing it? This question is spawned from the excitement of developing games, especially with the Unity game engine. All games start with an idea. That idea is translated into a design, and that design is the basis for development and, eventually, the final game.

A game's design is like a blueprint for a house. You would not consider building a house without a blueprint, and it is an equally bad idea to develop a game without designing it first. The reason for this is to save time and frustration. For larger projects, time wasted also means unnecessary funds are expended.

Imagine that you employed a project team of 12 developers, animators, and artists. If you shared your game idea, would they have enough to go on? Would they do great things, but not have a cohesive set of components for your game? All we are doing with our game design is documenting as much as we can in the beginning so that the development process is purposeful. Without question, you will continually modify your game's design during development, so having a strong base from which to start is critical to your success.

Our game design will serve as the foundation for the look of our game, what the player's objectives are, what the gameplay will be, and supporting user actions, animations, audio, artificial intelligence (AI), and victory conditions. That is a lot to think about and underscores the importance of translating the game idea into the game design.

Throughout the book, we will be covering a range of components. However, in this section, we will cover those that appear in the following list:

  • Game idea
  • Input controls
  • Winning and losing

So, let's look at each component in more detail.

Game idea

The basic concept of our Super Shooter game is that it will be a 3D game featuring a Futuristic Hero Soldier as the player character. The character must fight against Enemy Soldiers. These Enemies are intent on destroying our Hero's base and anyone that gets in their way, including our Hero. He will have a limited number of bullets he must keep track of.

Now that we have a general idea of what the game is going to be, let's talk about how the player will control the character.

Input controls

It is important to consider how players will interact with our game. The player will control our Hero using the standard set of controls. Players have an expectation that the industry norms for user controls will be implemented in games. So, our default set of user input controls, as shown in the following screenshot, will consist of the keyboard and mouse:

Figure 1.1 – Controls scheme

Figure 1.1 – Controls scheme

We will configure and program our game so that user input from the keyboard matches the key and action pairings shown in the following table:

Figure 1.2 – Keys mapping

Figure 1.2 – Keys mapping

The mouse will also be a significant source of user input. We will implement two components using the mouse, as indicated in the following table:

Figure 1.3 – Mouse mapping

Figure 1.3 – Mouse mapping

The left mouse button will be our action button. We will need to ensure bullets are shot only when the player has one or more bullets remaining.

That's how we handle input, but sometimes we need to end the game session! Let's talk about how the player will win and lose.

Winning and losing

Our winning condition will be when all the Enemy waves have been eliminated. There will be two different ways the player can lose the game. The first losing condition is when the base life becomes 0. The second losing condition is if the Hero's life becomes 0.

By this short description, you can tell that there will be several things to keep track of, including the following:

  • Number of remaining Waves
  • Number of our Base Life
  • Number of our Hero Life

Now, we have defined what is called the game "core loop" (star a level, play it, win/lose it, and repeat). Let's dive deeper into the specific details, starting with our characters.

lock icon The rest of the chapter is locked
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.
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 $19.99/month. Cancel anytime
Banner background image