SDL-Demos (mostly for developers) - (24. March 2007) |
||||||||||||||||||||||||||||||
|
Filed under: — Sascha Willems @ 19:37
In order to help Delphi and pascal developers getting started with the Newton Game Dynamics Engine I wrote some demos that come with full source code so you can see how different things can be achieved when using Newton. The demos use the Simple Direct Medialayer so that, when using a cross-platform pascal compiler, you can use Newton with all operating systems that are supported by Newton itself (currently Windows, Linux and Mac) . What you need to compile and run them :
|
||||||||||||||||||||||||||||||
|
Posted in | 11 Comments »
|
11 Comments » |



great and solid code! (much better than ode:)
and… easy 2 use!
keep it on sascha!!
Nice work!
).
The second example (Joints demo) produces an acces-violation when I press the left mouse button. Both the shipped .exe and .exe I compiled using Delphi 7 give this error. Newest stable versions of all required .dll’s in use (just started with newton
There seems to be a conflict between the demo and the most recent newton.dll (the one used while writing the demos was an older one) as I also could reproduce this. I’ll see what causes this and update the joints demo.
hey Sascha
did you write these programs in C++ and make it compatable with many compilers? or did you write them in delphi?
I wrote them with Delphi, so they’re pascal. I also tested them with FPC, so they work with the most widely used pascal compilers. No C/C++ involved in there, everything on this page is either written with Delphi or Free Pascal.
ok thanks and good job, all of this stuff is pretty impresive
keep it up
oh and 1 more thing, do you know of any tutorial anywhere that teaches how to do the code in delphi, because im quite fluent in delphi but have no idea what is happening when newtonphysics comes into play. did you teach yourself?
Hi Sascha,
I took a look at the source of your Joints Demo and found the function (procedure in Delphi
) PhysicsApplyPickForce.
Could you please explain how this proc does what it does?
Thank you very much,
Xander
That procedure is nothing special. It applies a (non-limited) spring-force between the attachment point on the body (that’s the point where you grab the body) and the viewer’s position. If you need more information, refer to the newton forum, there are plenty of threads on how to apply spring forces (basically it’s just “Fs = -k*x”).
Hi Sascha,
i tried to compile your “01 – Basic Demo” but it seems to be in the old Newton version.
I now use Linux, and have to use Newton2.0
could you please, update this “demo” so that i can see what is necessary to get things under nweton2.0 done ?
[...] [...]