Using Newton

Posted By: Ingmar

Using Newton - 05/18/07 19:08

Hi,

I downloaded Newton from a link that someone on the forum had given me, but could someone tell me how to use this physics program in my game level? I studied some example levels in the Newton folder, but I didn't get much wiser..

Regards,
Ingmar
Posted By: RedPhoenix

Re: Using Newton - 05/19/07 09:15

Did you read the documentation for Newton (in the doc folder of the newtonexamples)?

And which version of Newton do you have (look on the splasscreen)?

By the way: I remember about 4 threads that dealt with implementing Newton in the past 8 weeks.
Posted By: Ingmar

Re: Using Newton - 05/19/07 09:56

Quote:

Did you read the documentation for Newton (in the doc folder of the newtonexamples)?

And which version of Newton do you have (look on the splasscreen)?

By the way: I remember about 4 threads that dealt with implementing Newton in the past 8 weeks.




I read the documentation, but it didn't work after:
"Copy the files "newton.dll" and "newtonsplash.tga" from Gamestudio\template folder to the level folder."

It's version 1.0? That's what the splashscreen says..
Posted By: RedPhoenix

Re: Using Newton - 05/19/07 16:59

Ok let's see: (By the way: Which version of 3DGS do yozu have?)

1: You have a project folder. To this folder you copy the newton.wdl, the newtonscript2.wdl, and the newtonsplash.tga.

2: Search in your 3DGS directory. there is a folder named acknex_plugins. If it's not there you don't have the latest version of 3DGS but that's no problem, just tell me then.
To this one (if you have it) you copy the newton.dll

3: If you already have a level open the mainscript of it. If not create a new one and create a basis script for it.

4: Over your mainfunction you put in those lines:
include <newton.wdl>;
include <newtonscript2.wdl>;

string level_str = <levelname.wmb>; //don't write it twice if it's already in your script!!!

ifdef USE_NEWTON_GAME_DYNAMICS;
string newtonLevel_cls = <levelname.CLS>; //same name as levelstr
endif;

5: Your main function should look like this in the beginning:
function main()
{
wait(3);
level_load(level_str);
ifdef USE_NEWTON_GAME_DYNAMICS;
wait(1);
dll_handle = newtonHandle;
temp = NewtonAddMap (level_str, splashscreen);
endif;
sleep(1);
splashscreen.visible = off;
//...
}

6: Now Newton is initialised right and you can create Newtonobjects by giving them the function Newtonwoodentity and setting their Skill1 to a mass parameter. Just follow the manual for more complex stuff.
Posted By: Ingmar

Re: Using Newton - 05/19/07 18:05

Thank you! I'll try it!
Posted By: Hawk

Re: Using Newton - 10/13/07 15:54

hi, i have also some problems using newton, because there are no actions to assign an entity in wed. the newton.dll is located in the acknex_plugins folder and newton.wdl and newtonScript2.wdl are in the project folder. i am using newton 1.0

this is my script:
Code:

var video_mode = 8; // screen size 1024x768
var video_depth = 32; // 32 bit colour D3D mode
var video_screen = 2; // Fenster
var mouse_mode = 1; // Mauszeiger sichtbar und mouse_force reagiert auf Mausbewegungen

include<newton.wdl>;
include<newtonScript2.wdl>;

// Strings
string str_level1=<Billard.wmb>; //Levelstring

ifdef USE_NEWTON_GAME_DYNAMICS;
string newtonLevel_cls = <Billard.CLS>;
endif;

string str_ball = <newton_ball.mdl>; //Testkugel

entity* kugel1;

function kugel1_move();
function main()
{
level_load(str_level1); // Lade 1 Level
ifdef USE_NEWTON_GAME_DYNAMICS;
wait(1);
dll_handle = newtonHandle;
NewtonAddMap (str_level1, "newtonsplash.tga");
endif;
wait(-1);
}



what did i have left out?
Posted By: MASH

Re: Using Newton - 11/26/07 06:25

Here is a little level that I used to setup Newton in Commercial A6.60. Used the DLL and Base code from the A6.5 Newton Demo I downloaded from here on the forum, I think it was from Ventilator? You are welcome to check it out and see if it works on you system. I am still playing with it and have not done anything except get it to work and load some physics objects. Unzip the file to your GStudio6/work folder and open newton2 in WED. Good luck and hope it helps. If not, try to search on the forums for the A6.5 Newton Demo.

A6_Newton Level

My bad, it was xXxGuitar511 who uploaded the newton65pp1

Ventilator gave us the Newton with LiteC contribution.
© 2024 lite-C Forums