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.

Program Announcements / Newton Game Dynamics WRAPPER v1.32

Author
Message
lower logic
17
Years of Service
User Offline
Joined: 15th Jun 2006
Location:
Posted: 7th Jul 2006 10:45 Edited at: 7th Jul 2006 10:46
@Freddix, do you have winrar? You can get it here: http://rarlab.com/
If you already have that or you installed it and the problem didn't go away, you can download the .rar using Opera or Firefox.

@ALPHA ZERO PRODUCTIONS
I'd check out the Up Vector constraint in the wrapper's documentation. It's a joint that restricts the rotation of an object to just one axis.
Freddix
AGK Developer
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 7th Jul 2006 12:06
yes I have winrar... in fact I've downlaod as .HTM like Explorer proposed and simply rename to .RAR and it work ... Strange IE bejaviour

All we have to decide is what to do with the time that is given to us.
Lukas W
20
Years of Service
User Offline
Joined: 5th Sep 2003
Location: Sweden
Posted: 7th Jul 2006 13:37
Freddix,
you could try FDM, it's a "Free Download Manager".
it works very well with iExplorer, and it can open up webpages with the extionsion .html .htm .php etc. and download the .rar file instead of beeing redirected to the file.

Freddix
AGK Developer
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 7th Jul 2006 15:01
ok Lukas. Thanks for the tip

All we have to decide is what to do with the time that is given to us.
Math89
20
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: UK
Posted: 11th Jul 2006 15:49
I've got a little problem with newton, substeps aren't working, try this code with sync rate to 100, then with sync rate to 10, everything is going slow. So, is that me or a bug ?

Lukas W
20
Years of Service
User Offline
Joined: 5th Sep 2003
Location: Sweden
Posted: 11th Jul 2006 16:02
i think i have experienced this with a project of mine.

i think that the vaule you give "NDB_NewtonSetMinimumFrameRate" is a value that newton uses to check if the current dbpro fps is above or under this value.

if it is under this value, newton decides to decrease the speed of every newton affected object, to keep accurusity (spelling?).

so if your NDB_NewtonSetMinimumFrameRate is set to 100 and dbpro fps is set to 10 then dbpro fps is below 100 and newton decides to move everything slower to keep it's accurisity.

however when i experimented with this, and i sat the NDB_NewtonSetMinimumFrameRate to 20 while the dbpro fps was 60 all forces were double the strenght so i would jump twice as high and stuff.

but i may also be completley noob and this post may not help at all :/

