News:

Don't forget to visit the main site! There's lots of helpful docs, patches, and more!

Main Menu

A bit of a technical question; exactly how attacks are processed

Started by Marscaleb, December 12, 2012, 02:34:14 AM

Previous topic - Next topic

Marscaleb

I am building an action RPG.  I am closely studying Zelda 3 and emulating its controls and gameplay because, well, it's the best ever.
However, there are some matters that I cannot divulge simply by closely watching the game nor recording footage and counting frames.

What I am most curious about is exactly how attacking is handled; how the game checks for hits Link makes with his sword.

Visually, he swings a wide arc, and it is animated as such that we see the sword move from one side to the other.  But does the hit detection move?  Does the sword actually inflict damage according to where we see the sword, or perhaps does it establish a stationary hit-box that covers the whole arc?  How long does the hit-box stay active for?  What is the exact shape of the hit-box?  I assume it is handled with a square or set of squares, but it could possible be a line trace or a vector-based shape.  I seem to be able to attack so rapidly that I can swing my sword again before the last stroke is finished, but is there actually a limit to how quickly I can attack; some pause that lasts for longer than the two cycles it would take for a button to be released and then pressed again?  Are there any special instructions played out by enemies when they are hit, apart from what is visually apparent?

I see on this forum that there are people who are decoding the game from assembly code.  I figure if anyone can reveal these details, someone here can.