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 / Polygon Collision

Author
Message
AuzingLG
21
Years of Service
User Offline
Joined: 19th Sep 2003
Location:
Posted: 1st Apr 2004 21:46 Edited at: 1st Apr 2004 21:47
Hi!
Compton's trick is nice, but I want to allow players of my game to add their own maps. So, my problem is:
If I use:

Everything works. But then I typed:

And the collision detection didn't work anymore. I hope there is a way to solve my problem without collision dlls.
Please help me, THANKS.

Please wait. Loading sick nature...
guru of boredom
21
Years of Service
User Offline
Joined: 12th Oct 2003
Location: middle of no where
Posted: 2nd Apr 2004 06:24
umm why not just get rid of the period that u added so it works again. stupid answer but its all i can say

we are not outnumbered! we are just in a target rich enviroment!
P4 2.4 ghz 120 GB 256 mb GeForce4
Brandon Smith
21
Years of Service
User Offline
Joined: 19th Oct 2003
Location: Urbana, Illinois (USA)
Posted: 5th Apr 2004 05:07
lol,

Well the code that you have there looks correct. That's very strange. My guess is that it must be something that your doing somewhere else. How long is your code? I can take a look if you'd like. Is the model of your map loading correctly at least?

Brandon
AuzingLG
21
Years of Service
User Offline
Joined: 19th Sep 2003
Location:
Posted: 5th Apr 2004 21:32 Edited at: 5th Apr 2004 21:33
Thank you, that's nice.
The model is an X-Version of Stratus.CSM...
It's loading correctly.
The code is about 4 KB.
I've added it to this post.
It's very WIP.

Please wait. Loading sick nature...
Brandon Smith
21
Years of Service
User Offline
Joined: 19th Oct 2003
Location: Urbana, Illinois (USA)
Posted: 6th Apr 2004 21:52
Instead of testing your object collision with object 4 and the second parameter as 0, what happens when you test it with 4 and 1?

So
if object collision(4, 0) > 0 then position object 4, x#, y#, z#

would become
if object collision(4, 1) > 0 then position object 4, x#, y#, z#

Does that help at all?

Brandon
AuzingLG
21
Years of Service
User Offline
Joined: 19th Sep 2003
Location:
Posted: 7th Apr 2004 21:11
no, it didn't work

Please wait. Loading sick nature...
nuclear glory
21
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 8th Apr 2004 01:52
hmmm, have you tried it using our DLL? It's probably not what you want to hear, but you might find that it quickly overcomes your problem.

Lead Programmer/Director
Powerful Collision DLL for DBPro and DBC: http://www.nuclearglory.com
Brandon Smith
21
Years of Service
User Offline
Joined: 19th Oct 2003
Location: Urbana, Illinois (USA)
Posted: 9th Apr 2004 04:20
The problem might be because you are updating x#,y#,z# twice each frame.

So you're player is moving to a spot. The x#,y#,z# is updated to reflect that. Then you say, "is there a collision with the player and anything else? Well if there is move him to where he already is right now". Which doesn't make much sense, and then you update the x#,y#,z# again.

Try taking away the update of x#,y#,z# before the collision test, and see if that doesn't solve any problems.

I also strongly recommend the NuclearGlory collision DLL if you are serious about having good collision detection in your game, it's something to at least look into.

Brandon
Brandon Smith
21
Years of Service
User Offline
Joined: 19th Oct 2003
Location: Urbana, Illinois (USA)
Posted: 9th Apr 2004 05:12
I apologize, I misread your code. You don't need to update the player positions twice, but it really shouldn't actually make a difference the way you have it written. I wish I knew what the problem was, but I'm sorry, I can't figure it out.

Brandon
AuzingLG
21
Years of Service
User Offline
Joined: 19th Sep 2003
Location:
Posted: 9th Apr 2004 20:02
it doesn't

Please wait. Loading sick nature...
Emperor Baal
21
Years of Service
User Offline
Joined: 1st Dec 2003
Location: The Netherlands - Oudenbosch
Posted: 9th Apr 2004 20:32
Here's a way to check for collision (sliding)



Done, you can also do this for the Y axis (+ height check, so he
can still walk on stairs and slopes)

Quote: "
UPDATED

Amd 2800+ 1024mb pc3200 A7N8X - Deluxe Ati Radeon 9800PRO 256mb
"

Login to post a reply

Server time is: 2025-05-23 06:05:06
Your offset time is: 2025-05-23 06:05:06