Cover
Title Page
Copyright and Credits
Contributors
Table of Contents
Preface
Part 1: Foundations of RTS Games
Chapter 1: Introducing Real-Time Strategy Games
What is a real-time strategy game?
Classic examples
Modern games
Understanding the game and level design of an RTS game
Character
Camera
Control
Creating a game design document
Game outline
World
Characters
Enemies and bosses
Gameplay overview
Game experience
Mechanics and modes
Summary
Further reading
Chapter 2: Setting Up Unity and the Dragoncraft Project
Technical requirements
Downloading and configuring the Unity Editor
Using Visual Studio Code as the default IDE
Importing and organizing assets from the Unity Asset Store
Summary
Chapter 3: Getting Started with Our Level Design
Technical requirements
Setting up our base scene
Scenes
Lights
Camera
Ground foundation
Level scene
Creating the first map layout using Prefabs
Creating a custom group of Prefabs
Using ScriptableObjects to configure the map
Creating ScriptableObjects for game configuration
Creating ScriptableObjects for level configuration
Adding a custom editor for the level configuration
Creating a map editor to speed up map creation
Controlling the camera
Summary
Further reading
Chapter 4: Creating the User Interface and HUD
Technical requirements
Using Canvas for a responsive UI
Setting up the UI and HUD using Prefabs
Creating the MenuButton GameObject and popup
Displaying the resources counter
Adding the action buttons
Creating the details panel using a custom camera
Rendering the minimap
Loading the UI scene additively
Summary
Further reading
Part 2: The Combat Units
Chapter 5: Spawning an Army of Units
Technical requirements
Configuring the unit ScriptableObject
Spawning units using the Object Pooling pattern
Implementing the Object Pooling pattern
Creating a BaseSpawner class
Updating the UI using the Message Queue pattern
Implementing the Message Queue pattern
Creating the message interface
Implementing the warrior unit spawner
Creating the resource type
Updating the UI
Creating a debugging tool for the Editor
Creating the Object Pool for the Warrior unit
Creating the debug script
Summary
Further reading
Chapter 6: Commanding an Army of Units
Technical requirements
Preparing the Prefabs and UI
Adding more debug options
Preparing the Prefabs and UI
Drawing the selected area in the UI
Preparing the level scene
Selecting the units
Setting a custom color for the selected units
Defining the unit selector component
Moving the units
Summary
Further reading
Chapter 7: Attacking and Defending Units
Technical requirements
Updating the UI with the selected units
Setting up the selected unit details