PDA

View Full Version : Newton Game Dynamics - Linux Version



Sascha Willems
17-05-2005, 08:49 AM
As already promised some time ago, the Newton Game Dynamics Engine ('htttp://www.newtongamedynamics.com') is now also available for Linux. You can grab version 1.32 of the SDK here ('http://newtongamedynamics.com/downloads.html') (also includes all tutorials).

As for the Pascal/Delphi-Headers : Since they are now maintained mostly by myself they're not available for Linux. I'm no Linux-user (although I have a distro installed somewhere) so I haven't ported/tested them under Linux. The headers itself (get them here ('http://newton.delphigl.de')) work with FreePascal, so they may also work with Linux out of the box. If that's not the case and someone wants to port the header to Linux, please contact me!

savage
17-05-2005, 09:06 AM
I'll test it on Linux this evening.

savage
17-05-2005, 06:16 PM
ok, I just had a quick look at the NewtonSDK for Linux and they/he is supplying a libNewton.a file, which I believe mean that we need to statically like to the file. Do you know if he will stick to static linking or will he move to dynamically linking ( ie libNewton.so )?

tux
17-05-2005, 07:45 PM
on the windows one there are .lib and .dll so possibly. go to the newton forum and ask him :)

Sascha Willems
20-05-2005, 07:52 AM
I'll ask Julio directly on this matter. For Win32 (at least for the C-version) he is supplying a static and a dynamic library, so I guess he may do this for Linux too.

savage
06-06-2005, 10:47 PM
Please ask Julio if a shared object will be released.

Sascha Willems
07-06-2005, 08:08 AM
Ah, sorry for fogetting about this :oops: I'm very short on time these days and some serious real-life stuff is dragging on my attention. But as I see you already did and Julio answered that it'll be released with 1.35. So it shouldn't be too long, since NGD1.35 is already in beta-testing (and looking very good btw ;) ).

savage
07-06-2005, 09:02 AM
No problem Sascha, I know how real-life can get. I look forward to playing with 1.35.

Sascha Willems
12-06-2005, 12:26 PM
Dominique, I'm right now writing a cross-plattform FPC-Template for use with OpenGL and Newton. I've also asked Julio directly to also release a linux shared-library for Newton with the next release, and he already replied that the next SDK will have both kinds of library, shared and static!

I finally got KDevelop and FPC set-up and working together on my dual-boot Linux (based on Kanotix) so as soon as the shared library is released (we SDK-developers usually get stuff a bit earlier ;) ) I'll try my template on Linux. Right now it's using plain OpenGL, but I'll install SDL on linux later this day and try to use SDL for even more cross-plattform-fun.

Just wanted to let you know, so that two people won't do the same stuff.

P.S. : Now the only thing needed is someone who is willing to get this stuff ported to MacOS. There are some Mac-users over at the newton forums (with some nice projects), but none of them is using FPC. Since the template will use SDL, it shouldn't be hard to get it working with Mac OS (I guess so...). So if any mac-user is interested please let me know! The more platforms the better!

savage
12-06-2005, 03:06 PM
Great Stuff Sascha, I look forward to the next Newton release!

Sascha Willems
14-06-2005, 09:04 AM
Ah well, KDevelop + FreePascal is very nice and SDL seems to be very handy too ;) (I wish there was something similar to KDevelop under Win32)

I finished my Newton/SDL/GL-template yesterday and as it uses SDL it should be cross-platform as long as the target platform supports newton. The template compiles and works fine under Windows and also under Linux (when I comment out the Newton-part, since the dynamic lib isn't available). And as I unterstand it then also should compile fine under MacOS, or is there anything I need to know that's different from Linux/Win32 under MacOS?

And after NGD 1.35 with the dynamic lib for Linux is released I'll also update all the developer samples for Newton on my page to SDL and FP so they're cross-platform too.

savage
14-06-2005, 11:05 AM
Great stuff, look forward to seeing it.

btw, any chance of a small tutorial on setting up FPC and KDevlop.

Sascha Willems
15-06-2005, 08:04 AM
btw, any chance of a small tutorial on setting up FPC and KDevlop.

It was so easy, at least after I figured out how to do it, that it's too little for a tutorial. In my Linux installation, which is the HD-install of Kanotix (means it's a Debian distro or so) there is a graphical package-manager included, called Synaptic which allows you to easily install packages. It get's a current packages list from the net and even automaticllay selects and installs all needed package if you choose some package that needs some others.

So I used Synaptic to install the newest packages for KDevelop, for SDL and also for FreePascal and after it was finished installing the packages I was able to write and compile FPC (2.0.0) apps.


P.S. : I saw that some ODE-demos are included in JEDI-SDL. So is it possible that later on the SDL versions of my newton demos (right now it's three of them) also will be included in SDL? I'd love to contribute them.

savage
15-06-2005, 08:28 AM
P.S. : I saw that some ODE-demos are included in JEDI-SDL. So is it possible that later on the SDL versions of my newton demos (right now it's three of them) also will be included in SDL? I'd love to contribute them.

Absolutely, that was the plan all along :).

Ideally, I would also like to create a demo where you could dynamically change between, ODE, Newton and even Havok if they will let us create a Pascal unit for it :). What's definately needed for both are step by step demos showing how to use each and how all the bits fit together.

Sly
15-06-2005, 11:21 AM
...and even Havok if they will let us create a Pascal unit for it :).
Have you seen the licensing costs for Havok? At Krome we have considered Havok for large commercial projects and we still baulk at the costs involved.

savage
15-06-2005, 11:49 AM
Have you seen the licensing costs for Havok? At Krome we have considered Havok for large commercial projects and we still baulk at the costs involved.

I know they are expensive, but have no idea how much it costs. So what does Krome use for physics? Is it all in house?

Sascha Willems
15-06-2005, 03:01 PM
Forget about Havok, it's nowhere in reach for free or indy-developers and I'm sure they have about zero interest in a "pascal-market". So even asking them about it would be a waste of time.

But with Newton and ODE in JEDI-SDL, you have the most important two physics engine on board. Though there are some more free engines on the market, like Tokamak, Novodex (free for personal use), but seems that no one is using them with Pascal.

Sly
15-06-2005, 10:01 PM
I know they are expensive, but have no idea how much it costs. So what does Krome use for physics? Is it all in house?
Last I remember, it was about $20,000 per license. For one title.

For Krome's current generation games, we are using in-house solutions for rag-doll, cloth and leg IK simulations. They do what we need for our current games, but for future titles we may need more heavyweight physics solutions.

Sascha Willems
17-06-2005, 08:46 AM
What's definately needed for both are step by step demos showing how to use each and how all the bits fit together.

So now the count is at five demos that I'll release which are all commeted very extensive, so that after looking at the source and reading the comments anyone should be able to do at least some basic stuff with Newton :
SDLBasic
This is as basic as it can get. It only uses a single callback for applying gravity onto some boxes.

SDLJoints
Newton has different kinds of joints to offer to stick bodies together. This demo shows the most simple usage of each joint type (ball-and-socket, hinge, slider corkscrew, universal). This is the first demo (all demos below include that feature too) that also includes the possibility to drag bodies around, which is done by using a special spring force in a special callback.

SDLBuoyancy
Shows how to use Newton's buoyancy features to simulate bodies immersed in a fluid.

SDLVehicle
Let's you drive around a very basic vehicle made by using Newton's vehicle container.

SDLRagDoll
RagDolls should be a known term for 3d coders/gamers. This demo shows how to put a human ragdoll together by using Newton's ragdoll container. You can drop some of them down and also pick them up and throw them around.


Most of the demos are based on the one that are on my newton-page already, but all of them use SDL and are also compileable (tested this already) with FPC (2.0.0). I've also changed physics timing for all demos to a method called "accumulative timeslicing", which gives the same physics-calculations no matter what FPS the demo/game is running at.

As soon as NGD1.35 is released I'll upload those demos. But since that can still be one or two (or even more) weeks away, if anyone of you likes to see an additional demo that I should add to that collection, just tell me.

And one last question : How about licensing when my stuff goes into JEDI-SDL? The demos itself are all using MPL 1.1, but some of them include helper units I wrote which are GPL. Is that a problem, or doesn't it matter?

savage
17-06-2005, 10:22 AM
All those demos sound great. I will need to delete, my poor attempts at creating Newton demos. Are you able to email me a preview version of your demos to me?

JEDI-SDL is MPL and I personally don't have a problem with GPLed stuff, but then I am not a lawyer and don't know anything about the intricasies of mixing the 2 licenses.

M109uk
17-06-2005, 12:54 PM
Would you be able to do one for a simple FPS type, e.g. Sliding collision, Gravity (Going up and down steps, etc), Decals, etc..

I saw a similar demo on the Newtons download page but it uses some other language with most of the functions built in to an extra DLL :s

savage
17-06-2005, 03:18 PM
Mrqzzz submited a GLScene FPS game for the competiion that included phyics by Newton ( IIRC ) Download it from
http://www.plasmacode.com/modules.php?name=Downloads&d_op=viewdownload&cid=7

Sascha Willems
18-06-2005, 03:34 PM
Would you be able to do one for a simple FPS type, e.g. Sliding collision, Gravity (Going up and down steps, etc), Decals, etc..

Better leave the word "simple" out. Such a thing is called a "character-controller" and depending on how you like it to react can be much work. Basicly you create an ellipsoid that represensts your player, give it zero friction and move/rotate it depending on input. But that's just the basics.
I've thought about putting together such a demo, but since it's not the easiest thing to do I dunno when/if I'll create such a thing. And btw. the newton tutorials include a simple character controller demo, written in C.

Sascha Willems
21-06-2005, 05:36 PM
Well, I got finally around finished a started attempt at the character controller implementation using Newton and it now works like a charm and acts the way it should. Like the demos I've sent to savage it uses SDL and I'll upload it soon so you can see how a basic implementation of a character controller is done.

savage
21-06-2005, 06:33 PM
Sounds great Sascha. Look forward to the upload.