Math89
20
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: UK
Posted: 11th Jul 2006 21:50
I thought newton did some other updates if the elapsed time is too hight (that's what is called substep I think), it's a bit strange.
Anyway, thank you.
Kjelle69
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: Sweden 150 km north of arctic circle
Posted: 27th Jul 2006 10:22
Try to update the newton world several times with a timestep equal to the time elapsed / number of newton updates each loop. There is a lot of stuff written about timing and such both here and on the wrapper forum.

I wish I had the time to properly update the wrapper to match the 6.2 DBPro but right now there is no time... sorry guys !!

-==The tame birds yearn, the wild ones dare to fly.==-
http://Mtec.hostname.nu
Kjelle69
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: Sweden 150 km north of arctic circle
Posted: 27th Jul 2006 10:24
To Cucumber, the material on vehicles already works, but not only the wheels get the material props also the chassi and the rest of the vehicle.

Try it out.

-==The tame birds yearn, the wild ones dare to fly.==-
http://Mtec.hostname.nu
FoxBlitzz
20
Years of Service
User Offline
Joined: 19th Nov 2003
Location: United States
Posted: 2nd Aug 2006 21:44
Okay, my little ball is moving through collision geometry at fast speeds when my framerate is low. I looked through the documentation on this. I found NDB_NewtonBodySetContinuousCollisionMode, but it's disabled! Why is it disabled? It's important for my game! Is there another solution to this that I am missing, perhaps?

AMD Athlon 64 X2 4200+
1GB DDR-SDRAM (May increase to 2GB one day)
512MB ATI Radeon X1800 Series - Finally! A card that does pixel shaders correctly!
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 2nd Aug 2006 22:18
Kjelle:
Yes i allready noticed i can set a material to the whole car..but i was wondering if theres a way to set a different material to wheels only.

Another thing..i set all my rigid body masses with the calculate body volume command(or however its written i dont remember now). and testing it with buoyancy then.
and i noticed all the proportions are set to 1 dbpro unit is equal to 1gr right?
i mean if i set water density to 1.0gr/cm3
and if a 100Dbpro radius sphere is around 400000 dbpro unit volume, then its mass should be around 400000 to make it equal to the water density,right?
i hope i could explain what tried to.
tiresius
21
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 10th Aug 2006 00:03
Quote: "Okay, my little ball is moving through collision geometry at fast speeds when my framerate is low. I looked through the documentation on this. I found NDB_NewtonBodySetContinuousCollisionMode, but it's disabled! Why is it disabled? It's important for my game! Is there another solution to this that I am missing, perhaps?"


You need to do time-slicing along with your timer-based movement. This means that you guarantee that Newton updates 50/60/100 times a second consistently. This also prevents your forces from being overly large in low frame-rates, causing inconsistent physics across different machines.

I'm not a real programmer but I play one with DBPro!
FoxBlitzz
20
Years of Service
User Offline
Joined: 19th Nov 2003
Location: United States
Posted: 13th Aug 2006 02:45
Well, now I'm having it update the physics twice per loop. But isn't that a bit unoptimized? Wouldn't it be better if continuous collision were enabled again? I mean, DarkPhysics lets you use it.

AMD Athlon 64 X2 4200+
1GB DDR-SDRAM (May increase to 2GB one day)
512MB ATI Radeon X1800 Series - Finally! A card that does pixel shaders correctly!
tiresius
21
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 18th Aug 2006 03:51
Quote: "Well, now I'm having it update the physics twice per loop. "


You don't have to update physics twice per loop if you use time-slicing. That makes Newton update N times per second regardless of your FPS.

Here is some basic code to show you the idea, it's from an old version of my project. Treat it like pseudo-code.



I'm not a real programmer but I play one with DBPro!
Kjelle69
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: Sweden 150 km north of arctic circle
Posted: 12th Nov 2006 23:03
I am currently trying to get some time to start coding the next release of the Wrapper. I have a Beta release, and it seems to work with the most recent version of both Newton.dll and DBPro .

So far ....

-==The tame birds yearn, the wild ones dare to fly.==-
http://Mtec.hostname.nu
tiresius
21
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 13th Nov 2006 05:35
That is great news! Let me know if you want me to test things out for the new wrapper and Newton.dll . I'm using tree collisions and rigid bodies... starting on joints now.

And I assume it includes those changes we worked on last year together, regarding material collisions, etc. ?

I'm not a real programmer but I play one with DBPro!
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 18th Nov 2006 09:34 Edited at: 18th Nov 2006 09:55
I have a question. I started learning Newton a week or so ago, and I'm trying to learn the vehicle commands.

I managed to create a vehicle (body, add tires), set materials between car and floor, and ofcourse the driving itself.

But I have a problem: you see, when I position my body in the middle of the rectangle formed by my wheels (or: when the wheels are positioned at equal distance on the X and Z axis), the vehicle gets all jumpy. And by that I mean it can't stay still. It's like the wheels sink through the floor, Newton detects it and applies a force upwards so the wheels jump.
Using 1.32 Newton and 6.3 DBpro

Oh, and while I was searching for a solution on this board, I saw there's a program called CarLab. However, the link seems to be broken. Does anyone please want to upload this program?

[EDIT] It seems that it has to do with the weight of the car and the weight of the tires. I copied the weight and tire properties from the examples, and it seems to be bounceless now.
How do you calculate them anyway?

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
peabnuts
18
Years of Service
User Offline
Joined: 9th Nov 2005
Location: New Zealand
Posted: 19th Nov 2006 08:18 Edited at: 19th Nov 2006 08:25
there is a serious problem with the 1.32 demo files.
in most of the demos they assign a variable to the name floo, but this is already a command in darkbasicpro so the names conflict and it cannot run. i am using upgrade 6.3, and im hoping a small patch can be released to fix this before the new wrapper comes out.

but for now, im going to have to look through the code to see what i can rename.


[EDIT] i managed to edit it into a working status, but i think for any newcomers like me, it would be better to rename these errors to "ground"
Kjelle69
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: Sweden 150 km north of arctic circle
Posted: 25th Nov 2006 15:11
Oh, man , forgot to look through the reserved words. Good point !
Carlab is downloadable from mtec.hostname.nu

-==The tame birds yearn, the wild ones dare to fly.==-
http://Mtec.hostname.nu
TEH_CODERER
20
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 4th Dec 2006 17:54
Or just press Ctrl + H and the type 'Floor' and then 'vFloor' or whatever.

SirLeon
17
Years of Service
User Offline
Joined: 6th Jan 2007
Location: Greece
Posted: 6th Jan 2007 20:54
Hello,

Recently I have started experimenting with the Newton physics engine and the corresponding wrapper.

I would like to ask some questions about the performance optimizations that Newton does automatically and those that we have to trigger.

I would like to create some quite big levels where I use the createtree commands to create the collision data for the static part of my levels. I split my level to several segments and for each of them I create the necessary collision data.

What I ask is if Newton automatically checks if an object (in my a case a whole part of a level) is out of sight and out of reach and doesn't check for collisions in that.

For example if I am in segment A of my level I don't need collision detection in Segment B untli I step in this. Ofcourse I could do that by deleting and reloading data when changing segments although in my case it isn't helpful.

I thought in the beginning that the command "PutAnObjectInFreezeState" (paraphrased) was the one that deactivates collision detection on a given object but finally I see it is something else.

I hope I made my self understood

Thank you for your patience,
tiresius
21
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 10th Jan 2007 23:20
The collision trees for newton are really fast. I haven't had any problems with speed on them, and my separate tree collisions are usually 10,000 polys or so. I've also had several hundred small collision trees, and there is barely a blip on the time it takes to handle them.

I don't know the internal workings of Newton, but it probably does some bounds checking to see if it even needs to check for collision on the trees based on position of the object and the tree. Something like this is easy to do since the trees are static and never move.

Or it might add all the collision trees together in a giant tree that is easily searchable?

You can ask at the forums http://www.newtondynamics.com/ and maybe he will divulge some secret workings for you.

But I'd say go ahead, put the system through it's paces, and make segments of your map and load them all up at the same time. I bet it will be plenty fast enough.

I'm not a real programmer but I play one with DBPro!
Person99
18
Years of Service
User Offline
Joined: 15th Dec 2005
Location: Good question
Posted: 25th Apr 2007 06:57
I have a question about the wrapper - I get an error saying "6.0 must have md5.dll in compiler folder" or something like that when I try to build the demos that come with the wrapper.

Also, all the newton commands are in black, like they don't exist, why?

The Person99 awards go to: 1. Jack the Ripper for hardest crime scenes. 2. Peter Petrelli for most powers. 3. Superman for longest flight. 4. "The Doctor" for best time travel machine.
tiresius
21
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 26th Apr 2007 04:16
Quote: "6.0 must have md5.dll in compiler folder"


Sounds like a dbpro error and not a problem with Newton. Do your other 3D programs compile ok?

Quote: "newton commands are in black, like they don't exist"


Perhaps you didn't install the wrapper correctly? Do you have the keywords_ndb.ini file in your Dark Basic Professional\Editor\Keywords directory?

I'm not a real programmer but I play one with DBPro!
QuothTheRaven
21
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 29th Apr 2007 02:21
Any ideas of a release date for the next version? I remember walaber talking about it...years ago. I've been waiting for the ability to scale my collision primatives for a long time now...

tiresius
21
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 29th Apr 2007 04:41
Walaber is onto bigger and better things with OgreNewt and such.

Kjelle was updating the wrapper to Newton 1.5, but has been busy in RL for a long time. So who knows when an update will happen. You can email Kjelle about it, maybe if enough people are interested he'll continue work on it? *shrug*

I'm not a real programmer but I play one with DBPro!
QuothTheRaven
21
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 29th Apr 2007 09:32
I have a demand for it! A big demand! I count for at least 20 people too

PowerSoft
19
Years of Service
User Offline
Joined: 10th Oct 2004
Location: United Kingdom
Posted: 2nd Aug 2007 12:06
I hate bumping old threads but I have a couple of questions.

1) In the DBPro board someone spoke about being able to modify DBP so it didn't complain about DX not being in the correct place and used it from the DBP exe. Could this system be expanded so that we can actually include the Newton DLL into the EXE and then mean we don't have to include the Newton DLL with the application/game.


