baardbi
Well-known member
If you want the trampoline tile to have a very basic bounce "animation", there's a really simple trick you can do.
1. Make a game object thats 2x2 sprite tiles. In other words it needs to be the same size as a regular background tile.
This is the graphic that will give the illusion of a basic tile animation. Make sure you fill the entire sprite tiles with non-transparent color. This object needs to completely cover the trampoline tile. Depending on your graphic for the trampoline tile, you might want to leave the bottom row of pixels transparent.
2. Set up your new game object with the following settings:
3. Modify your trampoline tile script or make a new one with the following code:
PS! This trampoline script is slightly modified to include all objects, not just the player object (all objects can bounce on this trampoline).;;;; trampoline
LDA Object_v_speed_hi,x
BEQ +skip
BMI +skip
LDA #$F8
STA Object_v_speed_hi,x
LDA tileX
AND #%11110000
STA tempA
LDA tileY
AND #%11110000
STA tempB
LDA Object_screen,x
STA tempC
TXA
PHA
;Create trampoline bounce object
CreateObjectOnScreen tempA, tempB, #11, #0, tempC ;;;; 11 is the bounce object (game object)
PLA
TAX
+skip
RTS
4. You're done. Enjoy your new bouncing trampoline
PS! If you are using scrolling, make sure the graphic for the trampoline tile (in this case it's the white part) is slightly smaller than the game object:
Trampoline (background) tile:
Game Object:
Last edited: