Fighting Platformer - DevRubicate/Devil-Fresh GitHub Wiki
A platforming game with a neato fighting mechanic stolen from Zelda 2.
Fighting
The fighting mechanic is balanced between two major fields, offense and defense.
Offense
The player executes an attack when a button is pressed, influenced by the direction he is facing, and the directional buttons held down by the player. If nothing is held, or the left/right buttons, the player performs a simple stab with his weapon. If the down button is held, the player will crouch and at knee height. If the up button is held, the player will perform an overhead swing at head height.
Defense
There are two main ways of defending
Shield
The player has a shield held up passively, which blocks attacks done that impacts the shield's sprite. By holding the down button the player goes down on his knee and holds the shield in a lower position, blocking attacks that would normally hit the legs. By holding the up button the shield is held above the player's head, rotated to face upwards.
Dodge
By double tapping a direction, the player does a quick dodge motion in that direction. Double tapping left or right makes the player take a quick step in that direction, potentially out of horizontal reach of an attack. Double tapping down makes the player crouch down into a small duck, making an attack against the upper body potentially miss.
Weapons
Different weapons have different damage, but also changes the way the attack executes. Certain weapons are faster or slower, others have longer or shorter reach, some have longer windup time, others leave you hesitating longer after finishing the attack.