Role Playing Games can be complex to create, with many interacting gameplay systems. We make it easy for you. Learn, step-by-step, how to make the foundations of any good RPG combat system - from scratch.
Role Playing Games can be complex to create, with many interacting gameplay systems. We make it easy for you. Learn, step-by-step, how to make the foundations of any good RPG combat system - from scratch.
In this course we're focusing on the core of any great RPG, giving your players a fun combat moment in a well crafted level, based upon a solid game design, built using a robust code architecture. You will follow our project, but also make the game entirely your own.
This highly acclaimed course was over 200% funded on Kickstarter, and is designed for intermediate users of Unity. We recommend you take at least the first half of our Complete Unity Developer 2D or 3D, or equivalent, as a pre-requisite.
The course can be a standalone course, or can be taken as the first part in our RPG series. The three other separate courses in this series teach the Inventory system, Shops and Abilities, and Dialogue and Quests.
This is a highly realistic and comprehensive introduction to real game development. We'll be taking you through our process step-by-step, with all decisions justified and all avenues explored.
Fancy something a little different to get started? Check out GameDev's other courses, just look for the green logo as your guide.
We will be dealing with player movement, NavMesh navigation, AI pathfinding, save and loading systems, basic pick ups, using asset packs, debug code, making particle effects and more. We'll also give you a robust code architecture for managing more complex projects by setting up namespaces.
You'll need a basic grasp of Unity and C# before you get start, from there we'll be teaching you more advanced programming techniques such as C# delegates, interfaces, co-routines and more.
Building an RPG is an amazing way to level-up your game development skills, so why not join us and get started improving your game development right now?
Get plugged into our communities of amazing developers on Facebook (nearly 20k), in our own TA-curated Community (17k views/day), and our student chat group (10k live at any one time).
In this video (objectives)…
Rick and Sam outline the changes to the course.
After watching (learning outcomes)…
Ready and raring to get started.
(Unique Video Reference: 1_IN_RPG)
In this video (objectives)…
Be clear on what version of Unity we are using and why.
After watching (learning outcomes)…
Be set up with Unity Hub and Unity 2018.3.
(Unique Video Reference: 2_IN_RPG)
In this video (objectives)…
Download and Install Visual Studio CODE
Install required extensions
Changes some of the settings
After watching (learning outcomes)…
Ready to go with your code editor
(Unique Video Reference: 3_IN_RPG)
In this video (objectives)…
What are we building in our project
Inspiration from Diablo 3, Torchlight 2 and Battleheart Legacy
Lots more game design theory later in the course
After watching (learning outcomes)…
Clear on our fixed camera, point to move game
(Unique Video Reference: 4_IN_RPG)
In this video (objectives)…
What are we building in our project
Talk about the different modules
Road map of the learning journey
After watching (learning outcomes)…
Clear on the architectural of the course
In this video (objectives)…
Lucy invites you to join us in our various community support forums in order to ask questions, connect with other students and share your progress.
In this video (objectives)…
Overview of what we'll have accomplished by the end of this section
After watching (learning outcomes)…
Ready and raring to go!
(Unique Video Reference: 1_BM_RPG)
In this video (objectives)…
Add terrain, textures and assets into the scene
Create a very simple sandbox level that we can use for prototyping our game
After watching (learning outcomes)…
You'll have a simple sandbox level that you can use to test the functionality of your game.
(Unique Video Reference: 2_BM_RPG)
In this video (objectives)…
Create a Nav Mesh for our sandbox level
Add Nav Mesh Agent to the Player
Create Mover.cs and add some code to move our Player to a target in the scene
After watching (learning outcomes)…
Understand how to add Nav Mesh and Nav Mesh Agents
(Unique Video Reference: 3_BM_RPG)
In this video (objectives)…
Understand the setting in the Nav Mesh bake tab.
Implement a Nav Mesh Obstacle.
Make our buildings static.
After watching (learning outcomes)…
Deeper understanding of how the Nav Mesh works and what settings to use.
(Unique Video Reference: 4_BM_RPG)
In this video (objectives)…
Use Debug.DrawRay to visualise our ray
Use Camera.ScreenPointToRay to create our ray
After watching (learning outcomes)…
Understand the basics of how Raycasting works
(Unique Video Reference: 5_BM_RPG)
In this video (objectives)…
Use Physics.Raycast to identify where our ray has hit the terrain
Using our hit location we will update our nav mesh agent's destination to reflect where we have clicked
After watching (learning outcomes)…
Move our character using raycasting and nav mesh agent
(Unique Video Reference: 6_BM_RPG)
In this video (objectives)…
Set up our camera.
Create a relationship between the camera and the follow camera.
Create code that points the camera at the player's position.
After watching (learning outcomes)…
How to set up a follow camera that points to the player without spinning around.
(Unique Video Reference: 7_BM_RPG)
In this video (objectives)…
Import animation asset pack and character assets
Discuss difference between Animator, Animator Controller, Animations and Blend Trees
Set up a simple Blend Tree
After watching (learning outcomes)…
How to set up a Blend tree for animation
(Unique Video Reference: 8_BM_RPG)
In this video (objectives)…
Set our animator controller and add avatar.
Implement code that updates our animation based upon the speed of the Nav Mesh Agent.
Tweak so that it looks good.
After watching (learning outcomes)…
Drive our animation speed based upon the Nav Mesh Agent velocity.
(Unique Video Reference: (9_BM_RPG)
In this video (objectives)…
Convert our movement to continuous click and hold
Address a potential issue with our follow camera and the Update method
After watching (learning outcomes)…
Refined your code so that Basic Movement is robust
(Unique Video Reference: 10_BM_RPG)
In this video (objectives)…
Folder layout best practices in Unity.
Our folder structure choices.
Tidying our folders.
After watching (learning outcomes)…
How to layout folders in your own projects.
(Unique Video Reference: 11_BM_RPG)
In this video (objectives)…
Quick overview of what to expect in this section.
After watching (learning outcomes)…
An understanding that this section is about coming up with high level design for your game.
(Unique Video Reference: 1_HL_RPG)
In this video (objectives)…
Download the design document template
Complete the first part of your high level design
After watching (learning outcomes)…
Have written down the high level game design for your game
(Unique Video Reference: 2_HL_RPG)
In this video (objectives)…
The 3 ways to craft your player experience
Examples of games and their player experience
After watching (learning outcomes)…
You'll have identified the core player experience for your game's design
(Unique Video Reference: 3_HL_RPG)
In this video (objectives)…
Complete all the key sections of your 1.5 page GDD
After watching (learning outcomes)…
You'll have clearly documented the high level design for your game
(Unique Video Reference: 4_HL_RPG)
In this video (objectives)…
What features we will teach in this section
(Unique Video Reference: 1_BC_RPG)
In this video (objectives)…
Why is a separate control layer good?
Switching AI and Player control.
Pulling control code out of Mover.cs
After watching (learning outcomes)…
Why to use the control layer paradigm.
(Unique Video Reference: 2_BC_RPG)
In this video (objectives)…
Why are dependencies evil.
Why are dependency cycles even worse.
Layering to reduce dependencies.
Using namespaces to expose our dependencies.
After watching (learning outcomes)…
Why to use namespaces in a project.
(Unique Video Reference: 3_BC_RPG)
In this video (objectives)…
Setting up a target component.
Overview of RaycastAll().
Filtering for components.
After watching (learning outcomes)…
How to process all multiple raycast hits.
(Unique Video Reference: 4_BC_RPG)
In this video (objectives)…
Combat prevents movement.
Why affordance helps the player understand the game.
Understanding early return statements.
After watching (learning outcomes)…
Understand how early returns can affect execution flow.
(Unique Video Reference: 5_BC_RPG)
In this video (objectives)…
Moving towards a moving target.
Stopping a NavMeshAgent.
Calculating whether we are in range.
After watching (learning outcomes)…
Stop a NavMeshAgent from moving.
(Unique Video Reference: 6_BC_RPG)
In this video (objectives)…
Exposing a "Cancel" method.
Distinguishing a move action.
Short circuit operators.
After watching (learning outcomes)…
How to cancel combat when moving.
(Unique Video Reference: 7_BC_RPG)
In this video (objectives)…
Decoupling by introducing a shared dependency.
Implementing the ActionScheduler.
After watching (learning outcomes)…
Cutting circular dependencies.
(Unique Video Reference: 8_BC_RPG)
In this video (objectives)…
What is an interface?
Defining an interface.
Implementing an interface.
Using an interface.
After watching (learning outcomes)…
How to create, implement and use an interface.
(Unique Video Reference: 9_BC_RPG)
In this video (objectives)…
Import attack animations
Create Attack animator state
Create attack trigger
After watching (learning outcomes)…
Trigger attack animation manually within the animator controller
(Unique Video Reference: 10_BC_RPG)
In this video (objectives)…
Fix an issue with an orphaned animation event
Don't trigger by default
Trigger our attack state from code
After watching (learning outcomes)…
Trigger animation state from code
(Unique Video Reference: 11_BC_RPG)
In this video (objectives)…
Adding a attack throttling parameter.
An event throttling pattern in Unity.
After watching (learning outcomes)…
How to throttle any action in Unity.
(Unique Video Reference: 12_BC_RPG)
In this video (objectives)…
Adding a Health component.
The public interface to Health.
Preventing negative health values.
Doing damage with a delay.
After watching (learning outcomes)…
How to implement health in Unity.
(Unique Video Reference: 13_BC_RPG)
In this video (objectives)…
What information do prefabs contain?
How is nesting implemented?
What is a prefab variant?
Creating a prefab variant.
After watching (learning outcomes)…
How prefabs, nested prefabs and variants work.
(Unique Video Reference: 14_BC_RPG)
In this video (objectives)…
Setting up the shared prefabs.
Moving components between prefabs.
Eliminating the old Enemy prefab.
After watching (learning outcomes)…
How to move components between prefab variants.
(Unique Video Reference: 15_BC_RPG)
In this video (objectives)…
Add death state and animation
Create a "die" trigger
After watching (learning outcomes)…
Use Any State withing the Animator Controller to transition to the Death state
(Unique Video Reference:16_BC_RPG)
In this video (objectives)…
Trigger our death animation from code when character's health reaches zero
Check to see if character is already dead so that we dont continue to trigger the death animation
After watching (learning outcomes)…
Trigger death animation when character's health reaches zero
(Unique Video Reference: 17_BC_RPG)
In this video (objectives)…
Stop the attack animation if the player clicks away
Stop attacking the enemy once its dead
After watching (learning outcomes)…
Have finer control on when the player attacks and does not attack
(Unique Video Reference: 18_BC_RPG)
In this video (objectives)…
Give the player a wardrobe update
Use LookAt() to turn the player towards its target
After watching (learning outcomes)…
Rotate game objects so that their forward vector faces the target
(Unique Video Reference: 19_BC_RPG)
In this video (objectives)…
Change our target to be of type Health and tidy up where this will impact
Add logic to see if the target clicked on is dead already and ignore that particular ray in our ray array.
After watching (learning outcomes)…
Adjust our Raycast logic so dead enemies are ignored
(Unique Video Reference: 20_BC_RPG)
In this video (objectives)…
We discuss a process for resolving bugs
Challenge is to figure out the cause of an obscure bug we have found
Fix the bug where the player's stopAttack trigger is not being consumed.
After watching (learning outcomes)…
Further understand the relationship between our animator states and our code states by resolving a combat bug.
(Unique Video Reference: 21_BC_RPG)
In this video (objectives)…
What we will be covering this section
(Unique Video Reference: 1_AI_RPG)
In this video (objectives)…
Creating the AIController.
Using the "Player" tag.
Calculating the distance to player.
Printing when we should attack.
After watching (learning outcomes)…
How to calculate a chase distance condition.
(Unique Video Reference: 2_AI_RPG)
In this video (objectives)…
Sharing the interface to Fighter.
Updating the PlayerController.
Triggering fighting from the AIController.
After watching (learning outcomes)…
How to reduce work by sharing interfaces.
(Unique Video Reference: 3_AI_RPG)
In this video (objectives)…
Cancelling the current action.
Disabling Player and AI control.
Disabling the NavMeshAgent.
After watching (learning outcomes)…
How to keep death components decoupled.
(Unique Video Reference: 4_AI_RPG)
In this video (objectives)…
The OnDrawGizmos message.
The Gizmos API.
How to set a colour.
Drawing a chase radius in blue.
After watching (learning outcomes)…
How to create gizmos for your own components.
(Unique Video Reference: 5_AI_RPG)
In this video (objectives)…
What behaviour we want.
What does the guard know?
Storing the state.
Returning to original position.
After watching (learning outcomes)…
How to think about AI state.
(Unique Video Reference: 6_AI_RPG)
In this video (objectives)…
Remembering the last time since we saw the player.
Handling multiple states.
Why we don't need a Finite State Machine.
After watching (learning outcomes)…
How to handle multiple AI states.
(Unique Video Reference: 7_AI_RPG)
In this video (objectives)…
How to represent waypoints.
How to visualise them.
Creating a PatrolPath component.
Drawing Gizmos for each child.
After watching (learning outcomes)…
Create waypoint paths in your own game.
(Unique Video Reference: 8_AI_RPG)
In this video (objectives)…
Refactoring GetWaypoint().
Introducing GetNextIndex().
Drawing the line.
Implementing GetNextIndex().
After watching (learning outcomes)…
Drawing loops of waypoints
(Unique Video Reference: 9_AI_RPG)
In this video (objectives)…
Get reference to patrol path.
Outlining the algorithm.
Implementing GetWaypoint, CycleWaypoint and AtWaypoint.
After watching (learning outcomes)…
How to implement patrol behaviour.
(Unique Video Reference: 10_AI_RPG)
In this video (objectives)…
Holding down to attack.
Implementing dwelling.
After watching (learning outcomes)…
How to implement a dwell time at waypoints.
(Unique Video Reference: 11_AI_RPG)
In this video (objectives)…
Overview of this section
We'll be creating a gameplay moment
We'll be getting our hands dirty with Cinemachine and Timeline
After watching (learning outcomes)…
Be clear on the focus for this section
(Unique Video Reference: 1_FM_RPG)
In this video (objectives)…
Discuss what we mean by gameplay moment
Design a gameplay moment based upon our current tools at our disposal
After watching (learning outcomes)…
Be clear on the importance of creating interesting gameplay moments for your player
(Unique Video Reference: 2_FM_RPG)
In this video (objectives)…
Plan your moment
Sketch your moment
Share your sketch
After watching (learning outcomes)…
Be clear on how to plan your gameplay moment by sketching the important aspects of it
(Unique Video Reference: 3_FM_RPG)
In this video (objectives)…
Adding a skybox so our environment for a quick bit of polish
Use an image on a quad as an in-scene reference
Adding solid colour textures to use as spray paint
Adding trees to give quick flavour
After watching (learning outcomes)…
Getting ready to effectively create an environment for our moment
(Unique Video Reference: 4_FM_RPG)
In this video (objectives)…
Reshape our terrain to suit our sketch
Place enemies
Add notes in our level
After watching (learning outcomes)…
Quickly craft an environment to match your level moment sketch
(Unique Video Reference: 5_FM_RPG)
In this video (objectives)…
Figure out how many hits to make a kill
Tune the health of player and enemies
Tune the damage of player and enemies
After watching (learning outcomes)…
Have a starting point for tuning your combat encounters
(Unique Video Reference: 6_FM_RPG)
In this video (objectives)…
Update AIController.cs to provide 2 different speeds for enemy AI
Tweak patrol paths and chase radius for all enemies in our scene
After watching (learning outcomes)…
Able to set different speeds for enemy locomotion based upon the state they are in
(Unique Video Reference: 7_FM_RPG)
In this video (objectives)…
Install Cinemachine
Add Cinemachine Brain and Virtual Camera
Create a follow camera
After watching (learning outcomes)…
Add your first virtual camera, controlled by the Cinemachine Brain
(Unique Video Reference: 8_FM_RPG)
In this video (objectives)…
Create a playable director for our timeline sequence
Add more virtual cameras that we can blend between
Add a dolly track and set up a dolly camera
Make a complete sequence
After watching (learning outcomes)…
Create a flowing cinematic sequence using Cinemachine and Timeline
(Unique Video Reference: 9_FM_RPG)
In this video (objectives)…
Add trigger volume to trigger our sequence
Ensure that the sequence can only be triggered once and that only the player can trigger it
After watching (learning outcomes)…
Trigger our cut scene when the player runs through a trigger volume
(Unique Video Reference: 10_FM_RPG)
In this video (objectives)…
Overview of the observer pattern.
How to implement the observer pattern with C# events.
Using C# event to get notified of PlayableDirector events.
After watching (learning outcomes)…
How to implement an observer pattern in C#.
(Unique Video Reference: 11_FM_RPG)
In this video (objectives)…
Cancelling the current action.
Fixing a fighter cancellation bug.
Disabling and re-enabling control.
After watching (learning outcomes)…
How to disable player control.
(Unique Video Reference: 12_FM_RPG)
In this video (objectives)…
Overview of this section
We will learn about coroutines...
Asynchronous level loading
Fading in and out.
After watching (learning outcomes)…
Be clear on the focus for this section
(Unique Video Reference: 1_SM_RPG)
In this video (objectives)…
Prefab our required objects for a new scene
Create new scene and quickly populate it with an entry and exit point
Tidy up
After watching (learning outcomes)…
Create a second sandbox scene
(Unique Video Reference: 2_SM_RPG)
In this video (objectives)…
Creating a portal prefab.
Creating a portal script.
Loading scenes by index.
After watching (learning outcomes)…
Be able to load scenes from triggers.
(Unique Video Reference: 3_SM_RPG)
In this video (objectives)…
Why is an IEnumerator.
How does yield return work?
How are these features used for coroutines?
After watching (learning outcomes)…
Understand how coroutines work.
(Unique Video Reference: 4_SM_RPG)
In this video (objectives)…
Introduce a return portal in our second level.
Load our level asynchronously.
Run code after the level finishes loading.
After watching (learning outcomes)…
Use coroutines to wait for a scene to load.
(Unique Video Reference: 5_SM_RPG)
In this video (objectives)…
Introduce a spawn point transform.
Locate the portal we want to spawn to.
Updating the player's location.
After watching (learning outcomes)…
Reposition a player at a spawn point.
(Unique Video Reference: 6_SM_RPG)
In this video (objectives)…
Why enums make good cross scene references.
Configuring our portals.
Finding the corresponding portal on load.
After watching (learning outcomes)…
How to link objects between scenes with enums.
(Unique Video Reference: 7_SM_RPG)
In this video (objectives)…
Create our Fader canvas.
Fading with a CanvasGroup.
After watching (learning outcomes)…
Use CanvasGroups for fading.
(Unique Video Reference: 8_SM_RPG)
In this video (objectives)…
Create a Fader class.
Implement a FadeOut coroutine.
Generalise the FadeIn coroutine.
Stringing coroutines together.
After watching (learning outcomes)…
Nesting coroutines to wait for long running actions.
(Unique Video Reference: 9_SM_RPG)
In this video (objectives)…
Make the fader a singleton.
Share our core setup between scenes.
Fade in and out on scene loads.
After watching (learning outcomes)…
How to use the singleton pattern to keep objects between scenes.
(Unique Video Reference: 10_SM_RPG)
In this video (objectives)…
Overview the purpose of the section.
See how the saving system works.
After watching (learning outcomes)…
Know what we will make this section.
(Unique Video Reference: 1_SA_RPG)
In this video (objectives)…
A warning about the use of the BinaryFormatter class.
In this video (objectives)…
Importing the Asset Pack.
Overview of the main classes.
Overview of the architecture.
After watching (learning outcomes)…
Know what the main classes do.
(Unique Video Reference: 2_SA_RPG)
In this video (objectives)…
Why we need a Saving prefab.
Why we need the wrapper class.
Where the save file ends up.
After watching (learning outcomes)…
How to trigger saving and loading.
(Unique Video Reference: 3_SA_RPG)
OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.
Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.
Find this site helpful? Tell a friend about us.
We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.
Your purchases help us maintain our catalog and keep our servers humming without ads.
Thank you for supporting OpenCourser.