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! / Sprite (Bug?) Question - Rich?

Author
Message
Kangaroo2
21
Years of Service
User Offline
Joined: 26th Sep 2002
Location: United Kingdom
Posted: 31st Jan 2003 01:49
2 Rich "Hi man - I know u love 2d and all and so do I so I tht u could help me, but any1 else's input is also VERY welcome 2 "

I'm in the process of making a 2d demo in DBPro - the first time I've tried to make an entire 2d project since using DB1 and I've come accross a problem.

I have one sprite - for my example a Sonic. This is saved as bitmaps, loaded as images and called sprite 1. The black around him is automatically removed, as I would hope

I have another sprite which is a basic small floor. This is saved as a bitmap, loaded as an image and called sprite 1000. Again, the black around the floor is automatically removed

However, when I test for collisions between them, it detects collision not between the visible area of the sprites, but with the whole sprite including the invisible black areas. (essentially as a small rectangle and a big rectangle, not as a sonic shape and a floor shape.

I'm sure this used to work in DB1? Is this a bug or is there another command or extension I should be using? Is it because DBP now treats sprites as 3D and is therefore giving them "box" collision?

Code below (Its very early, only 3 hrs work, don't laugh )



Like I said this is in DBPro, patch 3.1

Any help as to why this doesn't work will be well appreciated - it seems a pretty bad thing to be wrong if it is a bug? Like I said I've never attempted this in Pro before, only in DB1

If this is a known problem, any idea on a date for fixing it? Or is it my code? Or my PC setup? Thanks guys
http://www.myminehead.com/mylogo.gif[/img]
warzog
21
Years of Service
User Offline
Joined: 13th Oct 2002
Location: United States
Posted: 31st Jan 2003 03:54
this is a known problem, no known date for fixing it
there are some work-arounds on the forum
but it could take days to find them, no search on this forum
Kangaroo2
21
Years of Service
User Offline
Joined: 26th Sep 2002
Location: United Kingdom
Posted: 31st Jan 2003 11:22
lol thanks - I tht my code was ok... Surely this is a pretty major bug tho? Grrr There are plenty of ways I could work around it, but none of them would suit my final idea I'm working for Guess for that at least I'll just have to wait Thanks tho, and if Rich does see this, Any idea of a rough timje for fixing this? Thanks

Richard Davey
Retired Moderator
21
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 31st Jan 2003 12:01
I'm not sure it's a fix that's needed, more of a parameter on the collision command to allow for it. There have been numerous talks about how to do pixel perfect collision on DBDN recently, I'll see if they'll let me post what they came up with here.

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
DB Team / Atari ST / DarkForge / Retro Gaming
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 31st Jan 2003 20:42
There were actually two routines that were coded on the one thread rich. One by Fredix (I think that's what he posts as here) and the other by ChipOne and heavily optimised by yours truly.

The first could handle 16/32 bit collisions, where the other could only handle 32 bit but was a hell of a lot faster.

Neither of them take into account offsets (hot spot), scaling, flipping or mirroring, rotation, texture offsets or animation.

The good news though is that I did manage to plant the suggestion into Mike's head just recently...
Kangaroo2
21
Years of Service
User Offline
Joined: 26th Sep 2002
Location: United Kingdom
Posted: 31st Jan 2003 21:52
"offsets (hot spot), scaling, flipping or mirroring, rotation, texture offsets or animation"

I don't need anyway of these Any help / input would be most helpful

Thanks Rich glad I'm not going mad... I guessed it was because of those reasons. Still - for a 100% sprite based game it can seriously limit your options obviously. If you fake the collisions theres no scope for quickly changing your level design, or letting users design their own without making a separate collision engine whihc kinda defies the point of the quick project I was fiddling with.

I hope the pixel perfect thing is implemented soon, either as part of DBPro or as some add on cod / plugin from some1 - I'd like to finish this porject one day

Anyway thanks 4 the input guys

IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 1st Feb 2003 20:53
He he, I just managed to squeeze another 15% performance out of the sprite collision routine for fully overlapping but non-colliding sprites.

If Rich doesn't get an answer from ChipOne soon, I'll post the code we have, seeing as there are almost no lines I haven't changed in one way or another.
Kangaroo2
21
Years of Service
User Offline
Joined: 26th Sep 2002
Location: United Kingdom
Posted: 1st Feb 2003 22:01
Cool thanks man it might well be just what I need If u don't want it posted here I don't mind if u wanna mail any details to me, but personally I guess many ppl would like this

IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 3rd Feb 2003 18:57
Well, here it is:

Kangaroo2
21
Years of Service
User Offline
Joined: 26th Sep 2002
Location: United Kingdom
Posted: 3rd Feb 2003 22:48
AAAHHHhhhhh Nice 1 I see... why didn't I think of that? Cheers man I'll try that asap Yay

Login to post a reply

Server time is: 2024-04-19 05:42:41
Your offset time is: 2024-04-19 05:42:41