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 Professional Discussion / Gravity Problem..

Author
Message
Epimetheus
22
Years of Service
User Offline
Joined: 5th Oct 2003
Location: Naples, Florida
Posted: 3rd Nov 2003 22:22
I just keep falling through(The cube character ) .
p.s. I'm using the Nuclear Glory DLL.
Thanks!
nuclear glory
22
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 3rd Nov 2003 23:21
I just sent you an email explaining possible causes for the problem.

Make sure you have the constant block at the top of the program, the code for this would be:

#Constant ELLIP_2_POLY=2
#Constant RESP_SLIDE=2
#Constant DYN_NO_RESP=0

Let me know how it goes.

Lead Programmer/Director
Powerful Collision DLL for DBPro: http://www.nuclearglory.com
QuothTheRaven
23
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 4th Nov 2003 00:26
I've had no problems at all with the nukeglory dll (except of course getting stuck in a space that has a smaller height than the character and bouncing everywhere, but that will be fixed)

just look at the well documented code, that'll solve the problem.

Oh, and nuke, I fixed the .x shiney thing, I downloaded my own .x exporter and now nucleardll will be my first choice for everryyything

Epimetheus
22
Years of Service
User Offline
Joined: 5th Oct 2003
Location: Naples, Florida
Posted: 4th Nov 2003 01:53
Thanks! I fixed the problem! But my cube Character keeps getting stuck when it tries to transfer to higher elevation.
zircher
23
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 4th Nov 2003 03:21
Time to write some 'step' code. The gist of that is to look forward for collisions and if you find one then look forward and up (by whatever step size you choose), if the forward and up is collision free, you move the character up and over. If the forward and up collision is a hit, then treat it as a wall.

Jumping is just a variation on that.
--
TAZ
Epimetheus
22
Years of Service
User Offline
Joined: 5th Oct 2003
Location: Naples, Florida
Posted: 4th Nov 2003 22:31
Can you give me an example of what your talking about zircher ?
nuclear glory
22
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 5th Nov 2003 21:28 Edited at: 5th Nov 2003 22:24
The DLL is designed to go over things such as steps, etc., automatically.

I found a problem in the code. A variable "y" was used to set the object's Y position instead of "y#" so the object was trying to be placed at the Y position of 0 constantly. This simulated a massive amount of gravity so the object couldn't go over anything.

I also put in a bit of code that switched gravity on/off based on the Y normal of the last hit surface. This allows you to collide with a steep slope and slide up it easier as gravity is turned off. And if you're floating, gravity is turned back on.

Here's the complete code:



I also turned wireframe mode on for the landscape so I could see it.

Lead Programmer/Director
Powerful Collision DLL for DBPro: http://www.nuclearglory.com
Epimetheus
22
Years of Service
User Offline
Joined: 5th Oct 2003
Location: Naples, Florida
Posted: 5th Nov 2003 22:29
Thanks. this has been a huge help considering that I am probably going to use this code for all of my games. I'll be sure to include your name in the credits of any of my games that uses your DLL. Thanks again.
P.S. do you want me to put your real name or screen name in the credits?
nuclear glory
22
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 5th Nov 2003 22:45
Greets,

Credits aren't a requirement but are very kind and much appreciated.

Here's some info you could include:

Website: www.nuclearglory.com
Name: Matthew DeWalt

That's probably best, as we're doing work outside of DB as well.

Thanks a lot.

Lead Programmer/Director
Powerful Collision DLL for DBPro: http://www.nuclearglory.com
spooky
23
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 6th Nov 2003 00:14
@nuclearglory - I know your latest dll can handle multiple objects at once, but how many? If I made a level completely out of basic shapes like boxes, cubes, pyramids, etc, will your dll cope with full sliding collision with say a couple of hundred objects. I suppose I could try myself but I'm feeling particulary lazy at the moment!

Boo!
nuclear glory
22
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 6th Nov 2003 01:13
In the current release on the DLL on the site, there is a bug where if a collision ellipsoid hits 2 or more meshes at once it'll only collide with one of them and pass through the others. This was a logic error we found late in development and are fixing it for the next release. (Next release will be 2.01)

The DLL is designed to handle object numbers 1 to 5000. There is also a command to disable objects, which would give a significant speed increase if you disabled the majority of objects that were out of range for your player, etc.

So, it's being designed to accommodate large worlds like that, the real limits are just computer memory limits. And the object number cannot go higher than 5000.

Lead Programmer/Director
Powerful Collision DLL for DBPro: http://www.nuclearglory.com
spooky
23
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 6th Nov 2003 01:25
Thanks for the info - sounds very promising. Not much good to me at moment if only first collision is acted upon as you may be colliding with 2 or 3 objects at once.

My alien compo game is a huge level made of lots of objects that hide/show when required and a virtual matrix that scrolls with the player giving the impression of a huge landscape. I want my indoor parts of level to have stairs and multiple levels, so your dll would be perfect, but I'll knock up my own for now, will be a bit slower but initial tests show game will still be playable.

I have no modellling expertise or BSP building knowledge, so I have to do it this way. I am good at writing apps though, so my level designer will be good!

Look forward to next release!

Boo!

Login to post a reply

Server time is: 2026-07-26 17:37:06
Your offset time is: 2026-07-26 17:37:06