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.

Dark GDK / mass sprite collision (easyier way?)

Author
Message
helpfull programmer
15
Years of Service
User Offline
Joined: 30th Jul 2009
Location:
Posted: 3rd Dec 2009 20:33
hello, I am very pleased of the high standard of this forum and was just wonderding if any of you know how to just see if there is collision with close sprites as at the moment I have to run through the whole game load of sprites to test between one sprite:

for ( int i = 2; i < 804;i++ )
{
if ( dbSpriteCollision(1,i)==1)
{
blah blah blah
}
}

and I have also tryed to use this:

if ( dbSpriteCollision(1,0)==1)
{
blah blah blah
}

but as it only returns one sprite collision it doesen't fufill the task at hand.


so what I am asking is, is there a way to just test collision with near sprites with the player instead of all of them or 1 of them...

or is there a better way to test collision altogether???
thankyou very much in advanced
pcRaider
17
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 4th Dec 2009 19:27
Quote: "
if ( dbSpriteCollision(1,0)==1)
{
blah blah blah
}
"



if ( dbSpriteCollision(1,0)>0)

Login to post a reply

Server time is: 2024-11-24 17:58:41
Your offset time is: 2024-11-24 17:58:41