2) Does Sparky's collision become obselete when using Newton? Eg can they be co-run on the same project or would this effect the underlying workings of the physics engine?


3) Should I use 'NDB_NewtonReleaseCollision' to clear the handle for the object? In other words do I need the 'collision handle' once I have made my BODY?


I aplogise for the novice questions but this is the first time I've used Newton, I've always tried my own physics calculations.


Cheers,
Rich

The Innuendo's, 4 Piece Indie Rock Band
http://theinnuendos.tk:::http://myspace.com/theinnuendosrock
Olby
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 2nd Aug 2007 20:51
1) I red that thread too and I guess it will work perfectly.

2) They can work together because they both need static mesh for collision\ray detection. And it will also work with dynamic objects.

3) Yes you need to release the collision data because if you don't you will start to get huge memory leaks.

Cheers,
Olby

PentiumIV 1.60GHz, 256MB, NVIDIA GeForce FX 5200 128MB, AC'97, WinXP Pro SP2, DirectX 9.0c (Feb2007), DBPro 6.6b
http://www.myspace.com/producerolby
http://www.olby.times.lv
PowerSoft
19
Years of Service
User Offline
Joined: 10th Oct 2004
Location: United Kingdom
Posted: 2nd Aug 2007 22:37
OH, one other thing I forgot to ask. When positioning objects etc do I have to inform Newton and more importantly with my player control code do I have to inform Newton of that too or does it do that automagically?


