Danger Dwarves

Project date: 06-09-2018 - 09-11-2018
My tools used: Unity and Photon Networking

I was the lead programmer of this project and I was responsible for most of the networking, the combat system which consists of an entity system (health, damage calculations, status effects, stats) and a weapon system and programming most of the gameplay mechanics like bounties, various attacks (projectiles) and ofcourse the player controller.
Besides programming I was responsible for creating particle effects for various attacks and events.


Entity
The script Entity is the core part of every interactable and acts as a hitbox. Every detected hit gets its damage calculated based on the incoming data and the hit entity's stats. Health is a seperate class initialised within Entity and sends events to an associated HealthBar if there is one. Health and HealthBar also handle showing various damage texts.

Status Effects
StatusEffects is another system within Entity. Danger Dwarves features a range of status effects like bleed, slow, armor/weapon break or poison. These effects can be applied by hitting an entity while having some imbue active on your weapon.

Combat
Combat in Danger Dwarves consists of primary and secondary attacks and is focused around projectiles. WeaponSlot handles attack timers and invokes a bunch of static events for the equiped weapon to respond to. WeaponSlot inherits from EquipmentSlot which handles equiping various equipment and returning the correct equipment IDs so that every client knows who to parent the newly spawned item to.

WeaponPrefab sits on the actual weapon and listens for WeaponSlot events like OnUsePrimary and OnUseSecondary. When OnUsePrimary gets called a ranged weapon will fire a projectile using the ProjectileManager which makes sure to grab the correct projectile from the ObjectPooler with the correct data on every connected client. The same thing happens when OnUseSecondary gets called and applies for both ranged and melee weapons because all of our secondary special attacks are projectile based. Only a melee primary attack is different than the rest of the attacks. A melee primary attack will play an animation where an animation event will tell the WeaponPrefab to check for enemies in a radius around the weapon using Physics.OverlapSphereNonAlloc(), check if the player is facing them and if yes, hit them.

SUMMARY
Danger Dwarves is a top-down online multiplayer rpg inspired by Diablo.
Play solo / offline / or with a group of friends and clear dungeons together or just chill / pvp in the ingame hub. Gain strength by killing mobs, upgrading your gear and exploring dungeons. The game's combat system is focused around primary and secondary attacks and features a randomized loot and item system.