Notifications
Legion Combat Framework
Updated a year ago
Game
In development
100
0
Platform(s)
Windows; Linux
Over-the-shoulder multiplayer combat framework
Legion Combat Framework (LCF) combines Mecanim and UNET to create a seamless over-the-shoulder multiplayer combat system.

IK-Driven Character Controller/Animator

On the client side, the Character's Animator is not functionally linked to the Character's Controller; Character movement operates at the same capacity regardless of its Animation state. The Animator uses three tidy state machine layers (Lower Body, Upper Body, and Full Body) in addition to an IK pass to accurately reflect the input given by the player, which is synchronized at a high frequency with the server and then other clients using RPC calls. This allows players' movement, attacks, and other actions to occur independently of each other, and for other players to accurately perceive those actions.

Multiplayer: Favoring the Offense

In most cases, I want the game to trust the attacking player when it comes to collisions. (As of now, it trusts the attacking player in all cases.) Since UNET restricts player clients from sending RPC functions to server entities they don't have authority over, I can't directly affect the defending player based on a collision, so I've set up an RPC chain that propagates the CombatEvent resulting from a collision up to the attacker's server entity, then to the defender's server entity before reflecting the result back to the defender's client (as shown in the flowchart in image #2).

Guard HP Pool

Combatants in the Legion framework possess two HP pools: the normal Health pool, and a special Guard pool, which acts as a fast-replenishing buffer for incoming hits. The amount of Guard a character possesses is effectively used as an "evasion" parameter which, when checked against the attacker's accuracy, determines whether the attack results in a Dodge, Block, Parry, or Wound. In all cases except Wound, the damage is subtracted from a character's Guard instead of their Health, which in turn makes them less likely to evade future attacks. The expectation is that characters with a defense-centric role (tanks, if you will) should not only have massive Guard pools, but also get access to abilities that can restore their own Guard without having to duck out of combat.
The current code base can be found on GitHub, and I went ahead and made my Trello board public.

Dan Wild
XR Developer - Programmer
3
Supported Platforms
Windows; Linux
Comments