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

Index

A

  • animation curve
    • setting / Setting the animation curve
  • Animator Controller
    • used, for creating character motion / Animator Controller
    • animation states, creating / Animation states
  • artificial-intelligence (AI) / Characteristics of an RPG
  • asset inventory, Zazar dynasty
    • about / Asset inventory
    • environment assets / Environment assets
    • character assets / Character assets
  • Asset Store / Environment assets
  • Awakening scene, Zazar dynasty
    • creating / The Awakening
    • terrain model, using / Using the terrain model
    • custom toolkit, using / Using a custom toolkit
    • skybox, using / Skybox

B

  • Base Character class
    • attributes / Base character class attributes
  • built-in erosion types, Terrain toolkit
    • Thermal Erosion / Terrain toolkit in a nutshell
    • Hydraulic Erosion / Terrain toolkit in a nutshell
    • Tidal Erosion / Terrain toolkit in a nutshell

C

  • character
    • definitions / Character definitions
    • assets / Character assets
    • states, implementing / Character states     
  • character assets, Zazar dynasty
    • about / Character assets
    • Barbarians / Barbarians
    • Orcs / Orcs
    • Villagers / Villagers
    • Free Assets / Free Assets
  • character controller
    • animation, modifications / Modification to animations
  • character model
    • about / Character model
    • default character models / Default character models
    • modifying / Let's get started
    • rigging / Rigging your model
  • character motion
    • implementing / Character motion
    • creating, with Animator Controller / Animator Controller
    • handling, with character controller / Character controller
  • Citadel
    • about / Citadel: Forged with Fire
    • reference / Citadel: Forged with Fire
  • combat system
    • about / Combat system
    • types / Combat system
  • contest tree / Contest tree
  • cRPG story
    • about / A glimpse of a cRPG story
    • quests / A glimpse at our exploration and quests
    • exploration / A glimpse at our exploration and quests
  • customizable parts, player
    • shields / Customizable parts
    • armor / Customizable parts
    • body type / Customizable parts
    • boots / Customizable parts
    • helmet / Customizable parts
    • weapons / Customizable parts
    • skins / Customizable parts
  • Cyberpunk 2077
    • about / Cyberpunk 2077
    • reference / Cyberpunk 2077

D

  • default character models
    • about / Default character models
    • Barbarian / Barbarian
    • Villager / Villager
    • Orc / Orc
  • dynamic item viewer
    • designing / Designing a dynamic item viewer
    • scroll view, adding / Adding a scroll view
    • elements, adding to PanelItem / Adding elements to PanelItem and Scroll View
    • elements, adding to ScrollView / Adding elements to PanelItem and Scroll View
    • txtItemElement, adding dynamically / Adding txtItemElement dynamically

E

  • environment assets, Zazar dynasty
    • about / Environment assets
    • Medieval Environment Pack / Medieval Environment Pack
    • Terrain Toolkit 2017 / Terrain Toolkit 2017
    • Nature Starter Kit 2 / Nature Starter Kit 2

F

  • fbx / Creating an inventory item
  • filter, types
    • Smooth / Terrain toolkit in a nutshell
    • Normalize / Terrain toolkit in a nutshell
  • First-Person Shooter (FPS) / Designing a heads-up display

G

  • game level controller
    • modifying / Changes to the game level controller
  • GameMaster
    • about / GameMaster
    • audio, managing / Managing game settings and audio
    • game settings, managing / Managing game settings and audio
    • scenes, managing / Managing scenes
    • improving / Improving GameMaster
    • level controller / Level controller
    • audio controller, creating / Audio controller
    • code, testing / Testing
  • Game Master (GM) / A brief history of the genre
  • genre
    • history / A brief history of the genre

H

  • Heads-Up Display (HUD)
    • about / User interaction and graphics
    • designing / Designing a heads-up display, HUD basics, Our design
    • framework, creating / HUD framework
    • design, completing / Completing our HUD design
    • character info panel, creating / Character info panel
    • active inventory items panel, creating / Active inventory items panel
    • items panel, creating / Special items panel
    • enemy stats, displaying / Enemy stats in the HUD
    • NPC stats user interface, creating / NPC stats user interface
    • NPC canvas, creating / Creating the NPC canvas
    • player character, attacking / NPC taking a hit

