Defence Moves in a Turn-Based Fight

Discussion in 'Game Design, Development And Publishing' started by Druid TC, Dec 29, 2018.

  1. Druid TC

    Druid TC Yellow Dog

    Joined:
    Jun 20, 2016
    Posts:
    32
    I am currently working on a lil fight mechanic which I intend to integrate into a more generic RPG-type game.

    When the player enters combat, an Undertale-like UI is displayed, with the enemy shown centre-screen. The player then has access to various attack moves depending on their equipped weapon. When executing an attack, the player positions a hitbox over the image of the enemy to mark out where they would like to attack. This hitbox demonstrates how damage will be applied to the enemy, with areas of low or high damage at different points on the swing, the final damage being calculated based on how much armour is underneath that pixel as well.

    For example, you execute a slashing attack at an enemy's head, but the enemy is hearing a helmet. Most of the hitbox falls over the helmet, so the damage on these pixels is negated. A small part of the hitbox, however, lies over the slit where the enemy's eyes are. Damage is applied to the enemy's head only on the pixels where the hitbox overlaps this exposed slit. Thus players are naturally encouraged to look for holes and weak spots in enemy armour and direct their attacks there.

    Units have a stat called 'fatigue' which is generated by attacks. Attacks with heavier weapons generate more fatigue, and your fatigue will decrease more slowly when the unit is wearing heavier armour. An attack can only be made once fatigue has dropped to zero. Thus a naked man with only a dagger will be able to deliver many more strikes in the same period of time than a heavily armoured man with a heavy warhammer.

    It sounds like fighting will be a complex matter of precise positioning and calculations so I intend to hide most of the underlying processes from players (and introduce a fair bit of randomness in where the attack will actually land) so they have to rely on their gut, and the fight should feel more natural.

    Where I'm stuck is the issue of defending against attacks. I decided early on that shields would be a pretty critical part of a game which is so heavily focused on looking for armour weaknesses. However I'm not 100% sure on how to implement them. The combat is turn based so you don't need to worry about time during a fight, and I don't want to change this. For example, I don't want to force players to quickly react to incoming attacks by positioning their shields in the right place. My best option so far has been that the player can choose where to position their shield before the enemy strikes, and has to predict where they will do so. But should this action come in lieu of a regular attack? Should players be forced to choose whether they attack with their weapon or raise their shield? Alternatively, should the player be given a chance to raise their shield every time an enemy attacks? "Bandit is about to attack, position your shield?"

    Furthermore, blocking isn't the only way to defend an attack. Returning to my previous example of the naked knife-wielder, the player's defence is more likely to be a dodge. I feel like this is something that will be much harder to implement effectively, as it conflicts with the whole idea of positioning one's attack against the image of the opponent. My best solution this time is to allow the unit to move the image of their character by a certain number of pixels which depends on both their weight and stats. Naked knife-wielder could very well sling himself sixteen pixels in any direction as he is very agile and light, whereas heavy warhammer guy could maybe manage two pixels. This would end up being a similar approach to blocking, and would thus open the same issues of whether dodging should be offered instead of an attack, or in response to every attack.

    In addition to the above, there may be other solutions which I've overlooked? Also if anyone knows of any other games which have approached combat in a similar way, please point me towards them as I'd be interested to give them a play.

    Many thanks,
    ~Druid TC
     
  2. Widget

    Widget Member

    Joined:
    Jun 21, 2016
    Posts:
    72
    Well, you could leave it to RNG on whether a shield blocks a hit or not, maybe how much damage it blocks too. But I understand if you wouldn't want that.

    It's almost universal that in RPGs there's some sort of mana/stamina bar, which depletes when the player chooses to perform a skill, sometimes they have a different name like SP or EP. An idea I have for one of my JRPG's is that party members have two modes, Defend or Gain, and the player chooses when to switch when it's their turn. Neither of these uses the character's turn, they will always be doing one of them. Defend reduces the amount of damage from incoming attacks of course. Gain means the character will take the full damage from enemy attacks but replenish some of their SP. The player can predict whether they need to defend or not, maybe take risks to not do so and be rewarded with SP to use on more damaging attacks when it's their turn.
     
  3. Druid TC

    Druid TC Yellow Dog

    Joined:
    Jun 20, 2016
    Posts:
    32
    @Widget The armour mechanics use RNG anyway - metal armour is just balanced in such a way that there's only a very small chance to actually take any significant damage through it such that it ends up being basically impenetrable (for all intents and purposes). So it would fit in perfectly to use the same mechanics for a shield as well. I do like the idea of having a separate 'defend' and 'attack' position - maybe something you can activate instead of an attack, which allows you to perform block actions against incoming attacks until the next turn. This would also mean you wouldn't have to blindly guess where the attacks were going to come from, but could receive some sort of hint? Maybe an arrow which shows the direction of an incoming attack, of a special wind-up frame which corresponds to the attack that's going to be performed.
     
  4. Yal

    Yal Member GMC Elder

    Joined:
    Jun 20, 2016
    Posts:
    3,312
    One idea could be to have a stamina system similar to Dark Souls, where blocking attacks tires you out, leaving you with less energy to fight back (this could work well with your existing Fatigue system)... dodging has a tighter timing requirement (you need to figure out where you're safe from attacks AND get there at the right time), so it increases the risk that you take damage, but when successful you spend less stamina, letting you attack more frequently.

    I'm thinking a system like:
    • Blocking is simple. Hold down the block button, and you block incoming attacks. You can hold it down all the time if you want to. But while you're blocking, fatigue is slowed down a lot.
    • For dodging, you want to represent two things: timing and direction. Maybe the enemy switches to a different sprite where they start charging their attack (each sprite should give you a hint about which direction the attack is coming from, and thus how to dodge to avoid it), and you're presented with a grid of directions to dodge in. (This grid could even represent the room you're currently fighting in, so you need to take obstacles and being cornered into account). Or maybe you simply have a timing minigame where you need to press the right button at the right time, similar to how Undertale's "attack" options works. A perfect hit would be 100% chance to get missed, and the more you miss the mark, the greater the chance that you're hit, but you don't need to be perfect to dodge successfully.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice