drexegar
Member
NOTE: This easy technique was done in Shooter Module but should work with other modules.
So moving in 4 directions is kinda of lame for ship movement.
So I took a wild guess and copy a input script and adding the #UPLEFT #UPRIGHT #DOWNLEFT #DOWNRIGHT works.
For Example I took the original moveUp_shooter.asm: (by default the directional animation is commented out for Shooter Module, so you need uncomment if you want to use directions)
and change the direction to one of the diagonal values nesmaker supports.
So I did this for the rest and through in inputs and put it in a separate folder not to mix with defaults...
But I ended up with a problem... It didn't work right.
but DOWNLEFT did work...
So since nes works line by line and I know coding a bit, I took a quick guess that the order may be holding up the inputs So here is the order and THIS WORKED!

So first is to the check for regular inputs which are important to Start the character moving, than the diagonal inputs which will only have to detect 1 more input since the 1 is already detected from the regular scripts, and the release for last.
So Order is very important!
Recommend that all GAMEPLAY scripts should be on top and your lesser scripts like OPTIONS, TITLE SCREEN, SHOP Stuff be on the bottom, since you want your controls to respond as fast as possible.
So moving in 4 directions is kinda of lame for ship movement.
So I took a wild guess and copy a input script and adding the #UPLEFT #UPRIGHT #DOWNLEFT #DOWNRIGHT works.
For Example I took the original moveUp_shooter.asm: (by default the directional animation is commented out for Shooter Module, so you need uncomment if you want to use directions)
Code:
;;;;
TXA
STA temp ;; assumes the object we want to move is in x.
StartMoving temp, #UP
; TXA
; STA temp ;; assumes the object we want to move is in x.
; ChangeFacingDirection temp, #FACE_UP
RTS
and change the direction to one of the diagonal values nesmaker supports.
Code:
;;;;
TXA
STA temp ;; assumes the object we want to move is in x.
StartMoving temp, #UPRIGHT
; TXA
; STA temp ;; assumes the object we want to move is in x.
; ChangeFacingDirection temp, #FACE_UPRIGHT
RTS
So I did this for the rest and through in inputs and put it in a separate folder not to mix with defaults...
But I ended up with a problem... It didn't work right.
but DOWNLEFT did work...
So since nes works line by line and I know coding a bit, I took a quick guess that the order may be holding up the inputs So here is the order and THIS WORKED!

So first is to the check for regular inputs which are important to Start the character moving, than the diagonal inputs which will only have to detect 1 more input since the 1 is already detected from the regular scripts, and the release for last.
So Order is very important!
Recommend that all GAMEPLAY scripts should be on top and your lesser scripts like OPTIONS, TITLE SCREEN, SHOP Stuff be on the bottom, since you want your controls to respond as fast as possible.