Thanks for your reply though


Rich

The Innuendo's, 4 Piece Indie Rock Band
http://theinnuendos.tk:::http://myspace.com/theinnuendosrock
Olby
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 3rd Aug 2007 18:20
I guess it should do it auto. I have not coded with Newton for like 2 years but I guess it should work that way.

PentiumIV 1.60GHz, 256MB, NVIDIA GeForce FX 5200 128MB, AC'97, WinXP Pro SP2, DirectX 9.0c (Feb2007), DBPro 6.6b
http://www.myspace.com/producerolby
http://www.olby.times.lv
PowerSoft
19
Years of Service
User Offline
Joined: 10th Oct 2004
Location: United Kingdom
Posted: 3rd Aug 2007 19:50
Cheers, thanks alot

The Innuendo's, 4 Piece Indie Rock Band
http://theinnuendos.tk:::http://myspace.com/theinnuendosrock
tiresius
21
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 6th Aug 2007 04:43
You should start a new post for questions, I got all excited and thought Kjelle posted a new update for 1.5 !

Newton used to have two versions, one which the Newton.dll was placed inside the exe, and one where it was outside. Due to problems with some windows versions (win 98?) the included DLL one was dropped. Is it really a problem to put the DLL in the same directory of your main program?

I'm not a real programmer but I play one with DBPro!
PowerSoft
19
Years of Service
User Offline
Joined: 10th Oct 2004
Location: United Kingdom
Posted: 8th Aug 2007 10:28
No, not a problem at all. I just thought that you could use that similar method to place it in the EXE (or use the_winch's application)

The Innuendo's, 4 Piece Indie Rock Band
http://theinnuendos.tk:::http://myspace.com/theinnuendosrock

Login to post a reply

Server time is: 2024-05-09 02:50:37
Your offset time is: 2024-05-09 02:50:37