if the player is walking forward, then right is pressed, on the gba the player would move right. after releasing right, the player continues to walk forward.
this doesnt happen in my emulator. my guess is that what actually happens on the gba is that the dpad is a rocker, so pressing a direction only presses that single direction.
this is easy to replicate the gba with any controller, but on pc with a keyboard, not so much.
not sure the best path to handle this. i guess having 2 copies of the keystate. when a direction is set, set it. when another direction is set whilst the current direction is set, save the current keystate to the copy, then unset that direction and set the new direction. upon releasing that new direction, load back the previous keystate.
if the player is walking forward, then right is pressed, on the gba the player would move right. after releasing right, the player continues to walk forward.
this doesnt happen in my emulator. my guess is that what actually happens on the gba is that the dpad is a rocker, so pressing a direction only presses that single direction.
this is easy to replicate the gba with any controller, but on pc with a keyboard, not so much.
not sure the best path to handle this. i guess having 2 copies of the keystate. when a direction is set, set it. when another direction is set whilst the current direction is set, save the current keystate to the copy, then unset that direction and set the new direction. upon releasing that new direction, load back the previous keystate.