Melee combat in motion-controlled (first-person) VR games is a puzzle that has perplexed, if not outright frightened, many VR developers for years now. In fact, as far as I've seen the two most common solutions to the problem are:
1) Don't let players hit things in the first place. Make combat in the game exclusively
ranged (for example, Arizona Sunshine)
or 2) Let players hit things, but don't impede them in any way! The thought being that ANY disconnect between action and result would cause disassociation and ruin immersion, therefore either 2a) the player has intangible melee weapons that pass through anything without resistance and damage things they pass through, or 2b) The player-character is so superhumanly strong that anything they touch is thrown aside (if not destroyed outright) like it was made of paper-mache (for example, Robo Recall)
In some situations, these can be acceptable, such as Robo Recall where the power-trip of being superhumanly strong is a defining point of the game. But in other circumstances, these may not be good solutions. Solution 1 can leave a player feeling helpless and intangible. Solution(s) 2 can be easily exploited, to the point of the melee option being game-breakingly OP.
So what else is there, hypothetically?
One idea is the "Stamina Bar
" approach, as discussed by @Zoomie
in another thread. The player has a stamina bar which depletes when swinging their weapon (IE moving it in an aggressive-enough fashion that the game registers it as an attempt at attacking/parrying/etc.). Attacks either do 'full damage' as long as you have 'enough' stamina, and greatly reduced damage if you don't, or their damage scales proportionately to the fullness of the stamina bar at the time of attack. Likewise, attempting to block or parry enemy attacks at low stamina would either have reduced or no affect, as your exhausted character is unable to resist the force of the blow (effectively) or possibly even to keep their grip (strong) on their weapon.
A possible addition is a "power attack" mechanic, where the player holds their weapon in a certain fashion (or just "off-screen", or still in general) to "charge up", after which their next 'attack' or series of consecutive attacks are stronger, or a successful parry more effective. This would generally serve as a risk-reward system, as a player could otherwise just be making quick swipes and jabs as often as their stamina bar can fill, and in raising / stilling their hand they are briefly making themself more open to attack, but in return they boost their offensive ability and gain the means to overwhelm a tough enemy's defense.
Different weapons may use stamina more or less per swing, charge-up for power attacks at different rate, and allow different numbers of consecutive attack PER power attack (IE a warhammer can do one mega-swing per charge-up, while charging up a dagger lets you do a flurry of multiple full-force stabs) Likewise when blocking or parrying attacks, the stamina lost in exchange for nullifying the hit may be based on the mass of your weapon versus the mass or overall force of the blocked attack.
Another possible solution is a sort of.. Action-then-Result
system.. (feel free to suggest a catchier term for it)
Essentially, the player's actions are tracked
1:1 but do not (always) serve as the exact motions of the character they are controlling
. Instead, the player's character attempts
to match the player's actions 1:1 but is constrained by maximum rates of movement speed, the weight and balance of their equipped weapon, physical resistance from what they hit, the effects of low stamina or status condition, etc. In ideal situations, the player character will follow the player's movements in effectively real-time, such as a character with good stats and plenty of stamina, swinging a light weapon through the air or a soft target and not being deflected by anything.. conversely in extreme conditions there may be considerable lag between the player's motions and what their character does, for example if they are tired and trying to swing an oversized weapon through a large, armored opponent.
RPG-style stat building could actively influence this system. For example, raising a Dexterity or Speed stat might increase the maximum potential speed the player-character can follow your movements (and the accuracy to which ranged weapons follow your hand motions in general), while raising Strength might decrease
the effect of a weapon's weight (and the resistance of what you hit) ON that speed, and allow you to stand your ground better when blocking / parrying strong blows.
In any case, the player's actual
movements will always be shown
on screen in real-time, through some kind of ghosted image separate from the player-character's body, to prevent total disconnect. This could even be part of the game's lore.. for example, a fantasy game in which the player represents a ghost or deity that takes control of a mortal champion, willing their body to move yet limited by that body's physical limits.
Please, discuss. Add to these ideas. Voice your concerns with how well they would actually work. Suggest entirely new ideas for us to consider. Or talk about how specific VR games so far have handled melee combat, if you've seen one that you thought was done well!
It's hard being the voice of reason when you're surrounded by unreasonable people.