Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / coll. in 2D need some help

Author
Message
sadsack
22
Years of Service
User Offline
Joined: 27th Nov 2003
Location: here
Posted: 7th Apr 2006 23:49
Ok I made up a small test program for you to look at so you can tell what I am talking about. I am making a space moon lander type game. I am into to the 5 level now and the landing zones are getting harder
to land on. I have very vert. hill around the landing zone. The coll. is taking place far from the stops I put in the hill so when the ship make contack with the hills you die. At a 45 deg. angle the coll. is not very good. There must be a coll box around the sprites and when they are at a 45 deg. angle the box gets bigger. Look at the test program. I have some big maps and it is taking me a very long time to put the short stops along the hills. That is, I have to use very short stops, the real long one make the coll. with the lander while still flying in the air. I hope you can understand this it is hardto get cross.
I made my hills at 45 deg. so I could use just one long sprite to act like the ship hit the hills. Is there a way to use long sprites at a 45 deg. angle and have a nother sptie coll. only when it hits it and not befor?
Thank you
renny
Dave1974
21
Years of Service
User Offline
Joined: 1st Aug 2004
Location:
Posted: 10th Apr 2006 13:12
Hi sadsack.

Unfortunatly dbpro does not include pixel perfect sprite collision.
Some people have written thier own which can be found in the code base.

See if any of these do what you need.

http://darkbasicpro.thegamecreators.com/?m=codebase_view&i=a782de0e5d9531c9442b9509feac3329
http://darkbasicpro.thegamecreators.com/?m=codebase_view&i=e62787ebd353c421a4c465dc15201870
http://darkbasicpro.thegamecreators.com/?m=codebase_view&i=d0772e6ca92db0dceeeef2c263ed6b6a
sadsack
22
Years of Service
User Offline
Joined: 27th Nov 2003
Location: here
Posted: 11th Apr 2006 02:40
Thanks Dave1974,
I have copy all the code and will start playing with it tonight.
Thank again
renny

Login to post a reply

Server time is: 2026-07-01 21:22:22
Your offset time is: 2026-07-01 21:22:22