Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Creating an RTS Game in Unity 2023

You're reading from  Creating an RTS Game in Unity 2023

Product type Book
Published in Oct 2023
Publisher Packt
ISBN-13 9781804613245
Pages 548 pages
Edition 1st Edition
Languages
Author (1):
Bruno Cicanci Bruno Cicanci
Profile icon Bruno Cicanci

Table of Contents (23) Chapters

Preface 1. Part 1: Foundations of RTS Games
2. Chapter 1: Introducing Real-Time Strategy Games 3. Chapter 2: Setting Up Unity and the Dragoncraft Project 4. Chapter 3: Getting Started with Our Level Design 5. Chapter 4: Creating the User Interface and HUD 6. Part 2: The Combat Units
7. Chapter 5: Spawning an Army of Units 8. Chapter 6: Commanding an Army of Units 9. Chapter 7: Attacking and Defending Units 10. Chapter 8: Implementing the Pathfinder 11. Part 3: The Battlefield
12. Chapter 9: Adding Enemies 13. Chapter 10: Creating an AI to Attack the Player 14. Chapter 11: Adding Enemies to the Map 15. Part 4: The Gameplay
16. Chapter 12: Balancing the Game’s Difficulty 17. Chapter 13: Producing and Gathering Resources 18. Chapter 14: Crafting Buildings and Defense Towers 19. Chapter 15: Tracking Progression and Objectives 20. Chapter 16: Exporting and Expanding Your Game 21. Index 22. Other Books You May Enjoy

Understanding the game and level design of an RTS game

Game design is the art of creating the idea and the rules that describe what the game is and, more importantly, making it a fun and remarkable experience for the player. Level design is a specialization of game design that is responsible for level creation.

We can define most of the gameplay and mechanics of a video game by looking at the three Cs: character(s), camera(s), and control(s). In the following sections, we will see how these three aspects of a game help tighten the gameplay because they all work together and should move alongside each other.

Character

Characters in an RTS game are represented by the units that the player can use in the game, as well as the enemies that are spread across the map. Usually, the main game plot is not attributed to one character in an RTS game but rather to the collective units that the player, as the commander, can control to perform actions. The player will think about the strategy first, and then use the units as a tool to achieve what was planned.

Units can be controlled to explore the map, attack enemies, defend the settlement, collect resources, and create buildings. The characters here are not important, nor do they have a great impact on the game, but it is part of the strategy that the player built.

In a few RTS games, there are characters such as heroes or infamous bosses that have distinct personalities that can drive the story of the game. In this case, the player is still controlling nameless units, but there is a hero to fight alongside or a greater evil to be defeated.

Camera

The camera is one of the most characteristic aspects of an RTS game. Besides the ability to move around the map at will, as we are going to see in the next section, the camera usually shows the top view of the territory, and all parts that are not explored yet are covered with fog; this means that the player can see the unexplored regions of the map and send units to explore them, clearing away the fog.

It is also possible to zoom in and out on the map, which helps give a macro view of the battlefield before you take micro-decisions to attack, defend, build, produce, and gather resources. The ability to move the camera quickly using the mini-map is very important and useful in the late stages of the match where a lot of things are happening at the same time across the territory.

An RTS map usually has a starting point (the blue X) and shows the enemy base that must be conquered or destroyed (the red X). Only the player’s initial position is shown uncovered in the camera, and many other hidden objectives or resources are hidden in different locations on the map, so the player will find something interesting in any direction that they move.

Control

The player control is rather basic in an RTS game but it’s this simplicity that helps players make the best and quickest decisions. Controlling the camera is vital to decide where to go or to monitor what the enemies are doing, and with easy access using the mini-map, players can control the camera quickly. Besides the camera, the player can also control the troops by selecting one or more units and giving them a command – this command could be to gather nearby resources, attack an enemy, or just move to a position and wait idly for any enemy threat.

Selecting units or a building will display different options in the UI so that the player has all the information required to decide on the next steps. All control is usually done by using the mouse’s left and right buttons and the cursor movement on the screen. Some games were created or adapted to consoles and these controls were translated to the gamepad. The same happens for mobile RTS games and touchscreen controls, which work great since they’re very similar to mouse control.

Now that we know what an RTS game is and what kind of game and level design is involved, we need to define the game that will be developed by you throughout this book. The best way to define the scope of the project is by creating a simple game design document.

You have been reading a chapter from
Creating an RTS Game in Unity 2023
Published in: Oct 2023 Publisher: Packt ISBN-13: 9781804613245
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 $15.99/month. Cancel anytime}