Reader small image

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

Product typeBook
Published inOct 2023
Reading LevelN/a
PublisherPackt
ISBN-139781804613245
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Bruno Cicanci
Bruno Cicanci
author image
Bruno Cicanci

Bruno Cicanci is a software engineer and game developer with professional experience on different technologies and platforms. Since 2009, Bruno helped to develop and publish many games, mainly using Unity for mobile devices. He writes about game development on his personal blog, which led him to present many talks at universities and events. Bruno holds a Computer Science BS. Degree and a specialization and Game Production and Programming. In the last decade, he worked at prestigious game studios such as Glu Mobile, Electronic Arts, and Aquiris. He is currently developing games and reusable technologies at Ubisoft. Originally from Sao Paulo, Brazil, Bruno currently resides in London, UK with his wife and two adorable cats.
Read more about Bruno Cicanci

Right arrow

Setting Up Unity and the Dragoncraft Project

Today, many different game engines can be used to develop games, and most of them are free to use or have a free license until you start making thousands of dollars in profit. Even with many options available, the Unity engine is probably the most popular choice for both new and experienced game developers, capable of making projects from small games, all the way up to AAA games with advanced features that push the hardware to its limits.

In this chapter, you will learn how to download and install the Unity game engine, including the recommended version and modules to install, as well as how to configure Visual Studio Code as the default integrated development environment (IDE) and install the required extensions. This chapter will also show you how to download and import all content required for building our RTS game, Dragoncraft, from the Unity Asset Store.

By the end of this chapter, you will have learned how to set up and organize...

Technical requirements

To complete this chapter and create Dragoncraft, here is the software you need to install:

  • Visual Studio Code for the C# programming
  • Unity Engine 2023.1 (or later)

The project setup for this chapter, along with the imported assets, can be found on GitHub at https://github.com/PacktPublishing/Creating-an-RTS-game-in-Unity-2023.

The assets from the Unity Asset Store that have been used in this project can be found at https://assetstore.unity.com/lists/creating-a-rts-game-5773122416647.

Downloading and configuring the Unity Editor

To get started, we will need to install Unity Hub, which is the entry point for installing the Unity Editor so that we can create and load projects. Head to https://unity.com/download and click on the Download for Windows button if you have a Windows setup or the Download other versions button for the macOS installer and Linux instructions.

Once downloaded, follow the installer’s instructions to add Unity Hub to your system. Next, click on the Installs tab and then click on the Install Editor button. From the following screen, select the latest version available for Unity, which is 2023.1 at the time of writing, or any later editions:

Figure 2.1 – Install Unity Editor

Figure 2.1 – Install Unity Editor

As soon as you click on the Install button, you will be presented with the following screen, where you can select the modules you would like to install:

Figure 2.2 – Unity modules

Figure 2.2 – Unity modules

By default...

Using Visual Studio Code as the default IDE

Visual Studio Code is a lightweight but powerful IDE that provides extensions to expand the supported programming languages and technologies you want to use. It is available for Windows, macOS, and Linux. Go to https://code.visualstudio.com/ and click on the Download button. Select the option that matches your operating system:

Figure 2.4 – Visual Studio Code download

Figure 2.4 – Visual Studio Code download

Once downloaded, unzip the file and double-click it to launch the IDE. On the left-hand side of the screen, select Extensions and search for C#, as shown in the following screenshot. Click Install to add C# support to Visual Studio Code:

Figure 2.5 – Visual Studio Code C# extension

Figure 2.5 – Visual Studio Code C# extension

Now that Visual Studio Code has been installed and configured, we can create a new Unity project and set it up as the default IDE.

Launch Unity Hub and click on the New Project button in the top-right corner. Then, select...

Importing and organizing assets from the Unity Asset Store

Now that all the configuration is done for both the Unity Editor and the IDE, we can use our empty project to get started with our RTS game development. This book will cover all the coding aspects of creating an RTS game, but since we are not going to create any art, the free assets from the Unity Asset Store will be used.

Go to the Unity Asset Store (https://assetstore.unity.com) and create a free account that will allow you to download and import the assets in the Unity Editor.

Next, access this public list, which contains all the assets needed to develop our RTS game in this book (https://assetstore.unity.com/lists/creating-a-rts-game-5773122416647) and click on the Add to My Assets button for each of the six assets. Every time you click that button, a pop-up message stating Unity Terms of Service will be displayed for you to accept the terms of service before the asset is added to your account.

Once added, you...

Summary

In this chapter, we learned how to download, install, and set up the Unity Editor using Unity Hub. We also downloaded and installed Visual Studio Code, imported the required extension, and configured it as the default IDE for the Unity Editor. In the end, we imported all the free assets required from the Unity Asset Store into our newly created project and organized it.

In Chapter 3, Getting Started with Our Level Design, we are going to start coding our map editor and create a few levels using this tool, ScriptableObjects, and the assets we imported from the Unity Asset Store. We will also configure the main scene, lights, camera movement, and mini-map navigation – one of the key gameplay features of our RTS game.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Creating an RTS Game in Unity 2023
Published in: Oct 2023Publisher: PacktISBN-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.
undefined
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

Author (1)

author image
Bruno Cicanci

Bruno Cicanci is a software engineer and game developer with professional experience on different technologies and platforms. Since 2009, Bruno helped to develop and publish many games, mainly using Unity for mobile devices. He writes about game development on his personal blog, which led him to present many talks at universities and events. Bruno holds a Computer Science BS. Degree and a specialization and Game Production and Programming. In the last decade, he worked at prestigious game studios such as Glu Mobile, Electronic Arts, and Aquiris. He is currently developing games and reusable technologies at Ubisoft. Originally from Sao Paulo, Brazil, Bruno currently resides in London, UK with his wife and two adorable cats.
Read more about Bruno Cicanci