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! / collision wanted (really need help as i am a nOOb)

Author
Message
dax24
21
Years of Service
User Offline
Joined: 2nd Feb 2004
Location:
Posted: 9th Apr 2004 00:28
can you look at the source code and write or tell me how to write out a collision method for the sprite to react and collide with the tiles which is loaded via an array.

also what is a collision array???
comando 300
21
Years of Service
User Offline
Joined: 23rd Nov 2003
Location:
Posted: 9th Apr 2004 22:02


I think that should work!

CURRENT PROJECT: RETRO PAC-MAN
Scouseknight
21
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Bootle, Merseyside, UK
Posted: 10th Apr 2004 03:24
I have been using Sprite Collision (x,y) and then Sprite Hit (x,y) to determine whether a collision has taken place.

It wasn't working properly - seemed to be ignoring the transparency so in effect both functions were doing the exact same thing!!

Then, I saw a mention of a pixel-perfect collision routine in the Code Snippets section by Freddix - and it's solved my problem completely - I now have pixel perfect collision in my game - I did a lot of workaround coding around to avoid using the DB collision detection as I had heard it wasn't the most accurate - and found out it wasn't first hand when I decided I needed to bite the bullet and use it.

Thanks to Freddix's function (which only requires two sprite numbers and a mode), it's revolutionised my project and I am busy re-doing loads of workaround code to make use of it.

Here is the thread :

http://darkbasic.thegamecreators.com/?m=forum_view&t=4826&b=6

Sorry to be going on and on about this but it does what it says on the can

Login to post a reply

Server time is: 2025-05-14 13:16:13
Your offset time is: 2025-05-14 13:16:13