re-bound code

BlitzMax Forums/BlitzMax Programming/re-bound code

hub(Posted 2011) [#1]
hi !
Could you help me to debug this ! i want player ship bound on the scrolling tiles. Thanks !

gfx files :







matibee(Posted 2011) [#2]
Your options are a bit limited with your current collision/ reaction set up. You need to be able to differentiate between the player being pushed back by the map and the player flying into the map.

This sort of adds pushing back.. (but it also effects other collisions). See the first few lines of TShip.Update()



If you want to continue using images collide, try splitting the ship into four parts.. nose, wings and tail. Then you can tell which sort of collision reaction to use.

Cheers


hub(Posted 2011) [#3]
i want to adapt this to my game. So i use images collide into this sample as my project use it ! Into my game the ship explode and ... game over. But some players reports that it is to difficult. So i could just bound the ship and decrease ship shield before destroy it ! Finally no so easy to do this with scrolling tiles.

Last edited 2011


matibee(Posted 2011) [#4]
I don't know much about ImagesCollide() as I've never used it. This works better even with the ship as one image..




hub(Posted 2011) [#5]
Many thanks matibee