Advertisement

When the Player and the CPU attacks at the same time

Started by January 21, 2016 07:49 PM
16 comments, last by Dragonsoulj 8 years, 10 months ago

Or have it based upon certain [...] characters [...]. Can't riposte Boss B, but you can Boss A.


A good way to to confuse and annoy your players is to establish a mechanic and communicate the rules to the player via gameplay, and then ignoring your own rules with future enemies.

Did a bit of research on martial arts to find scenarios that match my problem. I found nothing but I do have an idea. I going to have 4 states the character can be in after meeting an enemy's attack. Stumble , Wobble, Blasted, and Destroyed. If the character stumble he can parry, dodge, attack again, or block. Wobbling make the character lose the ability to block. Blasted knocks the character back and the player can only dodge or block. Destroyed does half damage, and little knock back and randomly allow the character to parry or block.

Advertisement

In actual combat it is perfectly possible to have both sides attack and hurt/kill each other.

Depending on the nature of your game, I would say this is acceptable, and even a good mechanic to discourage random button mashing and force the user into more careful thoughts about what they're doing.

Another aspect that ties into this is that just because you've stabbed your opponent isn't always an indicator that they're not going to just stab you right back. Being able to deliver a killing blow without taking one in return is kind of an important factor in real fights.

Old Username: Talroth
If your signature on a web forum takes up more space than your average post, then you are doing things wrong.


Destroyed does half damage, and little knock back and randomly allow the character to parry or block.

I have a very different definition of Destroyed.

In actual combat it is perfectly possible to have both sides attack and hurt/kill each other.

Depending on the nature of your game, I would say this is acceptable, and even a good mechanic to discourage random button mashing and force the user into more careful thoughts about what they're doing.

Another aspect that ties into this is that just because you've stabbed your opponent isn't always an indicator that they're not going to just stab you right back. Being able to deliver a killing blow without taking one in return is kind of an important factor in real fights.

I was just about to mention this, actually.

The most obvious, and most common, way to deal with the situation in games is that nothing special happens when two attacks collide, they just hit or miss as normal.

Attacks interacting with one another is actually fairly uncommon, and when it does occur, it's more often only in specific scenarios (e.g. weapon attacks in Samurai Shodown can clash with one another - triggering a minigame where the loser is temporarily disarmed - but only if certain requirements are met) rather than a general occurrence.


Destroyed does half damage, and little knock back and randomly allow the character to parry or block.

I have a very different definition of Destroyed.

I'm a generous man.

Advertisement

Are you sure it's an issue? Unless it's a turn based game it's almost impossible for two things to happens at exactly same time (especially if you have a low timescale, below a second). Anyway, in the rare situation when it happens I would prioritise the player (psyhological, if you both hit at the same time and the enemy deals damage the player sees it as a bug and complains, but if the hit is scored by the player he/she thinks "I barely managed it but I was slightly faster").

Stellar Monarch (4X, turn based, released): GDN forum topic - Twitter - Facebook - YouTube

Are you sure it's an issue? Unless it's a turn based game it's almost impossible for two things to happens at exactly same time (especially if you have a low timescale, below a second). Anyway, in the rare situation when it happens I would prioritise the player (psyhological, if you both hit at the same time and the enemy deals damage the player sees it as a bug and complains, but if the hit is scored by the player he/she thinks "I barely managed it but I was slightly faster").

Its more frame based than time based, 16 ms overlap is rare, but not impossible. Though because of that rarity, I'd probably just do whatever takes the least amount of work, unless the OP really wants to turn it into a feature, and then I'd probably suggest opening the number of frames that would cause the feature to happen. (For example: Swordlock would occur if there is ever an overlap during any part of the attack animations of either pair, instead of just the brief frame that the attack animation checks for hitting the opponent's collider.

All of the enemies aren't the same size as the character. Also that is the functionality of blocking. would it be redudant to block by blocking and block by attacking too?


Since enemies vary in size, adjust knock back accordingly. Bigger enemies push the player back further than themselves, and in some cases, do not get pushed back by the player.

This topic is closed to new replies.

Advertisement