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 / I totally need help with collision

Author
Message
DrewG
19
Years of Service
User Offline
Joined: 25th Aug 2005
Location:
Posted: 25th Aug 2005 21:35
Can someone please help me with collision. I am making a game and here is code please be detailed. thanks. My camera keeps going through buildings. (first person game)
Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 26th Aug 2005 10:39
Error obtaining Source Code, invalid ID. Sorry but I've given up.
Stupid forum bug...

anyway, try putting your code between code tags. (look at the code-button at the top of the editor).

Some suggestions:

maybe you can create a sphere around your camera and get the collision of the sphere. If you want sliding collision, you can make a collision box for it.

Or, you can do sliding collision by using static collision.

However, sliding collision only works with boxes, so if you have alot of complex models, you shouldn't use it.

Immunity and Annihalation makes Immunihalation...
DrewG
19
Years of Service
User Offline
Joined: 25th Aug 2005
Location:
Posted: 2nd Sep 2005 23:20
can you just tell me the code. i want collision for a 3ds model in my game. please help

Games I am releasing:
Dragon Stone I : Journey to Achilles Dungeon - 2006?
Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 3rd Sep 2005 13:16


This usually works for 3d models collision.

Immunity and Annihalation makes Immunihalation...
DrewG
19
Years of Service
User Offline
Joined: 25th Aug 2005
Location:
Posted: 4th Sep 2005 23:47
thanks a million. I haven't tried it but am doing so now. Collision is the only thing holding me up from my demo game

Games I am releasing:
Dragon Stone I : Journey to Achilles Dungeon - 2006?
DrewG
19
Years of Service
User Offline
Joined: 25th Aug 2005
Location:
Posted: 7th Sep 2005 18:09
um, do i need to convert the models to a .x format, or is .3ds fine?

Games I am releasing:
Dragon Stone I : Journey to Achilles Dungeon - 2006?
blanky
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: ./
Posted: 14th Sep 2005 21:37
Shouldn't make a difference; But also note that you need to turn collision on at some point for Sven B's code to work.

'SET GLOBAL COLLISION ON' just above the 'Do' should work fine for these testing purposes.

Part of the 'Emergency Response Noob Shooting Team' :: Feel free to add me to MSN, but don't expect any big favours [unless you like VB6]. ... Do what I do, not what I say.
Medusa
21
Years of Service
User Offline
Joined: 7th Sep 2003
Location:
Posted: 25th Sep 2005 03:48
Quote: "Sony 'all I need is collision code'"

What you need is the right collision code!
You will find lots of it in the codebase, some that works and some that doesn't also some that brings your game to an absolute standstill.
JOPIES collision engine definitely works.
You have to insert your code into his collision engine.
You may need to modify it slightly.
The result will be a clean first person shooter with no unexpected surprises.
My description of the engine is that it acts just like a BSP engine, stopping you from going through walls while allowing you to go up ramps and steps etc.
Tip: Normal collision calls drag Dark Basic to a standstill so a proper mathematical collision engine is best.
Also when it comes to bullet collision learn to use the 'get distance' function and call it in groups e.g. for t= 1 to 100 etc.
Best advice: Use the forum for specific questions and search the codebase for anything you think even might be of value to you.
Regards

mpc
Zotoaster
20
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 25th Sep 2005 03:58

Login to post a reply

Server time is: 2025-05-22 17:08:52
Your offset time is: 2025-05-22 17:08:52