Thursday, April 18, 2019

Attack frames

Had the urge to work on the attack animation. There was something I wanted to try, and while I'm not fully recovered yet, working is a lot easier than packing, for now.

Anyhow, the other day I posted this attack animation that I made for the ongoing game. Basically it would be used for every weapon, with different weapons being drawn over the frames, and different speeds being used for different types.


Problem is it's a lot of frames (9, not counting the idle frame). Because I have to do a sprite for every set of clothing, it's best to limit the number of frames. I also started to think that it might be a bit boring to just have a single hit attack.



So I tried animating an alternative mockup, with the goal of #1 limiting the frames, and 2# making it a multi hit that could loop.



I managed to get it down to 6 frames, where the actual animation would be done in code, and frames are re-used. The weapon animation itself would then be more frames than the base animation. 



Depending on the weapon, the swing can also be slightly different, using the same frames.


I may also add other attack frames that can be used to for special attacks. I could probably get away with doing 1-2 frame attacks that use the attack animation's startup and ending frames to smooth them out.

Anyhow, that's all for now.





15 comments:

  1. an alternate idea is the single swing with a sword beam coming out as a addition but thats prolly not what were going for

    ReplyDelete
    Replies
    1. That would be one of the ways that weapons would have effects added if it ended up being single hit. That and weak/strong hitboxes which work a bit better with single hit attacks.

      Delete
  2. A spellcasting animation could be even simpler, with three (or even two) frames of the PC reaching forward (or upward) with her free hand-and the same frames to go back.

    ReplyDelete
    Replies
    1. Spell cast would probably have a decent number of frames since it would also be one of the primary animations. Dunno yet though, could also do something simpler.

      Delete
  3. If you're able to cancel the attack animation via jump/(back-)dash then having a single hit attack isn't so boring. All depends on the mechanics.

    ReplyDelete
    Replies
    1. Well, everything depends on the mechanics.
      That said, a single hit in this case is more boring in the sense that if I have an attack with a lot of frames, it probably means I'm not going to want to add a bunch of other attacks since they would look out of place being simple next to such a smooth animation.

      Delete
  4. "Multi hit that could loop."

    Pwapwapwapwapwa~!
    If that's gonna be a thing though, it'll probably have to be accompanied by self/enemy knockback, depending on whether or not it can stun normal enemies.

    Or perhaps blunt weapons can have knockback, while sharp weapons don't?

    ReplyDelete
    Replies
    1. Havn't decided how much knockback or hitstun there will be yet. Will depend how the AI and blocking turns out.

      Delete
  5. It might be more natural if the charachter moves forward with the sword swings instead of stepping back into place, just bring the back leg up instead of the front leg.

    ReplyDelete
    Replies
    1. Moving forward would happen through code, as opposed to in the animation itself. Generally at this stage the animations are subject to change based on how the in-game object ends up move moving. Because of the limited frames, I also can't show steps smoothly, and the attack will also sometimes be done in place, which is why I chose not to animate a step.

      Delete
  6. I think it will be more interesting if the attack only limited to 2-3 hits and not loopable, so player will approach enemy carefully rather than rushing blindly.
    And also adding feature of backdash-front dash, so player able to evade incoming attack when attack is stopped.

    btw, get healthy soon :)

    ReplyDelete
    Replies
    1. I don't think being loopable would prevent the need to approach carefully. Dark Souls generally uses weapon animations that loop, outside of special moves.

      Delete
  7. Attack animation looks like it has some POWER! That girl is out for BLOOD! Only concern is that the attack looks like it will make the player stand still during it. This will most likely make the game slower paced, but that isn't necessarily a bad thing. Just make sure you build the game around this so it works to your advantage.

    ReplyDelete
    Replies
    1. The attack moves forward at the beginning of the swing if you hold forward while attacking.

      Delete
  8. Is a 9 frame basic attack going to feel unresponsive? I feel like it would be better with fewer frames in terms of gameplay, say 4 frames.

    ReplyDelete