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
Dedication
Packt Upsell
Contributors
Preface
Index

Base character class attributes


Let's start laying down the foundation we will need for the implementation of our character classes. The following is a list of attributes that will be part of the Base Character class:

  • Character class name
  • Character class description
  • List of attributes:
    • Strength
    • Dexterity
    • Endurance
    • Intelligence
    • Social standing
    • Agility
    • Alertness
    • Vitality
    • Willpower

The attributes you define for your characters depend on the character type, but there will be some similarities between all character attributes. We would like to implement these similarities in a base class that will be shared with all character classes.

Note

The list provided is just a sample, and you can add or subtract as you see fit.

Let's keep things simple. We will use only the five primary statistics for now, as follows:

  • Strength: Strength is a measure of how physically solid a character is. Quality controls the most extreme weight the character can convey, skirmish assault as well as harm, and some of the time hit focuses...