Coding swords

Post Reply
Site Admin
Posts: 89
Joined: 2009-08-27 21:49
Location: Brisbane, Australia

Coding swords

Post by DerSaidin » 2010-03-19 11:34

This thread summarizes some discussion from IRC about coding sword attacks:
(with input from DerSaidin, Dutchmeat, and merlin1991)

Key points:
  • Treat it like any other weapon. Possibly leave it out of the weaponslot switching sys (we'll leave it in the switching system initially).
  • +attack will trigger an animation, and after .5 seconds, a trace will be done for the damage
  • The player might control the attack animation (for asthetic/entertainment purposes) using a combination of mouse pitch, and current left/right/forward/back movement. If your moving right, swing left to right; if your moving left, swing right to left; if your moving forward, lunge. If your moving backward, a generic parry (players would probably move back to dodge an enemy attack) it'd still do damage, but it'd have a parry animation. Also varieties for crouching, jumping?
  • The yaw of the player controls if the swing is down over the shoulder, horizontal at head height, horizontal at stomach height, or sweeping the legs (lol noob, that one could probably do less damage). Maybe upward lunges if the player is holding crouch.
  • There are no defensive moves, you can't block swings. Implementing this is too complex, and its not a focus of the game.
The problem with having defensive moves is that it becomes very complex to make the swords work properly, ie a parry to actually block the attack and thats not the focus of the game. For other games like AoC it is a (the?) major focus, so they put a lot of effort into their system and its still kinda weird (imo). So I don't think we want to worry about defensive moves. Some swings might/should appear as parry where logical (moving backward) but they have no special defensive qualities.

For example a general scared/defense slash/stab/parry when moving backwards (which still does damage like a normal attack).
Although if the player is moving backwards chances are its not going to be hitting to do damage.

A player who takes damage while holding a sword might also do a generic block/defense animation as part of the pain animation. Again, this has no defensive properties, its just an animation.

Post Reply