I know the platformer module is not released yet, so a lot of my issues might already be fixed when released... but I can't stop myself for digging' in the code.
I was having an animation problem... when my player run (holding direction) and pressing the jump button... while still holding direction.
The problem was when the player got back on the ground (and still holding direction), the animation was "idle" when I was assuming it should be "running".
Same problem, with screen changing... if the player keeps running, when he changes screen, the new screen loads, the animation become the wrong one (idle).
But I found a fix...
The result is great, a video here :
("Untitled - Movement Animations Tests" on YouTube)
Here the part of "AccAndSpeed_Plateform_Simple.asm" that needs to be modified:
I was having an animation problem... when my player run (holding direction) and pressing the jump button... while still holding direction.
The problem was when the player got back on the ground (and still holding direction), the animation was "idle" when I was assuming it should be "running".
Same problem, with screen changing... if the player keeps running, when he changes screen, the new screen loads, the animation become the wrong one (idle).
But I found a fix...
The result is great, a video here :
("Untitled - Movement Animations Tests" on YouTube)
Here the part of "AccAndSpeed_Plateform_Simple.asm" that needs to be modified:
Code:
theGroundIsSolid:
LDA Object_type,x
BNE AboveIsSolid ;; does every object need this determination for *jumping*?
LDA onGround
BNE AboveIsSolid ;; it is alrady solid.
;; if it wasn't solid, set it to solid, and change from jumping to normal
LDA #$00;
STA onLadder
LDA #$01
STA onGround
LDA gamepad ;; dale_coop: check the GamePad, if still moving ?
AND #%11110000
BNE theGroundIsSolidWalking ;; dale_coop
;;ChangeObjectState #$00, #$02
LDA Object_movement,x
AND #%00001111
STA Object_movement,x
ChangeObjectState #$00, #$02
JMP AboveIsSolid
theGroundIsSolidWalking:
ChangeObjectState #$01, #$02
AboveIsSolid: