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 / Nuclear glory dll - Problem with slopes

Author
Message
Sjakie
21
Years of Service
User Offline
Joined: 17th Dec 2003
Location: Netherlands - Delft
Posted: 7th Feb 2004 19:13
Im using the Nuclear Glory DLL on DBC. Its awesome, great work NG!!! But there's one thing... I made a nice castle with stairs. I've got 2 models, 1 for display (with stairs) and 1 for collision (with a slope instead of stairs). Works fine, but when i want to walk upstairs, the walking is very slow and if you turn a bit it moves the other way. I know this is build in, but is there a command that avoids this so i can walk up my stairs with ease? Thnx in advance!!!

Juzt a dude who likez progging - Me loves RTS games
nuclear glory
21
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 7th Feb 2004 20:18
The commercial version has a response setting for SetCollisionsPRO():

RESP_SLIDE_NO_GRAV

which is what you want to use. You can also custom-program the same effect using the feedback system, but we added that setting as a courtesy.

Lead Programmer/Director
Powerful Collision DLL for DBPro and DBC: http://www.nuclearglory.com
Sjakie
21
Years of Service
User Offline
Joined: 17th Dec 2003
Location: Netherlands - Delft
Posted: 7th Feb 2004 20:44
Hmm... im not using the dll very long, so maybe you can make a little snippet for me plz?

Juzt a dude who likez progging - Me loves RTS games
Slayer
21
Years of Service
User Offline
Joined: 15th Nov 2003
Location: CA
Posted: 7th Feb 2004 20:50 Edited at: 7th Feb 2004 20:50
What I think hes trying to say is when you hit a stair make your
program goto anothere loop to get a different collision.

I dont know how to spell
nuclear glory
21
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 7th Feb 2004 20:54 Edited at: 7th Feb 2004 20:54
You can find setup here:
http://www.nuclearglory.com/tutorials/NGColl/203/DBPro/SetCollisionsPRO.php

That covers the usage of the commands. These are for the commercial version (not the free one). Look at the bottom of that page and you'll find example code showing setup and possible situations that you might use it for, etc...

Lead Programmer/Director
Powerful Collision DLL for DBPro and DBC: http://www.nuclearglory.com
Sjakie
21
Years of Service
User Offline
Joined: 17th Dec 2003
Location: Netherlands - Delft
Posted: 8th Feb 2004 11:20
I found an other way to do it... but i'm going to take a better look at yer site NG tanx!

Juzt a dude who likez progging - Me loves RTS games
Sjakie
21
Years of Service
User Offline
Joined: 17th Dec 2003
Location: Netherlands - Delft
Posted: 9th Feb 2004 16:42
Woops... didn't work that well...

Uhm... is there a way to do it with the free dll? If it is, How?

Juzt a dude who likez progging - Me loves RTS games
nuclear glory
21
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 9th Feb 2004 20:47
Yes, in fact it can, if you're not afraid of some vector math.

Basically, you want to shut-off gravity when you're standing on something. And that will stop you from sliding downward.

The question then becomes, how do you know when you're standing on something flat enough?

Take this code snipplet:



And there you go. The variable "gravity" will have a value of 1 if your player IS NOT standing on something, otherwise it'll be 0. Then just turn your gravity on/off based on that variable.

We could make things more complex for more control, but let's not

Lead Programmer/Director
Powerful Collision DLL for DBPro and DBC: http://www.nuclearglory.com
Sjakie
21
Years of Service
User Offline
Joined: 17th Dec 2003
Location: Netherlands - Delft
Posted: 9th Feb 2004 21:09
Yeah that looks good

Juzt a dude who likez progging - Me loves RTS games

Login to post a reply

Server time is: 2025-05-22 18:41:00
Your offset time is: 2025-05-22 18:41:00