40,81 €
Build a high-end, multiplayer role-playing game (RPG) from scratch with C# and Unity 2018
Key Features
Book Description
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.
What you will learn
Who this book is for
Building an RPG with Unity 2018 is for you if you are a programmer interested in developing and further enhancing your skills when developing RPGs in Unity 2018. This book does not cover the basics of Unity, and so is for intermediate or more advanced users.
Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:
Seitenzahl: 302
Veröffentlichungsjahr: 2018
Copyright © 2018 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Commissioning Editor: Kunal ChaudhariAcquisition Editor:Noyonika DasContent Development Editor:Francis CarneiroTechnical Editor: Ralph RosarioCopy Editor: Safis EditingProject Coordinator: Devanshi DoshiProofreader: Safis EditingIndexer: Mariammal ChettiyarGraphics: Jason MonteiroProduction Coordinator: Aparna Bhagat
First published: March 2016 Second edition: July 2018
Production reference: 1270718
Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK.
ISBN 978-1-78862-346-9
www.packtpub.com
To my wife Armineh for being my loving partner throughout our joint life-journey. To my son and daughter, Maximilian and Makayla.
Mapt is an online digital library that gives you full access to over 5,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career. For more information, please visit our website.
Spend less time learning and more time coding with practical eBooks and Videos from over 4,000 industry professionals
Improve your learning with Skill Plans built especially for you
Get a free eBook or video every month
Mapt is fully searchable
Copy and paste, print, and bookmark content
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks.
Vahé Karamian is a software consultant and author based in Los Angeles, CA. He is the founder of Noorcon Inc., a software consulting firm in Burbank, CA, providing services in the field of augmented reality and virtual reality used in the entertainment, architecture, medical, and manufacturing industries. He has lectured in state and private universities on topics including Introduction to Computer Science, Data Structures and Algorithms, Operating Systems, and Game Design and Development.
Adam Larson started programming professionally in 2005. He has shipped 14 console games, 2 PC titles, and 8 mobile games. In 2012, he founded a company that focused on using Unity for business applications. He spent the following 5 years building a million dollar agency that built high-end software. Recently, he moved to another start-up that focuses on revolutionizing the banking industry. When he isn't doing something with technology, you will find him spending time with his wife and three kids.
Francesco Sapio has a master's of science in engineering in AI and Robotics, scoring summa cum laude. Now, he is a PhD researcher. He is a Unity and Unreal expert. Among his many projects, he developed Gea2 (Sapienza), Sticker Book (Dataware Games), and consulted for Prosperity – Italy 1434, Mi Rasna (Entertainment Game Apps, Inc), and Projekt I.D (RMIT). He is an active writer on game development, authoring Getting Started with Unity 5.x 2D Game Development, Unity UI Cookbook, and many others. Finally, Francesco loves math, philosophy, logic, and puzzle solving, but mostly loves creating video games.
Michael Miles is a manufacturing engineer working in the aerospace industry by day and a Unity game designer, C#, JavaScript, and Python developer at all other times. With these skills and upon discovering Unity3D and Blender, Michael began creating interactive training and production-ready instruction tools for the assembly of the aircraft his company builds.
When not in front of a computer screen, he likes to play games with family and friends or immerse himself in books from fantasy to theoretical physics.
If you're interested in becoming an author for Packt, please visit authors.packtpub.com and apply today. We have worked with thousands of developers and tech professionals, just like you, to help them share their insight with the global tech community. You can make a general application, apply for a specific hot topic that we are recruiting an author for, or submit your own idea.
Title Page
Copyright and Credits
Building an RPG with Unity 2018 Second Edition
Dedication
Packt Upsell
Why subscribe?
PacktPub.com
Contributors
About the author
About the reviewers
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Conventions used
Get in touch
Reviews
What is an RPG?
A brief history of the genre
Characteristics of an RPG
Story and setting
A glimpse of a cRPG story
Exploration and quests
A glimpse at our exploration and quests
Inventory system
Character attributes and actions
Experience and leveling
Combat system
User interaction and graphics
Existing or upcoming RPG games
MU Legend
Titan Siege
Citadel: Forged with Fire
Cyberpunk 2077
Patterns in RPG
Terminology
Contest tree
Last Man Standing
Negotiated Contest
Summary
Planning the Game
Building our RPG
The story of the Zazar dynasty
Backstory
Exploration and quests
Awakening
The village
Broken forest – the horizon
The kingdom
Asset inventory
Environment assets
Medieval Environment Pack
Terrain Toolkit 2017
Nature Starter Kit 2
Character assets
Barbarians
Orcs
Villagers
Free Assets
Level design
Setting the stage
Terrain toolkit in a nutshell
The Awakening
Using the terrain model
Using a custom toolkit
Skybox
Testing the level
Creating the main menu
Creating the GameMaster script
Summary
RPG Character Design
Character definitions
Character assets
Base character class attributes
Character states     
Character model
Default character models
Barbarian
Villager
Orc
Let's get started
Rigging your model
Character motion
Animator Controller
Animation states
Character controller
Modification to animations
Inverse Kinematics
Setting the animation curve
Summary
The Game Mechanics
Customizing the player character
Customizable parts
User interface
The code for character customization
Preserving our character state
Recap
Non-player characters
Non-player character basics
Setting up the non-player character
NPC Animator Controller
NPC Attack
NPC AI
PC and NPC interaction
Summary
GameMaster and Game Mechanics
GameMaster
Managing game settings and audio
Managing scenes
Improving GameMaster
Level controller
Audio controller
Player data management
PC class enhancements
Character customization class update
Changes to the game level controller
Testing
Summary
Inventory System
Designing an inventory system
Weighted inventory
Determining item types
Creating an inventory item
Creating the prefab
Adding an inventory item agent
Inventory items defined as prefabs
Designing an inventory interface
Creating the inventory UI framework
Designing a dynamic item viewer
Adding a scroll view
Adding elements to PanelItem and Scroll View
Adding txtItemElement dynamically
Building the final inventory item UI
Integrating the UI with the actual inventory system
Hooking the category buttons and displaying the data
Testing the inventory system
Inventory items and the player character
Applying inventory items
How it looks
Summary
User Interface and System Feedback
Designing a heads-up display
HUD basics
Our design
HUD framework
Completing our HUD design
Character info panel
Active inventory items panel
Special items panel
Integrating the code
Enemy stats in the HUD
NPC stats user interface
Creating the NPC canvas
NPC taking a hit
Enhancing the code
Summary
Multiplayer Setup
Challenges of a multiplayer game
Initial multiplayer game
Fundamental networking components
My tank networking project
Adding a player character
Variable synchronization
Network callbacks
Sending commands
Client RPC calls
Creating the cannonball for the tank
Creating the tank prefab and configuring the network lobby manager
Adding the enemy tank
Building and testing
Network-enabling RPG characters
Creating a scene for our RPG
Networked player character
Networked non-player character
Synchronizing player customization and items
Spawning NPCs and other items
Testing our network-enabled PC and NPC
What's next?
Summary
Other Books You May Enjoy
Leave a review - let other readers know what you think
Everyone wants to make a game—today, this is possible more than ever due to the democratization of the game industry and the tools that are used to design and develop games. This book is written with several purposes in mind. During the process of writing this book, Unity went through several major updates and releases. At the time of writing, Unity stands at version 2018.1.1f1, and the new release has added many great features to the game engine. Simply put, it is impossible to cover everything in one single book!
This book is intended as a reference guide for individuals who want to learn about Unity and apply their skills for the creation of a Role-Playing Game (RPG).
This book is written for individuals who want to learn and apply their Unity skills for the creation of an RPG. It is assumed that the reader has a basic understanding of the concepts of programming and is comfortable with the basics of Unity's IDE. This book gives a strong and solid foundation of the core concepts and topics that can be applied to build your own game experience.
Chapter 1, What is an RPG?, provides a good background of what an RPG is. It covers some historical aspects and gives examples of existing RPGs. It discuss the main aspects of an RPG, covers some terminology, and prepares the reader for the rest of the book.
Chapter 2, Planning the Game, is where we take a look at character definitions, character class attributes, character states, and how to set up and rig character models, which includes an exploration of motion, controllers, and inverse kinematics.
Chapter 3, RPG Character Design, continues expanding on player character customization and looks at preserving character states, the setup of Non-Player Characters (NPCs), and introducing NPC Artificial Intelligence (AI) and interaction.
Chapter 4, The Game Mechanics, is where we start planning the game. We discuss the different types of assets and resources we will need during the creation of our game, introduce a third-person character controller, and create our initial level and scripts. We also take a look at the Terrain Toolkit for terrain generation.
Chapter 5, GameMaster and Game Mechanics, looks at enhancing the Game Master script, introduces Level Controller and Audio Controller scripts, discusses the storage of character data and the character customization state, and explores options for the initial user interface for the main menu.
Chapter 6, Inventory System, covers the creation of a generic inventory system; the creation of the necessary scripts, assets, and prefabs that represent the inventory items; designing the inventory user interface; and how to represent the inventory system and its items.
Chapter 7, User Interface and System Feedback, discusses the design and implementation of a heads-up display, player character information panel, and the active inventory items panel. The special inventory items panel is designed and implemented, as are the non-player character health bar and UI.
Chapter 8, Multiplayer Setup, discusses multiplayer programming using Unity's Unet architecture. This chapter illustrates the concepts using two sample projects. The initial project is a tank game that illustrates the concepts of server client and data synchronization. The second project applies what we have learned to create a scene supporting our character models.
You will need to have a good understanding of the C# language. You will also need to have a good understanding of the basics of the Unity IDE.
You can download the example code files for this book from your account at www.packtpub.com. If you purchased this book elsewhere, you can visit www.packtpub.com/support and register to have the files emailed directly to you.
You can download the code files by following these steps:
Log in or register at
www.packtpub.com
.
Select the
SUPPORT
tab.
Click on
Code Downloads & Errata
.
Enter the name of the book in the
Search
box and follow the onscreen instructions.
Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:
WinRAR/7-Zip for Windows
Zipeg/iZip/UnRarX for Mac
7-Zip/PeaZip for Linux
The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Building-an-RPG-with-Unity-2018-Second-Edition. In case there's an update to the code, it will be updated on the existing GitHub repository.
We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: https://www.packtpub.com/sites/default/files/downloads/BuildinganRPGwithUnity2018SecondEdition_ColorImages.pdf.
There are a number of text conventions used throughout this book.
CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "Mount the downloaded WebStorm-10*.dmg disk image file as another disk in your system."
A block of code is set as follows:
using UnityEngine; using UnityEngine.SceneManagement; namespace com.noorcon.rpg2e {
Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "Select System info from the Administration panel."
Feedback from our readers is always welcome.
General feedback: Email [email protected] and mention the book title in the subject of your message. If you have questions about any aspect of this book, please email us at [email protected].
Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details.
Piracy: If you come across any illegal copies of our works in any form on the Internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected] with a link to the material.
If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.
Please leave a review. Once you have read and used this book, why not leave a review on the site that you purchased it from? Potential readers can then see and use your unbiased opinion to make purchase decisions, we at Packt can understand what you think about our products, and our authors can see your feedback on their book. Thank you!
For more information about Packt, please visit packtpub.com.
Before we get started, it would be best to get a brief history of the genre and understand some of the key elements you will need to consider throughout the design of your RPG.
Here is an overview of what we will be covering in this chapter:
A brief history of the genre
Characteristics of an RPG
Story and setting
Exploration and quests
Inventory systems
Character development
Experience and leveling
Combat systems
User interaction and graphics
Existing or upcoming RPGs
Patterns in RPGs
You might have just started one of your most challenging tasks thus far.
What is an RPG? In short, it is a game in which players assume the roles of characters in a fictional setting, in which the participants assume the roles of characters and collaboratively create stories. Each player determines the actions of their characters based on their characterization, and the actions taken to succeed or fail according to the rules of the game.
There are three varieties of RPGs, as follows:
Tabletop
Live action
Computer RPG
(
cRPG
)
Tabletop and pen-and-paper (PnP) RPGs are conducted through discussions in a small social gathering. There is usually a Game Master (GM) who describes the game world and its inhabitants. The other players describe the intended actions of their characters, and the GM describes the outcomes. This is the format in which RPGs were first popularized, namely through Dungeons & Dragons (D&D).
Live Action Role Playing (LARP) is played more like improvisational theatre. Participants act out their character's actions instead of describing them, and the real environment is used to represent the imaginary setting of the game world. Some LARPs use rock-paper-scissors or a comparison of attributes to resolve symbolically, while other LARPs use physical combat with simulated arms. A movie can be considered a simple LARP; the difference being that in a movie, all actions are scripted, and the players do not have much decision-making to do, whereas in a LARP, the characters can change the outcome of their actions based on their decisions.
cRPGs are tabletop RPGs that have been translated into an electronic format. Early cRPGs influenced all types of electronic gaming, as well as spanning the role-playing video game genre. In short, a cRPG is a video game genre where the player controls the actions of the main character while immersed in a well-defined world.
This book will concentrate on the design and development of a cRPG.
Computer role-playing games take their root from tabletop versions of the genre. Many of the same terminologies, settings, and game mechanics have been carried over from the original tabletop games. Some of these similarities include story-telling and narrative elements, where, throughout the story, the player character will continuously develop their skills and abilities to meet the objective of the game.
Role-playing video games typically rely on a highly developed story and setting, which is divided into a number of quests or levels. Players typically control one or more characters by issuing commands, which are then performed by the player character based on their defined abilities and attributes. Throughout the game, these attributes increase or decrease, and set the personality of the character.
An RPG usually also has a complex and dynamic interaction mechanism, defined and developed between the player character and the world within which they are immersed. This includes interaction with the world environment, as well as other non-character players defined within the world. Due to these factors, there is usually more time allocated to designing and developing the codebase that deals with the behavior and artificial-intelligence (AI) handling such events throughout the game.
The key elements of an RPG are as follows:
Story and setting
Exploration and quests
Items and inventory
Character actions and abilities
Experience and levels
Combat
Interface and graphics
The premise of most role-playing games tasks the player with saving the world, or whichever level of society is threatened. There are often twists and turns as the story progresses, such as the surprise appearance of estranged relatives, or enemies who become friends or vice versa. The game world tends to be set in a historical, fantasy, or science fiction universe, which allows players to do things they cannot do in real life, and helps players suspend their disbelief about the rapid character growth.
As stated previously, RPGs are heavily invested in story-telling. This is one of the main key entertainment factors of the genre. Due to this fact, when you are developing your RPG, you will need to pay close attention to how you develop your story and the characters that are within your story. This, in turn, translates into the kind of environments and settings you will have for your game, and characters within the game.
Traditionally, RPGs progress the plot based on decisions that the player character makes during gameplay. This puts a great deal of pressure on the game designer, who needs to be able to integrate such forks in the gameplay with the main storyline of the game. This also raises the issue of how to program the game to take into consideration of all the different paths within the story.
To make the game more interesting and attractive, the game designer can introduce special triggers within the story to make it more interesting or challenging. This is usually done by introducing new characters and/or areas to discover within an existing level. The following is a simplified description of the storyline and the setting we will be building for our cRPG.
Once upon a time, there was a great kingdom ruled by the great King Zazar. The ruler of the kingdom was a generous lord to his subjects. The kingdom under the rule of Zazar was peaceful and prosperous; however, over time, internal family rivalry and struggle caused cracks in the strong bond that kept the kingdom intact.
Due to mysterious events, the great king decided to move his family away from the kingdom and trust his son to one of the wise elders that he trusted. The kingdom was never the same. Until now! Expanding on our story, in the second edition, we will implement more gameplay, as well as the introduction of quests.
The whole idea behind an RPG is the ability of the player to have the freedom to explore the world in which they have been immersed. The more well defined the world is, the more interesting it will be for the player to explore and in return retain their curiosity and engagement throughout the gameplay.
This is achieved by the narrative of the story developed for the RPG. Players will be specifically given the opportunity to walk around the world and explore their surroundings in order to meet their objectives.
In an open-world RPG, the player is free to roam in the world event after they have met their objective, set by the storyline. In such cases, the player can still explore any area which is no longer needed for the continuation of the quest, but they can spend time exploring the area and maybe meet some other non-player characters that they hadn't previously met while completing their mission. But generally speaking, this is not done by the player; once they meet their objective, they are eager to move on to the next quest. Hence, the question is, how much time and effort do the game designers and developers apply to a region after the main objective has been met? The answer would be not much.
Historically, the player follows a linear sequence of quests in order to realize their goals and objectives within the game. To make the game more engaging, the developer can introduce mini-quests within the main plot of the game at that particular location, to give the player the ability to explore and gain more skills and/or abilities. Since these are not part of the main storyline, they can be triggered anytime a player enters a specific area.
For instance, assume the player has completed the main objective of the level and is ready to move on to the next objective. Now, imagine that we have created an open-world environment where the user can revisit the world anytime they choose. If the player decides to go back and explore a certain area of the world they just completed, and they happen to trigger the event to launch this mini-quest, wouldn't that be a great surprise for the player? Keep in mind that these mini-quests should not affect the main storyline, but they can be used to enhance the player experience. These types of decisions are important when you are developing your game. If they choose not to take on the challenge, you should not penalize them, except if you want to be really mean.
Quests may involve defeating one or many enemies, rescuing a non-player character, item-fetch quests, or location puzzles, such as mysteriously locked doors.
Our game will have a total of four quests. Each quest will have unique objectives that the player will need to complete. The design and development of each quest will be discussed throughout the book as we progress.
Here is a list of the levels we will be designing:
Awakening
The village
Broken forest - the horizon
The kingdom
The game will start by immersing the player in the environment, where our hero will be given the basic training he will need to complete his mission.
One of the main functions and features of an RPG is the inventory system. Throughout the game, the user will come across a vast amount of collectible items that can be used for different purposes within the game to help them progress through the journey. Therefore, RPGs needs to provide a mechanism to help the player store, retrieve, and organize the content relevant to their journey. Take a look at the following screenshot:
As the player progresses throughout their journey in an RPG, they interact with the world they are immersed in. The storyline of the game usually forces the player to interact with the surrounding world and other non-player characters. These interactions are usually in the form of some sort of an exchange. Whether this exchange is done through narration, to provide the player with a better sense of the quest, or real exchange, in terms of items, is up to the game designers and developers.
The game needs a way to keep track of all the interactions between the player character and everything and everyone else. One system that is used to keep track of these interactions is the inventory system.
During the gameplay, players usually start off as a very simple character and part of the gameplay is to elevate their character by exploring the world and collecting items that will help them increase their skills and abilities.
For instance, a player might start their journey with very basic clothes. Throughout the quest, they will either interact with a non-character player, such as a merchant who will provide them with a better set of clothes, and/or some sort of a weapon to get them started. These items will be stored and managed by the inventory system, an example of which is shown in the following screenshot:
The simplicity or complexity of the inventory system will be defined by the complexity of the game and the complexity of the characters within the game. In our game, we will be designing and developing a generic inventory system that can be applied to many different types of items.
Here are some of the items that are usually collected in a game:
Weapons
Armor
Clothing
Special objects
Some of the items are collected or discovered by world exploration, and some of the items are specifically traded throughout the game. If you are setting up a trade system in a game, then you will need to provide the mechanics for the trade. A trade usually takes place while interacting with a non-player character, usually a merchant, and it will use a special window to enable the interaction of the trade to take place.
There is usually a cost associated with any trade. In general, there is a cost associated with everything the player does within the game, and the cost usually either increases the player character's ability and/or experience or decreases it. This can get pretty complex if you dig deeply into it.
The main point to keep in mind is that everything that the player will need to collect and/or manage will be done through the inventory system. Hence, this is one of the most critical features that you will need to put effort into as a game designer and developer.
One other element that can be used to enhance the gameplay for the player, and push them to strategize their quest, is limiting the amount of items they can carry in their inventory.
For instance, in real life, a warrior will have limited ability to carry different types of weapons. Let's assume that in the real world, a warrior can carry a maximum of five different types of weapon at any given time. Now, in the game world, there might be 20 different types of weapon. Do you allow the player to carry all 20 different types when they discover them? Or are you going to limit the quantity to five?
These are the small things that make the gameplay more interesting when planned out properly. There is more to an inventory system, and we will take a look at it in more detail in later chapters.
As with any other part of RPG development, character attributes and actions are highly defined by the storyline of the game. These actions, are performed indirectly within the game when the player commands the character to perform a specific task.
For instance, in a given RPG there will be at least a couple of character classes. The following are some sample class types:
Barbarians
Orcs
Magicians / Wizards
Zombies
Humans
Each character class might even have subclasses of its own, with its own uniquely defined attributes. Again, this will be tightly coupled to your storyline for your RPG.
For instance, we will have the player-character, who is technically the hero of our story and of the game. The hero is usually of a certain character class; let's assume the hero is part of the Human class.
The Human class or race, then, will have some specific characteristics that will be inherited by the player character, or any other non-player character of the same type or class.
The strength of a character within the game is defined by the character class it belongs to and the type of actions it can perform. The performance of a character is defined by the value of the attributes defined within the character's class and race.
For instance, if we take two different character classes and compare them side-by-side, such as a human and an orc, the orc will have far superior strength and brute force than the human. However, the human may have higher intelligence and problem-solving skills, which will out-rate the strength of the Orc if applied properly. Take a look at the following screenshot:
This is another key area where the RPG designer will have to spend a lot of time defining and specifying the specifications for the design and development of the characters within the game. The sky is the limit when it comes to designing and defining your characters, but there are some key attributes that you will need to consider for any RPG.
Most RPGs allow the player to modify their characters before the game starts, or even during game play. By default, every character class will have some default attributes, and the player is allowed to adjust the values based on some modifier. The basic fundamental features allowed for modification are the sex, class, or race of a character.
It all comes down to the budget and resources that are available to you during the production of the game. In some games, you can also introduce ethical attributes into the characteristics of the character. For instance, if you allow the ability to kill or rob innocent bystanders within the game, then the player will become less liked by the friendly non-player characters, and they may not be as friendly or helpful as needed to complete your quest. In other words, you will live by the consequences of your actions!
As a final takeaway, character classes define your character attributes and hence define your character's strengths and weaknesses. These physical attributes can be simplified into the following: dexterity and strength, which determine the performance of a character during battle!
To engage the player and to get them hooked on the game, game designer use mechanics to enhance the performance of the player-character. The progress is what is termed leveling or experience in RPGs.
Leveling and experience are a key element of any role-playing game. A good leveling or experience tree will be defined for any RPG. This allows the player to develop their avatar through game play and become functionally more powerful by gaining more skills, points, and other resources necessary to complete their quest.
