Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Hands-On Unity  Game Development - Fourth Edition

You're reading from  Hands-On Unity Game Development - Fourth Edition

Product type Book
Published in Jan 2024
Publisher Packt
ISBN-13 9781835085714
Pages 742 pages
Edition 4th Edition
Languages
Authors (2):
Nicolas Alejandro Borromeo Nicolas Alejandro Borromeo
Profile icon Nicolas Alejandro Borromeo
Juan Gabriel Gomila Salas Juan Gabriel Gomila Salas
Profile icon Juan Gabriel Gomila Salas
View More author details

Table of Contents (28) Chapters

Preface 1. Section 1: Getting Started with Unity
2. Embark on Your Unity Journey 3. Crafting Scenes and Game Elements 4. From Blueprint to Reality: Building with Terrain and ProBuilder 5. Seamless Integration: Importing and Integrating Assets 6. Section 2: Mastering Programming and Gameplay Mechanics
7. Unleashing the Power of C# and Visual Scripting 8. Dynamic Motion: Implementing Movement and Spawning 9. Collisions and Health: Detecting Collisions Accurately 10. Victory or Defeat: Win and Lose Conditions 11. Starting Your AI Journey: Building Intelligent Enemies for Your Game 12. Section 3: Elevating Visuals, Effects, and Audio
13. Material Alchemy: Using URP and Shader Graph for Stunning Visuals 14. Captivating Visual Effects: Harnessing Particle Systems and Visual Effect Graph 15. Enlightening Worlds: Illuminating Scenes with the Universal Render Pipeline 16. Immersive Realism: Achieving Fullscreen Effects with Post-Processing 17. Harmonious Soundscapes: Integrating Audio and Music 18. Section 4: Designing User Interfaces, Animations and Advanced Concepts
19. Interface Brilliance: Designing User-Friendly UI 20. Next-Gen UI: Creating Dynamic Interfaces with UI Toolkit 21. Animated Realities: Creating Animations with Animator, Cinemachine, and Timeline 22. Performance Wizardry: Optimizing Your Game with Profiler Tools 23. From Prototype to Executable: Generating and Debugging Your Game 24. AR/VR 25. Massive Worlds: Introduction to DOTS 26. Other Books You May Enjoy
27. Index

From Blueprint to Reality: Building with Terrain and ProBuilder

Now that we’ve grasped all the necessary concepts to use Unity, let’s start designing our first level of the game. The idea in this chapter is to learn how to use Terrain tools to create the landscape of our game and then use ProBuilder to create the 3D mesh of the base with greater detail than using cubes. By the end of the chapter, you will be able to create a prototype of any kind of scene and try out your idea before actually implementing it with the final graphics.

Specifically, we will examine the following concepts in this chapter:

  • Defining our game concept
  • Creating a landscape with Terrain Tools
  • Creating shapes with ProBuilder

Let’s start by talking about our game concept, which will help us draft the first-level environment.

Defining our game concept

Before even adding the first cube to our scene, it is good to have an idea of what we are going to create, as we will need to understand the basic concept of our game to start designing the first level. Throughout this book, we will be creating a shooter game, in which the player will be fighting against waves of enemies trying to destroy the player’s base.

This base will be a complex in a (not so) secret location bordered by mountains:

Figure 3.1: Our finished game

We will be defining the mechanics of our game as we progress through the book, but with this basic high-level concept of the game, we can start thinking about how to create a mountainous landscape and a placeholder player’s base.

With that in mind, in the next section of this chapter, we will learn how to use Unity’s Terrain Tools to create our scene’s landscape.

Creating a landscape with Terrain

So far, we have used cubes to generate our level prototype, but we also learned that cubes sometimes cannot represent all possible objects we could need. Imagine something irregular, such as a full terrain with hills, canyons, and rivers. This would be a nightmare to create using cubes, given the irregular shapes you find in the terrain.

Another option would be to use 3D modeling software, but the problem with that is that the generated model will be so big and so detailed that it won’t perform well, even on high-end PCs. In this scenario, we need to learn how to use Unity’s Terrain system, which we will do in this first section of the chapter.

In this section, we will cover the following concepts related to terrains:

  • Discussing Height Maps
  • Creating and configuring Height Maps
  • Authoring Height Maps
  • Adding Height Map details

Let’s start by talking about Height Maps, whose textures help...

Join our book community on Discord

https://packt.link/unitydev

A qr code with black squares Description automatically generated

Now that we've grasped all the necessary concepts to use Unity, let's start designing our first level of the game. The idea in this chapter is to learn how to use Terrain Tools to create the landscape of our game and then use ProBuilder to create the 3D mesh of the base with greater detail than using cubes. By the end of the chapter, you will be able to create a prototype of any kind of scene and try out your idea before actually implementing it with the final graphics.Specifically, we will examine the following concepts in this chapter:

  • Defining our game concept
  • Creating a landscape with Terrain Tools
  • Creating shapes with ProBuilder

Let's start by talking about our game concept, which will help us draft the first-level environment.

lock icon The rest of the chapter is locked
You have been reading a chapter from
Hands-On Unity Game Development - Fourth Edition
Published in: Jan 2024 Publisher: Packt ISBN-13: 9781835085714
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 €14.99/month. Cancel anytime}