Bounce Tiles in the platform module?

Post Reply
briefs
Posts: 32
Joined: Sat Jun 23, 2018 7:12 pm

Bounce Tiles in the platform module?

Post by briefs » Tue Sep 11, 2018 3:27 am

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
User avatar
WolfMerrik
Posts: 199
Joined: Sat Aug 11, 2018 4:59 pm
Location: Maine
Contact:

Re: Bounce Tiles in the platform module?

Post by WolfMerrik » Tue Sep 11, 2018 4:00 am

You could make a tile that reverses your vertical speeds:

Something like this?

Code: Select all

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.
ImageWant to download & share Image NESMaker Resources? Check out My Files on www.NESMakerFiles.com Image
briefs
Posts: 32
Joined: Sat Jun 23, 2018 7:12 pm

Re: Bounce Tiles in the platform module?

Post by briefs » Tue Sep 11, 2018 7:38 pm

cool I'll try it
briefs
Posts: 32
Joined: Sat Jun 23, 2018 7:12 pm

Re: Bounce Tiles in the platform module?

Post by briefs » Tue Sep 11, 2018 7:48 pm

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:
User avatar
WolfMerrik
Posts: 199
Joined: Sat Aug 11, 2018 4:59 pm
Location: Maine
Contact:

Re: Bounce Tiles in the platform module?

Post by WolfMerrik » Wed Sep 12, 2018 12:12 pm

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.
ImageWant to download & share Image NESMaker Resources? Check out My Files on www.NESMakerFiles.com Image
briefs
Posts: 32
Joined: Sat Jun 23, 2018 7:12 pm

Re: Bounce Tiles in the platform module?

Post by briefs » Wed Sep 12, 2018 8:09 pm

Ah Gotcha, I'll try that thanks
Post Reply