Table of Contents

Preface

Chapter 1: Designing a Game from Scratch

Game concept 10

Input controls11

Winning and losing12

Game characters13

Hero 13

Enemies14

Gameplay14

Game-world layout15

Starting condition16

Ending condition16

Point system17

HUD17

The difficulty balance18

Difficulty balance questions19

Implementation plan20

Documentation21

Game Design Document (GDD)21

GDD formats22

GDD creation tools22

Elevator pitch24

A high concept25

Tips for creating GDDs26

Summary29

Chapter 2: Setting Up Unity

Why use a game engine such as Unity?32

Past and present industry insight32

Game engines33

Positives of Unity33

Installing Unity34

Unity versions35

Installing Unity with Unity Hub35

Creating projects41

Creating a project41

Project structure44

Summary46

Chapter 3: Working with Scenes and GameObjects

Manipulating scenes48

The purpose of a scene48

The Scene View49

Our first GameObject50

Navigating the Scene View51

Manipulating GameObjects52

GameObjects and components56

Components57

Manipulating components58

Object hierarchies64

Parenting of objects64

Possible uses65

Prefabs66

Creating Prefabs67

Prefab-instance relationship68

Prefab variants71

Saving scenes and projects73

Saving our changes73

Project structure74

Summary76

Chapter 4: Grayboxing with Terrain and ProBuilder

Creating a Landscape with Terrain78

Discussing Height Maps78

Creating and configuring Height Maps80

Authoring Height Maps83

Adding Height Map details86

Creating Shapes with ProBuilder89

Installing ProBuilder89

Creating a Shape91

Manipulating the mesh92

Adding details98

Summary102

Chapter 5: Importing and Integrating Assets

Importing assets103

Importing assets from the internet104

Importing assets from the Asset Store106

Integrating assets112

Integrating terrain textures112

Integrating meshes115

Integrating textures117

Configuring assets119

Configuring meshes120

Configuring textures122

Assembling the scene124

Summary127

Chapter 6: Materials and Effects with URP and Shader Graph

Introducing Shaders130

Shader Pipeline130

Render Pipelines and URP133

URP Built-in Shaders135

Creating Shaders with Shader Graph139

Creating our first Shader Graph asset140

Using Textures144

Combining Textures153

Applying transparency157

Summary159

Chapter 7: Visual Effects with Particle Systems and VFX Graph

Introduction to particle systems162

Creating a basic particle system163

Using advanced modules168

Creating fluid simulations169

Creating a waterfall effect170

Creating a bonfire effect172

Creating complex simulations with VFX Graph174

Installing VFX Graph175

Creating and analyzing a VFX Graph177

Creating a rain effect181

Summary185

Chapter 8: Lighting Using the Universal Render Pipeline

Applying lighting188

Discussing lighting methods188

Configuring ambient lighting with skyboxes193

Configuring lighting in URP198

Applying shadows201

Understanding shadow calculations202

Configuring performant shadows206

Optimizing lighting209

Understanding static lighting209

Baking lightmaps210

Applying static lighting to static objects217

Summary220

Chapter 9: Fullscreen Effects with postprocessing

Using postprocessing 222

Setting up a profile222

Using basic effects225

Using advanced effects228

Advanced effects228

Summary238

Chapter 10: Sound and Music Integration

Importing audio239

Audio types240

Configuring import settings241

Integrating and mixing audio246

Using 2D and 3D AudioSources246

Using an Audio Mixer250

Summary255

Chapter 11: User Interface Design

Understanding Canvas and RectTransform259

Creating a UI with Canvas259

Positioning elements with RectTransform261

Canvas objects types264

Integrating assets for the UI264

Creating UI controls271

Creating a responsive UI278

Adapting objects' positions279

Adapting objects' sizes282

Summary286

Chapter 12: Creating Animations with Animator, Cinemachine, and Timeline

Using skeletal animations with Animator288

Understanding skinning288

Importing skeletal animations291

Integration using Animation Controllers295

Creating dynamic cameras with Cinemachine301

Creating dolly tracks305

Creating cutscenes with Timeline309

Creating animation clips309

Sequencing our intro cutscene313

Summary318

Chapter 13: Introduction to Unity Scripting with C#

Creating C# scripts320

Initial setup320

Creating a MonoBehaviour-based class323

Adding fields326

Using events and instructions329

Events and instructions329

Using fields in instructions333

Common beginner errors334

Summary337

Chapter 14: Implementing Movement and Spawning

Implementing movement340

Moving objects through Transform340

Using Input344

Understanding Delta Time349

Implementing spawning351

Spawning objects351

Timing actions359

Destroying objects363

Summary364

Chapter 15: Physics Collisions and Health System

Configuring Physics366

Setting shapes366

Physics Object types369

Filtering collisions373

Detecting collisions376

Detecting Trigger events377

Modifying the other Object379

Moving with Physics382

Applying forces382

Tweaking Physics384

Summary387

Chapter 16: Win and Lose Conditions

Creating Object Managers390

Implementing the Singleton design pattern390

Creating Managers with Singleton394

Creating Game Modes398

Improving our code with events402

Summary409

Chapter 17: Scripting the UI, Sounds, and Graphics

Scripting the UI412

Showing information in the UI412

Programming the Pause menu419

Scripting feedback424

Scripting visual feedback424

Scripting audio feedback428

Scripting animations430

Summary433

Chapter 18: Implementing Game AI for Building Enemies

Gathering information with sensors436

Creating Three-Filters sensors436

Debugging with Gizmos442

Making decisions with FSMs446

Creating the FSM446

Creating transitions448

Executing FSM actions452

Calculating our scene Pathfinding453

Using Pathfinding455

Adding final details458

Summary463

Chapter 19: Scene Performance Optimization

Optimizing graphics466

Introduction to graphic engines466

Using Frame Debugger468

Using batching470

Other optimizations473

Optimizing processing477

Detecting CPU- and GPU-bound477

Using the CPU Usage profiler480

General CPU optimization techniques484

Optimizing memory486

Memory allocation and the garbage collector487

Using the Memory Profiler491

Summary495

Chapter 20: Building the Project

Building a project497

Debugging the build502

Debugging code503

Profiling performance506

Summary508

Chapter 21: Finishing Touches

Iterating your game509

Testing and feedback510

Interpreting feedback512

Releasing your game514

Pre-release514

Release516

Post-release517

Summary518

Chapter 22: Augmented Reality in Unity

Using AR Foundation519

Creating an AR Foundation project520

Using tracking features524

Building for mobile devices532

Building for Android532

Building for iOS538

Creating a simple AR game541

Spawning the Player and Enemies542

Coding the Player and Enemy behavior545

Summary550

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.35.75