I

  • inventory interface
    • designing / Designing an inventory interface
    • UI framework, creating / Creating the inventory UI framework
    • dynamic item viewer, designing / Designing a dynamic item viewer
    • final inventory item UI, building / Building the final inventory item UI
  • inventory item
    • creating / Creating an inventory item
    • prefab, creating / Creating the prefab
    • agent, adding / Adding an inventory item agent
    • as prefabs / Inventory items defined as prefabs
    • category buttons, hooking / Hooking the category buttons and displaying the data
    • player character, modifying / Inventory items and the player character
    • applying / Applying inventory items
    • applying, to player character / How it looks
  • inventory system
    • about / Inventory system
    • designing / Designing an inventory system
    • weighted inventory / Weighted inventory
    • item types, determining / Determining item types
    • UI, interacting / Integrating the UI with the actual inventory system
    • category buttons, hooking / Hooking the category buttons and displaying the data
    • data, displaying / Hooking the category buttons and displaying the data
    • testing / Testing the inventory system
  • Inverse Kinematics (IK)
    • about / Inverse Kinematics
    • animation curve, setting / Setting the animation curve

L

  • Last Man Standing / Last Man Standing
  • level design, Zazar dynasty
    • about / Level design
    • stage, setting / Setting the stage
    • terrain toolkit / Terrain toolkit in a nutshell
    • Awakening scene, creating / The Awakening
    • testing / Testing the level
  • Live Action Role Playing (LARP) / A brief history of the genre

M

  • Medieval Environment Pack / Medieval Environment Pack
  • MU Legend
    • about / MU Legend
    • reference / MU Legend
  • multiplayer game
    • challenges / Challenges of a multiplayer game
    • implementing / Initial multiplayer game
    • networking components / Fundamental networking components
    • my tank networking project, creating / My tank networking project
    • player character, adding / Adding a player character
    • enemy tank, adding / Adding the enemy tank
    • building / Building and testing
    • testing / Building and testing

N

  • Nature Starter Kit 2 / Nature Starter Kit 2
  • Negotiated Contest / Negotiated Contest
  • network-enabled RPG characters
    • about / Network-enabling RPG characters
    • scene, creating / Creating a scene for our RPG
    • networked player character, creating / Networked player character
    • networked non-player character, creating / Networked non-player character
    • player customization, synchronizing / Synchronizing player customization and items
    • items, synchronizing / Synchronizing player customization and items
    • NPCs, spawning / Spawning NPCs and other items
    • items, spawning / Spawning NPCs and other items
    • testing / Testing our network-enabled PC and NPC
  • network callbacks
    • OnStartServer() / Network callbacks
    • OnStartClient() / Network callbacks
    • OnSerialize() / Network callbacks
    • OnDeSerialize() / Network callbacks
    • OnNetworkDestroy() / Network callbacks
    • OnStartLocalPlayer() / Network callbacks
    • OnRebuildObservers() / Network callbacks
    • OnSetLocalVisibility() / Network callbacks
    • OnCheckObserver() / Network callbacks
  • networking components
    • Network Manager / Fundamental networking components
    • Network Lobby Manager / Fundamental networking components
    • Network Manager HUD / Fundamental networking components
    • Network Identity / Fundamental networking components
    • Network Transform / Fundamental networking components
  • network programming / What's next?
  • non-player character
    • about / Non-player characters
    • basics / Non-player character basics
    • setting up / Setting up the non-player character
    • Animator Controller (AC), creating / NPC Animator Controller
    • attack mode, implementing / NPC Attack
    • AI, implementing / NPC AI
    • player character, interacting with / PC and NPC interaction

