Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Unity 2021 Game Development

You're reading from   Hands-On Unity 2021 Game Development Create, customize, and optimize your own professional games from scratch with Unity 2021

Arrow left icon
Product type Paperback
Published in Aug 2021
Publisher Packt
ISBN-13 9781801071482
Length 710 pages
Edition 2nd 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 (29) Chapters Close

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

The difficulty balance

There are a lot of considerations to make when determining how difficult your game should be. If it is too difficult, players will lose interest, and if the game is too easy, it might not appeal to your intended audience. Some games include difficulty options for users to select from. Other games have multiple levels, each with increasing difficulty. There are several questions that we must contend with in order to achieve our desired difficulty balance.

In this section, we will first look at some questions relating to difficulty balance, followed by our implementation plan.

Difficulty balance questions

There are a lot of questions about our game that we need to consider in our game design. A review of the questions in this section will help us gain an appreciation of the issues that even a simple game such as ours must contend with, in order to achieve the desired difficulty balance.

The first set of questions, listed here, relates to the overall implementation of difficulty in our game:

  • Should we have different levels of difficulty, selectable by the player?
  • What specifically will be different with each difficulty level?
  • Should we have multiple game levels, each with an increased amount of difficulty?
  • What specifically will be different with each game level?

Consider the following questions regarding the Enemies in our game:

  • How many Enemies should be spawned in each Wave?
  • At what distance should an Enemy become aware of the Hero?
  • How much damage should an Enemy inflict on the Player with each attack?
  • How much damage can an Enemy endure before it dies?

The next set of questions listed here refers to our playable character, the Hero:

  • How much life should the character have?
  • How much damage will the character take from a single enemy attack?
  • Should the character be able to outrun Enemies?

We also have the base and bullets to account for in our game. Here are a couple of questions for each of those game assets that we will implement in our game. In the case of the base, the questions are as follows:

  • How many attacks should it take for an enemy to destroy a base?
  • What is the ideal max number of enemies spawned in a Wave?
  • Where should Doors and the Base be located in the game environment?

And now, let's talk about questions in the case of Bullets, as follows:

  • At what pace should the player shoot bullets?
  • At what pace should the enemy shoot bullets?
  • How much damage will the bullets inflict on the Enemies?
  • How much damage will the bullets inflict on the Player?

As you can see, there are several questions that we need to answer as part of our design. Some of the questions may seem redundant as they relate to more than one component in the game. Now, let's answer some of those.

Implementation plan

Based on the questions posed in the last section, we must come up with some answers. Here is a list of some of those decisions:

  • We will spawn five enemies in the first wave and add two new enemies per consecutive wave.
  • We will establish a pretty small vision area for the Enemies, making it easy for the Hero to sneak past them and, perhaps more importantly, outrun them.
  • We will configure the Player's bullets to damage enemies so that two bullets are needed to kill them.
  • We will configure the Enemies bullets to damage the player so that 10 bullets are needed to kill them.
  • The Player will shoot bullets at a frequency of 2 per second.
  • The Enemy will shoot 1 per second.

It's important to take into account that this is the first balance pass, and we will surely change this based on the testing we will carry out when the game is implemented. The idea is to consider this first version of the game as a Prototype, which will be tested on a small group of players to validate our ideas and iterate them. The invaluable feedback of the early players of the game could convert it completely. Usually, a Prototype is a quick version of the game, made with the most minimal features possible to quickly test and discard ideas. After a fair amount of iterations and testing sessions on the prototype, we will have solid ground to start the real development of the game (or discard it completely if we can't create a fun game).

In this book, we will skip the Prototype phase and jump directly to the development of the game due to the scope of the book, but consider doing Prototypes before starting any real project. Just remember, a prototype is a quick, cheaply done version of the project with the sole purpose of testing ideas. We will probably discard the prototype project entirely before starting the real development, so don't spend too much time doing it with clean and proper practices. Now, we can say the game design is completed… or can we? Actually, the game design never ends, even after prototyping!. It will keep evolving as the game is developed, but let's keep that for later. Now, let's talk about how we can communicate our great ideas with everyone in our team, using documentation.

You have been reading a chapter from
Hands-On Unity 2021 Game Development - Second Edition
Published in: Aug 2021
Publisher: Packt
ISBN-13: 9781801071482
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 €18.99/month. Cancel anytime