Back to Page
Revision 1 (current)
Edited by ktwo on 6/24/2023 10:15 AM
!! Horizontal movement (action scenes)
Walking speed is 1px/f.
The horizontal movement speed changes when jumping.
* $1D - Input-based speed component. It toggles between 0 and 1 (or 0xFF) every other frame if right (left) is pressed.
* $1F - Movement speed (px/f)
* $470 - x sub-pixel position
* $4E0 - Sub-pixel speed, set at the start of the jump (0xD0 or 0x30) and not possible to change mid-jump
* $454 - x-position (on screen)
As an example, x-movement from the start of a jump to the right:
||Frame||$1D||$470||$1F||$454||
|1|0|0|0|27|
|2|1|D0|1|28|
|3|0|A0|1|29|
|4|1|70|2|2B|
|5|0|40|1|2C|
|6|1|10|2|2E|
|7|0|E0|0|2E|
|8|1|B0|2|30|
A full jump saves 5 pixels (or frames) over walking.