P

  • patterns, RPG
    • about / Patterns in RPG
    • terminology / Terminology
    • contest tree / Contest tree
    • Last Man Standing / Last Man Standing
    • Negotiated Contest / Negotiated Contest
  • pen-and-paper (PnP) / A brief history of the genre
  • player character
    • customizing / Customizing the player character
    • customizable parts / Customizable parts
    • User Interface (UI), using / User interface
    • customization code / The code for character customization
    • state, preserving / Preserving our character state
    • customization scene / Recap
    • interacting, with non-player character / PC and NPC interaction
    • data management / Player data management
    • class enhancements / PC class enhancements
    • customization class, updating / Character customization class update
    • inventory item, applying / How it looks
    • code, enhancing / Enhancing the code
  • player character, multiplayer game
    • adding / Adding a player character
    • variables, synchronizing / Variable synchronization
    • network callbacks / Network callbacks
    • commands, sending / Sending commands
    • client RPC calls, creating / Client RPC calls
    • cannonball, creating for tank / Creating the cannonball for the tank
    • tank prefab, creating / Creating the tank prefab and configuring the network lobby manager
    • network lobby manager, configuring / Creating the tank prefab and configuring the network lobby manager

R

  • Raycasting / Enhancing the code
  • Real-Time Strategy (RTS) game / Designing a heads-up display
  • Role-Playing Game (RPG)
    • about / A brief history of the genre, Existing or upcoming RPG games, Designing a heads-up display
    • Tabletop / A brief history of the genre
    • Live action / A brief history of the genre
    • Computer RPG (cRPG) / A brief history of the genre
    • characteristics / Characteristics of an RPG
    • MU Legend / MU Legend
    • Titan Siege / Titan Siege
    • Citadel / Citadel: Forged with Fire
    • Cyberpunk 2077 / Cyberpunk 2077
    • building / Building our RPG
  • Root Motion / Character motion
  • RPG, key elements
    • story / Story and setting
    • setting / Story and setting
    • exploration / Exploration and quests
    • quests / Exploration and quests
    • inventory system / Inventory system
    • character attributes / Character attributes and actions
    • character actions / Character attributes and actions
    • experience / Experience and leveling
    • leveling / Experience and leveling
    • combat system / Combat system
    • user interaction / User interaction and graphics
    • graphics / User interaction and graphics

T

  • terminology, RPG games
    • attribute / Terminology
    • character / Terminology
    • characteristics / Terminology
    • common characteristics / Terminology
    • conflict / Terminology
    • contest / Terminology
    • derived attributes / Terminology
    • drama / Terminology
    • flaw / Terminology
    • fortune / Terminology
    • Game Master / Terminology
    • gauge / Terminology
    • gift / Terminology
    • karma / Terminology
    • Non-Player Character (NPC) / Terminology
    • Optional Characteristics / Terminology
    • player / Terminology
    • Player Character (PC) / Terminology
    • Primary Attribute / Terminology
    • rank / Terminology
    • Ranked Trait / Terminology
    • Selected Characteristic / Terminology
    • shared gauge / Terminology
    • skill / Terminology
    • trait / Terminology
  • Terrain Toolkit 2017
    • about / Terrain Toolkit 2017
    • using / Setting the stage
  • Terrain Toolkit 2017, pre-defined generators
    • Voronoi / Terrain toolkit in a nutshell
    • Fractal / Terrain toolkit in a nutshell
    • Perlin / Terrain toolkit in a nutshell
  • Titan Siege
    • about / Titan Siege
    • reference / Titan Siege

U

  • UI elements
    • code, integrating / Integrating the code
  • Unity Editor / Setting the stage

W

  • weighted inventory / Weighted inventory

Z

  • Zazar dynasty
    • asset inventory / Asset inventory
    • level design / Level design
    • main menu, creating / Creating the main menu
    • GameMaster script, creating / Creating the GameMaster script
  • Zazar dynasty, quests
    • about / Exploration and quests
    • awakening / Awakening
    • village / The village
    • broken forest / Broken forest – the horizon
    • kingdom / The kingdom
  • Zazar dynasty, story
    • about / The story of the Zazar dynasty
    • backstory / Backstory
    • exploration / Exploration and quests
    • quests / Exploration and quests