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.

DarkBASIC Professional Discussion / Grumph, grumph, grumph... has decent collision gone extinct?

Author
Message
Ian T
23
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Around
Posted: 27th May 2003 05:12
Sorry if I'm bitching a bit here. I've been running into an unusual lot of bugs with the latest load of code I've added, so I'm just a bit irked. Will feel better after a few mugs of liquid caffeine.

Anyways, the problem is-- you guessed it-- collision. Classic, isn't it?

Ok, here's what I've tried. But first, I'll say that what I'm trying to do is incredibly simple, and Classic could handle it without breaking a sweat. I have an object, a box, size 20 (that's radius 10, size 40). It moves at speed 3.5 per second. I'm trying to get sliding collision with some other cubes, all of them size 100. That's roughly 28.6 frames to detect collision... should be smooth as butter.

Anyways, the results.

Automatic Collision: Didn't expect this one to work and wasn't dissapointed. If I keep moving into an object, I can 'break' into it and get stuck there; also, moving at a diagonal angle into an object almost always gets me stuck in it. I tried this with the camera and an object with the same results.

Collision Boxes: These were nice and trusty in Classic and they are to a certain extend in Pro. Non-sliding collision is 100% perfect. But sliding collision I can't get to work with more than a single object at a time, which, for obvious reasons, won't cut it.

I can't get any other commands to perform any kind of sliding collision, and while mathematical collision is easy enough, trying to work out mathematical sliding collision gives me a headache.

Remember that nice Classic demo where the cylinder ran around and could jump on and smoothly collide with a series of stairs? Is it just me, or is this good collision functionality missing in Pro?

I truly hope I'm just missing something terribly obvious here
--Mouse

Famous Fighting Furball
rapscaLLion
23
Years of Service
User Offline
Joined: 29th Aug 2002
Location: Canada
Posted: 27th May 2003 05:48
Collision functionality is sorely lacking in DBP yes.
What kind of objects do you need to collide with?
If it's just boxes I can help you with that math,
but I assume you mean cylinders and such as well.

Alex Wanuch
aka rapscaLLion
Ian T
23
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Around
Posted: 27th May 2003 05:55
Actually, boxes are just fine by me. As long as it's sliding and it's... well... working, I'll be happy.

Thanks for posting so quickly .

--Mouse

Famous Fighting Furball
Ian T
23
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Around
Posted: 27th May 2003 19:43
Up! Up, you delinquent post, up!

--Mouse

Famous Fighting Furball
Chenak
23
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 27th May 2003 20:32
Heres some code that RPGamer did which may be of use to you.

Once you start down the Dark Path, forever will it dominate your destiny...
Ian T
23
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Around
Posted: 27th May 2003 20:42
That's exactly like the Collision Showcase in DBpro, uses the same code. It works okay, but the Get Object Collision commands only handle 1 object colliding with another-- inexcusable for almost any game.

--Mouse

Famous Fighting Furball
TogaMario
23
Years of Service
User Offline
Joined: 30th Jan 2003
Location:
Posted: 27th May 2003 21:33
Yeah, I would love to hear the answer to this one as well.

P.S. This is what the alphabet would look like if Q and R were eliminated.
haggisman
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 27th May 2003 22:45
I believe practically every single system for collisions only detects 'one' collision at a time. It all about the way you handle the data...

project: light/obscurance mapper (80% done)
Ian T
23
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Around
Posted: 27th May 2003 22:51
I tried a Repeat/Until loop, but it seemed not to work.

Rap, you still interested?

--Mouse

Famous Fighting Furball
Sephnroth
23
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 28th May 2003 02:03
cant you set the second parameter of object collision and object hit to 0 and it will then return the object number of anything it collides with? works for me ^^

p4 2.4ghz, 256ddr ram, Geforce4 MX 440
Innovate, redefine, recreate whats in your mind. It isnt fate, you decide, only you can cross that line.
Ian T
23
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Around
Posted: 28th May 2003 02:27
Yes, but the Get Object Collision X, Y, and Z commands don't have parameters (I think they should...) so it dosen't help.

Unless I toy around with the Intersect Object commands-- now there's an idea.

Hmmmmm....

--Mouse

Famous Fighting Furball
Sephnroth
23
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 28th May 2003 17:57
did you use the MAKE OBJECT COLLISION BOX command? I just looked at the help for Get Object Collision x/y/z and they say that command needs to of been used for them to return a value.

More so, the last parameter of the Make Object Collision Box (rotated box = 1, non-rotating = 0) seems to effect this too. The help isnt super clear as usual, but what i make out from it is if you set the rotating flag to 0 then it will populate the object collision x/y/z commands with sliding collision info, but setting it to one will make the commands unusuable (yet give more accurate collision detection). Sounds a little lame to me, but hey, ohwell ^^

p4 2.4ghz, 256ddr ram, Geforce4 MX 440
Innovate, redefine, recreate whats in your mind. It isnt fate, you decide, only you can cross that line.
Ian T
23
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Around
Posted: 28th May 2003 20:19
I believe I've used all of that. Collision boxes were what made smooth sliding collision easy in DBC (I loved it when they put them in) so they were the first thing I tried in Pro. Argg... well, I've just about given up for now.

--Mouse

Famous Fighting Furball

Login to post a reply

Server time is: 2026-07-11 11:42:05
Your offset time is: 2026-07-11 11:42:05