GO TO TOP
You're reading fromUnity 2022 by Example
Product typeBook
Published inJun 2024
PublisherPackt
ISBN-139781803234595
Pages596 pages
Edition1st Edition
Languages
Concepts
3D Game Development
Author (1):
Scott H. Cameron
Scott H. Cameron
Scott Cameron is an award-winning digital content creator and designer with over 25 years of experience in information technology, software development, and design while he specializes in Indie game development. He is a Unity certified expert programmer and currently works as a Senior Unity engineer at io house ltd. Additionally, he also provides quality assurance and student course support & mentorship for Unity, Phaser, and C++ game development curriculum at Zenva.
Read more
See other products by Scott H. Cameron
Table of Contents (23) Chapters
Preface
- Who this book is for
- What this book covers
- To get the most out of this book
- Download the example code files
- Conventions used
- Get in touch
- Share Your Thoughts
1. Part 1: Introduction to Unity
2. Chapter 1: Foundational Knowledge of Unity 2022
- Technical requirements
- Unity Hub – Choosing the 2D URP template
- Getting to know the Unity Editor and installing packages
- Introducing the GameObject – All about Transform and components
- 2D sprites with Sprite Creator – Understanding the Sprite Renderer and draw ordering
- Game Design Document (GDD) – Introducing the 2D collection game
- Summary
- Image sources
3. Part 2: 2D Game Design
4. Chapter 2: Creating a 2D Collection Game
- Technical requirements
- Creating a 2D, top-down game environment with Tilemap
- Introduction to creating scripts in C# – IDE, SOLID principles, and design patterns
- Coding a simple player controller with the new Input System
- Summary
5. Chapter 3: Completing the Collection Game
- Technical requirements
- Using CM to follow the Player and playtesting
- Game mechanics and how to create with code (components)
- Introduction to uGUI, the timer, counting, and winning
- Summary
6. Part 3: 2D Game Design Continued
7. Chapter 4: Creating a 2D Adventure Game
- Technical requirements
- Extending the GDD – Introducing the 2D adventure game
- Importing assets to use with Sprite Shape – A different kind of 2D environment builder
- Level and environment design – Guiding the player
- Moving platforms and triggers – Creating a dynamic interactable environment
- Adding polish to our environment to immerse the player and optimizing
- Summary
8. Chapter 5: Continuing the Adventure Game
- Technical requirements
- Setting up the player character with PSD Importer
- Using an Input Action Map
- Moving the player with a player controller script
- Animating the character with Mecanim
- Summary
9. Chapter 6: Introduction to Object Pooling in Unity 2022
- Technical requirements
- The object pooling pattern
- A pooled player shooting model
- Summary
10. Chapter 7: Polishing the Player’s Actions and Enemy Behavior
- Technical requirements
- Polishing with Shader Graph and Trail Renderer
- Enemy Prefabs and variants – Configuring with SOs
- Implementing basic enemy behavior using an FSM
- Summary
11. Chapter 8: Extending the Adventure Game
- Technical requirements
- Health and inflicting damage
- Updating the player and enemy to use health
- Enemy wave spawner
- Summary
12. Chapter 9: Completing the Adventure Game
- Technical requirements
- Creating an event system in C# to tie things together loosely
- Creating a quest system for a collecting keys mission
- Solving the key puzzle and winning the game
- Summary
13. Part 4: 3D Game Design
14. Chapter 10: Creating a 3D First Person Shooter (FPS)
- Technical requirements
- Designing for 3D while continuing the GDD
- Greyboxing a 3D environment with ProBuilder and Prefabs
- Creating an FPS player character with the Unity Starter Asset
- Refactoring environment interactions to 3D API methods
- Code reuse in practice – Adding premade components to the player
- Summary
15. Chapter 11: Continuing the FPS Game
- Technical requirements
- Decorating the 3D environment
- Immersing the player using Polybrush and Decals
- Lighting design – Probes, Decals, light baking, and performance
- Summary
16. Chapter 12: Enhancing the FPS Game with Audio
- Technical requirements
- Adding audio using the Audio Mixer
- Building an immersive soundscape with music, SFX,and ambiance
- Enhancing the audio experience with footsteps and reverb zones
- Deeper SOLID refactoring
- Summary
17. Part 5: Enhancing and Finishing Games
18. Chapter 13: Implementing AI with Sensors, Behavior Trees, and ML-Agents
- Technical requirements
- Refactoring the 2D enemy systems to 3D with NavMesh
- Dynamic enemies with sensors and behavior trees
- Introducing ML with ML-Agents
- Summary
19. Chapter 14: Entering Mixed Reality with the XR Interaction Toolkit
- Technical requirements
- Introduction to MR and development frameworks
- Designing a boss room
- Working with AR planes (AR Foundation)
- Placing interactable objects in the world
- Implementing the boss room mechanics
- Summary
20. Chapter 15: Finishing Games with Commercial Viability
- Technical requirements
- Introducing GaaS – UGS
- Safeguarding your investment! Source code management with Unity Version Control
- Engaging players with an in-game economy
- Getting your game out there! Platform distribution
- Implementing UGS and publishing
- Summary
- Final words!
21. Index
- Why subscribe?
22. Other Books You May Enjoy
- Packt is searching for authors like you
- Share Your Thoughts
- Download a free PDF copy of this book
In Chapter 5, we imported and prepped artwork for use with additional 2D animation tooling, which is bringing the game to life. We also processed player input using an input action map – instead of reading device input directly – with the new Input System, and we made a PlayerController
script to move the player.
We dove deeper into Mecanim as we learned how to transition between animations and drive animation state changes from code.
In this chapter, you will be introduced to object pooling while we use this optimization pattern for the player’s shooting mechanic, and we’ll accomplish that using Unity’s object pooling API. The object pooling software design will be based on a pooled player shooting model UML diagram.
In this chapter, we’re going to cover the following main topics:
- The object pooling pattern
- A pooled player shooting model
By the end of this chapter, you...
The rest of the chapter is locked
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 $15.99/month. Cancel anytime
Start free trial
Previous Section
Section 1 of 5
Next Section
Personalised recommendations for you
Based on your interests and search pattern