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 help

Author
Message
new programmer
19
Years of Service
User Offline
Joined: 20th Dec 2005
Location: right behind you.
Posted: 21st Dec 2005 00:42
hi, i'm having some trouble with colissions for my game.

i'm working on grass textures and tree models and stuff, but i started like a half hour ago and i posted a shot of what i hav so far.

thanx nice people!

Attachments

Login to view attachments
SirFire
20
Years of Service
User Offline
Joined: 4th Apr 2005
Location: North America
Posted: 21st Dec 2005 02:33 Edited at: 21st Dec 2005 02:34
You have not explained what your problem is exactly, only that you have one. It's just about impossible to help you unless you give us more information, such as:

1. What, specificly, is the problem you are having with collisions.
2. what do you want it to do.
3. What code are you using related to the problem

new programmer
19
Years of Service
User Offline
Joined: 20th Dec 2005
Location: right behind you.
Posted: 21st Dec 2005 04:19
well, i just need the basic collision code. i've tried
but it didn't work...
The crazy
20
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Behind you
Posted: 21st Dec 2005 05:57
lol. you've got a looooooong way to go. collision is the root of all evil dude. I can't find good help on it either...

Your signature has been erased by a mod because it's larger than 600x120...
dab
20
Years of Service
User Offline
Joined: 22nd Sep 2004
Location: Your Temp Folder!
Posted: 21st Dec 2005 06:20
I got this code straight from the dbc helper. I hope this helps you!


Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 21st Dec 2005 08:44 Edited at: 21st Dec 2005 08:44
I'll give the 4 ways for collision (in DBC):

1) Math collision.
I'm sure you all heard of the distance formula. But, this can be used for collision. For example, if the distance( dist# = ((x-x2)^2 + (y-y2)^2 + (z-z2)^2) ) smaller is than 100, reset the players position to the start of the loop. (The distance formula isn't the only math that can be used for collision)

2) Normal collision
This is the most common collision. It checks the collision with any object you want. On top of that, you can change the shape for collision to boxes, spheres or polygons(slow, but accurate).

3) Sliding collision: collision boxes
This collision only works with boxes. For every object, you have to create a object collision box. But, advantage is, that you can return adjustement data for X,Y and Z which is experienced as sliding collision.

4) Static collision
This collision also only works with boxes, and is, actually an expansion on the collision boxes and therefor more difficult to learn. The system is a bit different, but the options are bigger: sliding collision, static line of sight, etc...
It's best to start with normal collision, so the rest is easier to learn.

We give you the option: which will you choose?
new programmer
19
Years of Service
User Offline
Joined: 20th Dec 2005
Location: right behind you.
Posted: 21st Dec 2005 23:28
wow thanx seven B!

would this work(i'm using what you said)?:



or would this work?


if either one works, please tell me. thanx.(it would b better if the second 1 worked)

Login to post a reply

Server time is: 2025-05-22 23:59:45
Your offset time is: 2025-05-22 23:59:45