Welcome to Section 3 of the Unity RPG course – the full course is part of a Kickstarter campaign which was over 200% funded. You will benefit from the fact we have already taught over 360,336 students game development, many shipping commercial games as a result.
Customise character abilities, weapons, characters and enemies. This includes multiple damage types, modifiers, sounds, animations. By the end you can create your core combat experience.
You're welcome to download, fork or do whatever else legal with all the files! Please note that future sections contain assets with commercial use restrictions. The real value is in our huge, high-quality online tutorials that accompany this repo. You can check out the course here: Unity RPG
This is a Unity project. If you're familiar with source control, then "clone this repo". Otherwise download the contents, and navigate to Assets > Levels
then open any .unity
file.
This branch is the course branch, each commit corresponds to a lecture in the course. The current state is our latest progress.
Here are the lectures of the course for this section...
- What’s coming in this section.
- Review and update your WBS
- CHALLENGE
- Decide on next priorities
- GDD Template And Our GDD
- CHALLENGE
- My chosen options for upgrading to Unity 5.6
- Review Unity's release notes
- What a namespace is and why it's useful
- How to use namespaces in C#
- Fixing a possible projectile bug
- What is an Animator Override Controller?
- How to override animations at runtime
- The hidden dependency in our asset pack
- How to prevent animation events breaking code
- Challenge: Apply animations to weapons.
- Taking control of our animations
- Drawing out our dependencies
- Taking control of Standard Assets
- Refactor our Player class
- Move properties from Player to Weapon
- Review AudioTrigger.cs from Gist
- Set-up and test sound trigger prefab
- How to source your audio clips
- Performance issues from terrain
- Challenge: Tune terrain settings
- Our level's requirements
- Pitch shifting a character
- Challenge: create your dialogue
- Our bug fixing workflow
- Bug tracking and task scheduling
- Challenge
- Lets fix some issues
- Tidy up scene and import new assets
- Challenge: Place props in your scene
- Quick look at visual improvements
- Weapon damage design
- Prototype requirements for weapons
- Adding a third weapon and tuning all three
- Lets investigate our scene lighting
- Import and set up a new skybox
- Desired bridge look and navmesh issue
- Create your bridge
- Import and set up new character meshes
- Unity 5.6.1 upgrade, Mac differences
- Extending the player by composition
- Setup a new delegate in CameraRaycaster
- De-bounce the right-click button with
GetButtonDown
- Subscribe to event in new
Energy.cs
class - Reduce energy on each right click
- Update the energy bar.
- How to use source control to keep refactors honest
- Our new
CameraRaycaster
architecture
- Adding
onMouseOverPotentiallyWalkable
event - Removing our custom editor script
- Ensuring click to move still works.
- Remove
CursorAffordance.cs
altogether! - Remove the
CameraRaycasterEditor
editor script - Implement move to enemy on power attack
- Simplify the
CameraRaycaster
,Energy
andPlayerMovement
- What are the choices the player can make in your combat?
- Types of Special Abilities
- Where to start with implementation
- Abilities require serialisable data AND behaviour
- We can only serialise MonoBehaviours via prefab or scene
- This causes more contention on those files, and is wrong place
- A ScriptableObject moves ability config data to a .asset file
- ... but SOs cannot interact with the world
- so the Ability also needs a MonoBehaviour
- One ability can have multiple configs
- Therefore make the config add the behaviour component at runtime.
- Setup an 'ISpecialAbilty' interface
- Use an abstract class to create
SpecialAbilityConfig
- Inherit 'PowerAttackConfig' from this new abstract class
- Provide right-click asset menu to create new special ability.
- Remove
pointsPerHit
from ourEnergy
component - Move right-click handling to the
Player
- Prepare to read energy cost from special ability.
- Fix a bug with our AudioTrigger component
- Make it possible for the player to equip several abilities
- Use a protected property to reference
behaviour
component - Use this property to forward calls to
Use()
to the component.
- Combine top-level special ability code into one file
- Create a struct to pass ability use parameters
- Finish Power Attack behaviour inc energy cost.
- Describe your challenge
- Introduce
Physics.ShpereCastAll()
API - Demonstrate my Area Of Effect solution.
- Why we're not using coroutines yet
- Challenge: make energy regenerate over time
- Fix enemy sliding bug (and extra animator).
- The importance of game feel
- What things to look for with your audit
- Words to describe your game feel
- Examples of poor game feel
- Tuning of player to enemy collision
- A structure for approaching your spreadsheet design
- Specific implementation of some "Soul" aspects
- Different options for progression
- Progression theory and preferences
- Populating our spreadsheet's spine
- Detect when the mouse is in the game rectangle
- Stop raycasting when the mouse is over Unity editor UI.
- How to test if the player is dead
- Use an
IEnumerator
coroutine for timing - Use
WaitForSecondsRealtime()
method.
- Add an array of damage sounds
- Add a single death sound (for now).
- Fix health bug
- Implement death animation
- Projectile firing rate variation?
- Import brand-new HUD graphics
- Make liquid effect health and energy
- How a "Filled" image works
- Use "Fill Amount" property to animate UI.
- Adding special ability icons to slots
- Fixing bug with game window resizing.
- Discussing our current Linear approach
- Introducing a range of level design paradigms and what they could mean for your game.
- Challenge: add choice to your level
- Review our current level for ideas on how to add more choice.
- Updated grass textures
- New free assets as part of student pack from Synty
- Synty particle pack
- Particle effects overview
- Where to use particles - a review of Torchlight 2
- Where we will add particles to our game
- Create an ambient particle effect in the world
- Have the particle effect follow the character
- Create particle system prefabs for special abilities
- Access prefabs from our scriptable objects
- Trigger particle systems at runtime in C#
- How to destroy a particle when it has finished playing.
- Create a self-heal special ability yourself.
- Adding key affordances to the UI
- Scanning for number key presses
- Triggering and tweaking special abilities.
- Separate damage and healing methods
- Add sound triggers to all abilities
- Tantalise idea of changing interface to inheritance
- Parent healing particle system to player.
- How to count lines of code added
- Adding additional weapon damage
- Adding critical hit calculation & particles.
- Creating particle systems within particle system
- Alter rotation of emission
- Use burst emission
- Tune and tweak particles
- Create plus symbol texture for a different look
- Implement self heal particle system
- We now know what our game will be, so its time to shift gears.
- Well done on your great work so far!
That's it, in the next section we will be adding the final features, refactoring and making our core combat fun.