Book Image

Building an RPG with Unity 2018 - Second Edition

By : Vahé Karamian
Book Image

Building an RPG with Unity 2018 - Second Edition

By: Vahé Karamian

Overview of this book

In a role-playing game (RPG), users control a character, usually in the game's imaginary universe. Unity has become a top choice for developers looking to create these kinds of immersive RPGs. Building an RPG with Unity 2018, based on building some of the most common RPG features, teaches you tips, tricks, and techniques that can be applied to your own game. To start with, the book guides you through the fundamentals of role-playing games. You will learn the necessary aspects of building an RPG, such as structuring the game environment, customizing characters, controlling the camera, and designing other attributes such as inventory and weapons. You will also explore designing game levels by adding more features. Once you have understood the bigger picture, you will understand how to tackle the obstacles of networking in Unity and implement multiplayer mode for your RPG games. By the end of the book, you will be able to build upon the core RPG framework elements to create your own immersive games.
Table of Contents (16 chapters)
Title Page
Copyright and Credits
Packt Upsell

Initial multiplayer game

The best way to learn about multiplayer games is by looking at a simple example. The following project is based on the Unity networking tutorial but has been extended to have some other features implemented that will be helpful in the implementation of networking in our RPG.

Fundamental networking components

Since the first edition of the book, a lot of technical and architectural changes have occurred within the Unity engine. Networking is one of the areas that has improved drastically since the publication of the first edition.

Let's take a look and see how we can quickly get started. The first thing you will need to do is download the Network Lobby asset from the Asset Store, as shown in the following screenshot:

This is a great starting point, as we have a generic network lobby to start off with, so we don't have to waste time creating everything from scratch!

We need to get familiar with some networking components that will be used for the creation of our network...