GLBasic forum

Main forum => GLBasic - en => Topic started by: mentalthink on 2011-Oct-20

Title: Technical question pixel perfect collision in 2d World.
Post by: mentalthink on 2011-Oct-20
HI I have another technical doubt  :-[ :

Well whit sprite pixel collision, when detect the collision, if the sprite (it´s huge), have a bunch of colors it´s minus faster than it´s a solid color?¿, and another point, if the image it´s only a skecth of the original it´s more faster becuase have minus points?¿ .

I think, it´s better show a couple of images...


[attachment deleted by admin]
Title: Re: Technical question pixel perfect collision in 2d World.
Post by: Kitty Hello on 2011-Oct-20
no. I only compare the alpha bits (transparency).
Title: Re: Technical question pixel perfect collision in 2d World.
Post by: mentalthink on 2011-Oct-20
Thanks Gernnot again... then if I adjust at maximun the image to the boundix box, will be minus calculus, not?¿...

Title: Re: Technical question pixel perfect collision in 2d World.
Post by: Kitty Hello on 2011-Oct-20
you could downscale the image to 1/8 size and compare with SPRITECOL(id1, x/8, y/8, id2, x2/8, y2/8)