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! / Pixel Perfect Collision question

Author
Message
SoulMan
21
Years of Service
User Offline
Joined: 22nd Nov 2002
Location: In a house somewhere on the planet earth
Posted: 11th Mar 2004 05:34
I know we don't have pixel perfect detection. I was curious as to what the big deal as to not having it?
Could someone explain this to me please.
Thanks.
SoulMan

This is as backwards as is This
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 11th Mar 2004 10:47
Well, DBPro uses sprites as squares, that's bad. Now a ball shape has corners??? For tile collision there is no difference, but if you want perfect collision you need a new approach.

Code Stealer
20
Years of Service
User Offline
Joined: 12th Feb 2004
Location:
Posted: 11th Mar 2004 11:14
Yeah, if I have a 2x2 pxel bullet, and I want to see if its hit my sprite, I dont want it colliding with "empty" pixels! Very anoying!

GIve me more power!
Erusuwasu
20
Years of Service
User Offline
Joined: 21st Sep 2003
Location: Where am I? I think I\'m lost...
Posted: 13th Mar 2004 12:41
Quick dumb question in order to clarify the different types of collision and how they function:

What's the difference between, pixel-perfect collision, sprite collision, mathmatical collision, etc. and what types of games are each best suited to???

(I actualy partially know the answer, but wouldn't be able to explain it as well as some of the more experienced members.)

Previously known as Hamada
I'm a DBC programmer so when I'm talking, that's what I'm talking about ^_^
Tapewormz
21
Years of Service
User Offline
Joined: 15th Sep 2002
Location: Winnipeg, Mantoba, Canada
Posted: 14th Mar 2004 05:44 Edited at: 14th Mar 2004 05:47
I read some really good information on gamedev.net on collision detection at the pixel level. Basically, it starts off using a bounding box for the image and waits till the bounding boxes collide. Then it goes into a subroutine that checks to see if two pixels have collided. This is really slow because you have to scan all the pixels for both images in a direction that's determined by the x,y positions of both images at the time of collision via bounding box. If just the bounding boxes have collided then there is no collision and your objects move a step again and if the bounding boxes are still colliding then you have to scan all those pixels again. Very taxing on the processor (although, we have faster processors now). This is probably why there's no "pixel perfect" collision in dbp. Just make your own collision at the pixel level functions.
CloseToPerfect
21
Years of Service
User Offline
Joined: 20th Dec 2002
Location: United States
Posted: 21st Mar 2004 03:29
don't use the point command to check with as it is way to slow, but you can use memblock with no noticable slowdown

RGT may be gone but the best DBP forum is still alive and kicking, check it out.
http://www.dannywartnaby.co.uk/rgt/
Scouseknight
20
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Bootle, Merseyside, UK
Posted: 23rd Mar 2004 02:15
I had a collision dilema myself - I am not at the level yet to use memblocks but in a way, the collision performance hit on my program when I used the sprite collision method railroaded me into using my own collision algorithm based on cells on a grid with some tweaks which allowed me a lot of leway in terms of how far overlapped one sprite has to be into another for it to register a collision.

It was just a useful aside that was ultimately better for this particular situation than a pixel-perfect collision would have been.

My next game will require pixel perfect collisions so I will watch this thread with interest...
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 23rd Mar 2004 14:18
Actually, that's why I haven't bought DBPro. If they fix that I will buy it.

Login to post a reply

Server time is: 2024-05-18 07:45:44
Your offset time is: 2024-05-18 07:45:44