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 Discussion / Bah. Collision problems.

Author
Message
Yoshiman1
21
Years of Service
User Offline
Joined: 12th May 2004
Location:
Posted: 21st Jan 2005 02:04
Okay, so I take a look at DBC's collision example, since I'm having problems with my collision. All they have is the command set object collision on 1 and the if object collision, do whatever command.

So I do the exact same thing with mine. I have a level object and my player model. I have set object collision on 1 (my player model), and the if object collision command, do whatever it's supposed to. Thing is, it won't do what it's supposed to. It's like there's no collision.

I even tried setting global collision on and setting the object collision on my level model. But neither works.

The only thing that works is if I set the object collision to boxes or spheres. But then it slows down majorly. The only time I've had it slow down is if I set to to polygon. But spheres and box collision? Never had it slow down.
NanoBrain
20
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 21st Jan 2005 03:45
I have no knowledge of using DB's collision system, but I have heard of it being a major processor eater. I would suggest just learning to calculate the collision yourself. EXwritten in pusedo style code)

Here is an image to visually explain what I am saying.

Anyway, you might already know this and just not like it's method. But, I thought I would give my honest input. Later.

+NanoBrain+
Yoshiman1
21
Years of Service
User Offline
Joined: 12th May 2004
Location:
Posted: 21st Jan 2005 05:27
Holy crap. That's gonna be a hectic code for my level model.
Osiris
20
Years of Service
User Offline
Joined: 6th Aug 2004
Location: Robbinsdale, MN
Posted: 21st Jan 2005 05:30
just go newton physics

Yoshiman1
21
Years of Service
User Offline
Joined: 12th May 2004
Location:
Posted: 21st Jan 2005 06:37
Isn't that something you have to pay for? I don't have the money for it.
Osiris
20
Years of Service
User Offline
Joined: 6th Aug 2004
Location: Robbinsdale, MN
Posted: 21st Jan 2005 13:02
walber told me it was free and i got the lastest one for free of his site

Yoshiman1
21
Years of Service
User Offline
Joined: 12th May 2004
Location:
Posted: 21st Jan 2005 23:41 Edited at: 21st Jan 2005 23:45
Ah. Nevermind. I'm thinking of Nuclear Glory.


EDIT: Aw, man, it's free, but it's for DarkBasic Pro. I have Pro, but it has problems with animation in my models.
Hop a long
21
Years of Service
User Offline
Joined: 12th May 2004
Location: The Code Dump
Posted: 22nd Jan 2005 10:06
Yoshi
In your first post you mentioned DBC. You also have DBP. In which one are you coding now? And, can you post a snippet?
Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 22nd Jan 2005 23:23
For simple, non-rotated box collision (AABB), check out this snippet.
http://www.thegamecreators.com/?m=codebase_view_code&i=67ac560245c9b4822f6e288ba7137bd4

"eureka" - Archimedes
Dom
20
Years of Service
User Offline
Joined: 31st May 2004
Location:
Posted: 22nd Jan 2005 23:52
Just use NGC. You can still get a free version of it. I have (Cos Im a cheapskate)


Thanks to Animeblood for the Logo!
Yoshiman1
21
Years of Service
User Offline
Joined: 12th May 2004
Location:
Posted: 23rd Jan 2005 14:07
"Yoshi
In your first post you mentioned DBC. You also have DBP. In which one are you coding now? And, can you post a snippet?"


I'm coding in DBC right now, as it doesn't mess up animations in my model.

I can post the source code, but I don't know how it'll help, it's the regular commands you'd see in any other normal working program.

This is all I have for now. But it makes Mario move and fall, and that's enough to check collision.
Hop a long
21
Years of Service
User Offline
Joined: 12th May 2004
Location: The Code Dump
Posted: 24th Jan 2005 05:18
Yoshi
I believe DBC will load your "L1\Level1.x" as a single object. I don't think it will be able to pick out the individual objects that the level is made of.
Yoshiman1
21
Years of Service
User Offline
Joined: 12th May 2004
Location:
Posted: 25th Jan 2005 01:41
Well, actually, I think it does, because when I put on the set collision to spheres or boxes or any of those commands, the collision works. It just goes way too slow, but I've never had that problem when setting the collision to SPHERES or BOXES.
Hop a long
21
Years of Service
User Offline
Joined: 12th May 2004
Location: The Code Dump
Posted: 25th Jan 2005 11:30
Ohkaaay
I've made levels in the DeleD editor which saves as x files. I could not write code that would register collisions against the individual components using the Object Collision command. Never mind any that worked but slowed down the frame rate.

What editor or app are you using to build your level?

Also in your code I don't see any routines for collision except to end your jump. You don't say what you are trying to do when the collision does't seem to work. For example, are you looking for collisions against walls?
Yoshiman1
21
Years of Service
User Offline
Joined: 12th May 2004
Location:
Posted: 26th Jan 2005 02:10
I used Anim8or, copying and pasting on different models onto my 3 boxes. Then I transfered it over to 3D Studio Max to reduce the polygon count. Then I used Darkbasic's X convertor to convert it to an x file.



Well, basically, if there's no collision, then allow him to fall. If there's a collision, set the grav# to 0 so that he doesn't fall anymore. So I'm looking for collisions against the ground.
Hop a long
21
Years of Service
User Offline
Joined: 12th May 2004
Location: The Code Dump
Posted: 26th Jan 2005 08:20
I think I know what your level is like, the player has to jump from platform to platform. Though I'm not sure what this means:
Quote: "copying and pasting on different models onto my 3 boxes"

If your level has a small number of objects you can load them individually.

I might be missing the platform completely and about to fall but is this what you are talking about? :
http://www.geocities.com/hifin2003/platform_jumping.html

If it is then here is a follow up with a simple animation:
http://www.geocities.com/hifin2003/platform_teddy.html
Yoshiman1
21
Years of Service
User Offline
Joined: 12th May 2004
Location:
Posted: 27th Jan 2005 07:30
"If your level has a small number of objects you can load them individually."

... load... them... individually, hey, wait a minute, YOU'RE A FLIPPIN' GENIUS! Thank you, this just solved my problems!
Hop a long
21
Years of Service
User Offline
Joined: 12th May 2004
Location: The Code Dump
Posted: 27th Jan 2005 09:26
Dom
20
Years of Service
User Offline
Joined: 31st May 2004
Location:
Posted: 28th Jan 2005 01:37
NGC!!!!


Thanks to Animeblood for the Logo!
Yoshiman1
21
Years of Service
User Offline
Joined: 12th May 2004
Location:
Posted: 28th Jan 2005 08:26
Bah... not so much, still had the same problem. I made a seperate box, and didn't even set the collisions on for the big level, and for some reason, when I set polygon collisions for only 2 boxes made in Darkbasic, it still went slow.


And I tried NGC, but it was weird and complicated.
Hop a long
21
Years of Service
User Offline
Joined: 12th May 2004
Location: The Code Dump
Posted: 28th Jan 2005 10:36
When you change your code, no one knows the new details of what you have done unless you post it. Hint,hint,hint....hint.

By the by, just how many polys are in your models?

Login to post a reply

Server time is: 2025-05-24 03:45:40
Your offset time is: 2025-05-24 03:45:40