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.

Author
Message
Kjelle
22
Years of Service
User Offline
Joined: 29th Sep 2002
Location:
Posted: 6th Feb 2003 12:11
The sprite collision detection is not so good, it seems that dbp uses box collision detection, is that right ?

Why not pixel perfect detection ?

Even on the Amiga....
MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 6th Feb 2003 14:31
Mainly because pixel perfect collision can be processor intensive. There is code somewhere thats got a routine for PPC

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 6th Feb 2003 14:32
Kjelle
22
Years of Service
User Offline
Joined: 29th Sep 2002
Location:
Posted: 6th Feb 2003 16:38
Ok, you have to 'paste' the sprites in a memblock and do some masking. I guess that takes some cycles right.

Howcome that the collision method was implemented in dbc but not in pro ?
Arrow
22
Years of Service
User Offline
Joined: 1st Jan 2003
Location: United States
Posted: 6th Feb 2003 18:10
Try Sprite Hit, and see if that helps

Am I a butterfly dreaming I'm a man?
Or a bowling ball dreaming I'm a plate of samishi?
Never assume that what you see or feel is real.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 6th Feb 2003 20:22
No, sprite hit has the same problem.

As for speed, I can get around 2500 worst-case collisions per second on my 850PIII. That equates to around 40 checks per frame at 60 fps.

That should be good enough for most things, but if not, I have suggested to Mike from DBS that they implement proper sprite collision - he seemed to accept it was a good idea
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 6th Feb 2003 20:23
Ack - no edit.

That equates to a *minimum* of 40 checks per frame at 60 fps.
Kangaroo2
22
Years of Service
User Offline
Joined: 26th Sep 2002
Location: United Kingdom
Posted: 6th Feb 2003 22:49
It works for me, until you use large sprites... Thanks for the Code IanM alothough I'll be chuffed if it ever does work in DBP with a simple collision command

Coming Soon! Kangaroo2 Studio... wait and quiver with anticipation! lol
[email protected] - http://www.kangaroo2.com - If the apocalypse comes, email me
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 6th Feb 2003 22:55
My timings are for 64x64x32bit. What were you trying with?
Kangaroo2
22
Years of Service
User Offline
Joined: 26th Sep 2002
Location: United Kingdom
Posted: 7th Feb 2003 01:57
It worked fin for sprites up to 128 but I tried a single large landscape, 2000,1000,16 and no luck. However I have got around this by splitting it into smaller boxes. Not quite a tiling system, but similar

Coming Soon! Kangaroo2 Studio... wait and quiver with anticipation! lol
[email protected] - http://www.kangaroo2.com - If the apocalypse comes, email me
Kangaroo2
22
Years of Service
User Offline
Joined: 26th Sep 2002
Location: United Kingdom
Posted: 7th Feb 2003 01:59
Oooh PS I also noticed that on any sprite bigger than that It fuzzes it on my PC, looking awful - even loading the image with a ,1 tag AND using full screen exclusive mode - must be a memory thing I guess. Thats not your code tho thats DBP

Coming Soon! Kangaroo2 Studio... wait and quiver with anticipation! lol
[email protected] - http://www.kangaroo2.com - If the apocalypse comes, email me
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 7th Feb 2003 09:30
Bear in mind that every time you double the sizes of both dimensions, you multiply the amount of work it has to do by 4. ie 128x128 is 4 times more work than 64x64
Kangaroo2
22
Years of Service
User Offline
Joined: 26th Sep 2002
Location: United Kingdom
Posted: 7th Feb 2003 21:43
Yes I realise that. I just thought one large sprite would take less processing power than lots of smaller ones. Evidently not though I guess its cos its rendering whats not on the screen?

Coming Soon! Kangaroo2 Studio... wait and quiver with anticipation! lol
[email protected] - http://www.kangaroo2.com - If the apocalypse comes, email me
MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 7th Feb 2003 21:46
I think its the code that doesn't check to see what is off the screen...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 8th Feb 2003 02:33
Off screen = outside the display area?

If you don't want to check for off-screen collisions then don't. A couple of simple 'if' statements can solve this and avoid the function call.

Kangaroo2:
No magic wand to wave I'm afraid. Except maybe some maths collision before checking for pixel-perfect collision?
Shadow
22
Years of Service
User Offline
Joined: 17th Oct 2002
Location: In the shadows
Posted: 8th Feb 2003 21:07
"Howcome that the collision method was implemented in dbc but not in pro ?"

apparently this is because DirectX 8.1+ (which dbp uses) does not cater for 2d, so the sprites are actually done using 3d polygons and texturing.
Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 8th Feb 2003 21:14
For some stupid reason DirectX is really going away from 2D and trying to make everything 3D. A nice idea but it complicates things a hell of a lot.

NOBODY has a forum name as stupid as Darth Shader. I do.

Login to post a reply

Server time is: 2025-05-19 10:40:20
Your offset time is: 2025-05-19 10:40:20