Bounce Tiles in the platform module?

briefs

New member
anyway we can get the bounce tiles from the beta working in the platform module? I don't know what I'm even doing with ASM but it would be nice to have them in my game
 

WolfMerrik

New member
You could make a tile that reverses your vertical speeds:

Something like this?

Code:
bounce:
	LDA #$00				
	STA Object_v_speed_lo,x	; Just set this to 0, make things easier
	SEC						
	SBC Object_v_speed_hi,x	; Make it bounce! -- we still have 0 loaded, now we subtract our speed
	CLC			; Which gives us the inverse....
	STA Object_v_speed_hi,x	; We set it.
 

briefs

New member
doesn't quite work, My character bounces on the tile for a few seconds and then just falls through the tile. This was the code from the platformer beta which worked really well

;;BOUNCY TRAMPOLINE
;; trampoline
CPX player1_object
BNE notAPlayer_trampoline
LDA Object_v_speed_hi
BPL keepCheckingForTrampoline
;; should behave like solid.
notAPlayer_trampoline:
LDA #TILE_SOLID
STA tile_solidity
JMP doneWithTrampoline
keepCheckingForTrampoline:

ChangeObjectState #$02
LDA #$00
SEC
SBC #$02
STA Object_v_speed_hi,x

doneWithTrampoline:
 

WolfMerrik

New member
Well the asm I provided doeant run the whole show (it doesnt view it as solid), but you could have it check for the tile type, make it be a solid collision then run the bounce to reverse the dorection of the object.
 
Top Bottom