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 / Collisions with DB

Author
Message
Gamers for sale
19
Years of Service
User Offline
Joined: 19th Nov 2005
Location: Some where beneath the elements
Posted: 8th Aug 2006 17:54
I have worked on it for a while and I am still having problems with it. It doesn't work at all. (I already posted this in the new comers corner and no one responded for a week)

Here's the code:


The warehouse building is the static collision but I didn't know how to get it to work because you are in the warehouse and its objects inside are part of the warehouse object. (Sorry no media)
(So one object that you are inside of and you start out floating off the ground because I used a collision box around the camera that is off the ground so not in collsion)
Gamedesign er20
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: The one place you would never look...
Posted: 8th Aug 2006 21:42
I tried your code on my Darkbasic, (I have the same media files) and it won't even run, theres a problem with the object, but i'm not sure what

Cocacola and Pepsi aren't that differnt. Deal with it.
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 10th Aug 2006 02:42
Hi Kevin,

Take a look at this example that coomes with DBC. It should give you an idea of how to set up your static environment for collision.



I would suggest you use this code but change the background environment to your warehouse or whatever background you're using. Try and get this default program to run in that environment. If you do that, you should have a pretty good idea how to handle collision.

Enjoy your day.
Gamers for sale
19
Years of Service
User Offline
Joined: 19th Nov 2005
Location: Some where beneath the elements
Posted: 10th Aug 2006 06:10 Edited at: 10th Aug 2006 06:10
Gamedesign er20 one thing, you couldn't have the same media files because one is custom so, that might be the reason it wouldn't compile and secondly it had to open the file by following a custom path so unless that was changed I would work.
Gamers for sale
19
Years of Service
User Offline
Joined: 19th Nov 2005
Location: Some where beneath the elements
Posted: 10th Aug 2006 06:12
Latch I have used this before and got a good idea of how to use it but with you being in the object or enviroment it's difficult to set up collisons.
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 10th Aug 2006 13:41 Edited at: 10th Aug 2006 19:01
Hi Kevin,

Well, I took my own advice and modeled a collision example based on the DBC example 25. Essentially, you are trapped inside a stone cell. I commented where I thought the tricky stuff was.

Your code was almost there, but it seems you have to treat each wall and each object inside, encased in it's own collision box. If you encase the whole factory, or house, at once inside a collision box, it doesn't seem to work. In fact, when I launched the program and had collision set this way, it repositioned the camera outside of the box entirely.

Take a look... I've also included the media. But I think this should get you started:



Let me know if you have any questions

Enjoy your day.

Attachments

Login to view attachments
Gamers for sale
19
Years of Service
User Offline
Joined: 19th Nov 2005
Location: Some where beneath the elements
Posted: 15th Aug 2006 21:12 Edited at: 15th Aug 2006 21:14
Can you use execute a string in DB or DB pro? Possiblely from data files?

Edit: Or from clipboard? (copy command in windows)

Login to post a reply

Server time is: 2025-05-25 06:24:57
Your offset time is: 2025-05-25 06:24:57