Integrate Newton Physics

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Integrate Newton Physics

Postby bluekeezz » Sat Dec 06, 2008 4:24 am

Hi I'm creating a game similar to UNO STACKO. I've prepared all my objects (UNO blocks) and skybox. My problem is how can I use Newton to give all my objects their own mass and collision? Or do I have to use Newton to create new objects with their mass? If my question if possible, can u please provide a simple code for it. I'm new to physics for programming btw. Tnx! :)



Apps I'm using
------------------------
VC++ 2008 Express
Dark GDK
DirectX SDK Aug2007
bluekeezz
 
Posts: 2
Joined: Sat Dec 06, 2008 4:02 am

Re: Integrate Newton Physics

Postby JernejL » Sat Dec 06, 2008 7:28 am

Have you checked how the code for newton demos works? you have to create a newton body, which is a physical model representation for each of your game bodies / models that you want to have physical simulation applies to.
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1578
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: Integrate Newton Physics

Postby bluekeezz » Tue Dec 09, 2008 3:11 am

The problem is i cant get newton sdk to integrate into my code. I'm trying to run the sample (Getting started), but an error appear. My compiler is looking for GLAUX.lib file. By the way Im using Vista Home Premium. Here's the OUTPUT BUILD i got.

Code: Select all

1>------ Build started: Project: Tutorial_01_GettingStarted, Configuration: Debug Win32 ------
1>Compiling...
1>dBaseHierarchy.cpp
1>dChunkParsel.cpp
1>dCRC.cpp
1>dGeometry.cpp
1>dMatrix.cpp
1>dQuaternion.cpp
1>dSceneNode.cpp
1>dTree.cpp
1>HiResTimer.cpp
1>OpenGlUtil.cpp
1>RenderPrimitive.cpp
1>tutorial.cpp
1>Generating Code...
1>Compiling manifest to resources...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1
1>Copyright (C) Microsoft Corporation.  All rights reserved.
1>Linking...
1>LINK : fatal error LNK1104: cannot open file 'GLAUX.LIB'
1>Creating browse information file...
1>Microsoft Browse Information Maintenance Utility Version 9.00.30729
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>Build log was saved at "file://C:\Program Files\NewtonSDK\samples\tutorial_01_GettingStarted\Debug\BuildLog.htm"
1>Tutorial_01_GettingStarted - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========



here are the LINKS I've done so you can check if I got it wrong.

include files
-----------------------------------
c:\program files\NewtonSDK\sdk
c:\program files\NewtonSDK\samples\toolbox
c:\program files\NewtonSDK\samples\common


library files
--------------------------------------
c:\program files\NewtonSDK\sdk\dll
bluekeezz
 
Posts: 2
Joined: Sat Dec 06, 2008 4:02 am

Re: Integrate Newton Physics

Postby Julio Jerez » Tue Dec 09, 2008 10:52 am

send me a pm the new sdk do not uses the GLAUX library
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Integrate Newton Physics

Postby sharp911 » Sun Jan 11, 2009 10:43 am

That is interesting, because the samples that come with the new SDK use the GLAUX.LIB. I just tried to compile the first sample in the new SDK and it gives me the same error. Have the samples not been updated in the new SDK?
sharp911
 
Posts: 5
Joined: Thu Jun 26, 2008 11:00 pm

Re: Integrate Newton Physics

Postby JernejL » Sun Jan 11, 2009 12:10 pm

sharp911 wrote:That is interesting, because the samples that come with the new SDK use the GLAUX.LIB. I just tried to compile the first sample in the new SDK and it gives me the same error. Have the samples not been updated in the new SDK?


Have you downloaded the "new" SDK from website or from the link that julio sent you?
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1578
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: Integrate Newton Physics

Postby sharp911 » Sun Jan 11, 2009 1:16 pm

I downloaded the SDK yesterday, and julio hasnt sent me anything. Im not the original poster. Just have the same issue :)
sharp911
 
Posts: 5
Joined: Thu Jun 26, 2008 11:00 pm

Re: Integrate Newton Physics

Postby JernejL » Sun Jan 11, 2009 1:59 pm

Oh, my mistake, the SDK on website still imports glaux lib, but it doesn't use it, you can remove reference to glaux.lib. newton 2.0 sdk no longer has that reference, it's an error.
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1578
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: Integrate Newton Physics

Postby sharp911 » Sun Jan 11, 2009 6:42 pm

Ok, Ive tried to look for the reference to the glaux library and I cant find it. Or is it possible to get the updated files anywhere?

Needless to say that Im new to Newton. Ive done programming before, and have tried Newton but never got it to compile property, and usually given up before trying to get help. But now Im trying to get it to work.

First off, I just want it to compile the samples properly, before I go back to my project.
sharp911
 
Posts: 5
Joined: Thu Jun 26, 2008 11:00 pm

Re: Integrate Newton Physics

Postby Julio Jerez » Sun Jan 11, 2009 10:51 pm

it is an option in the link properties.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Integrate Newton Physics

Postby sharp911 » Mon Jan 12, 2009 12:19 am

Thanks, I got the glaux library off the link list, and I can compile all the samples except the Simple Vehicle sample. Not sure if this is related or not. Here is the error:

Code: Select all
'Tutorial_09_SimpleVehicle.exe': Loaded 'C:\Program Files\NewtonSDK\samples\bin\Tutorial_09_SimpleVehicle.exe', Symbols loaded.
'Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll'
'Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll'
'Tutorial_09_SimpleVehicle.exe': Loaded 'C:\Program Files\NewtonSDK\samples\bin\Newton.dll', Binary was not built with debug information.
'Tutorial_09_SimpleVehicle.exe': Loaded 'C:\Program Files\NewtonSDK\samples\bin\Glut32.dll', Binary was not built with debug information.
'Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\user32.dll'
'Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll'
'Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\winmm.dll'
'Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll'
'Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll'
'Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\secur32.dll'
'Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\glu32.dll'
'Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll'
'Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\opengl32.dll'
'Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\ddraw.dll'
'Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\dciman32.dll'
'Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\imm32.dll'
'Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\uxtheme.dll'
'Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\msctf.dll'
'Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\version.dll'
'Tutorial_09_SimpleVehicle.exe': Unloaded 'C:\WINDOWS\system32\version.dll'
'Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\msctfime.ime'
'Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\ole32.dll'
'Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\atioglxx.dll'
'Tutorial_09_SimpleVehicle.exe': Loaded 'C:\WINDOWS\system32\mcd32.dll'
'Tutorial_09_SimpleVehicle.exe': Unloaded 'C:\WINDOWS\system32\mcd32.dll'
The program '[1452] Tutorial_09_SimpleVehicle.exe: Native' has exited with code 3 (0x3).
sharp911
 
Posts: 5
Joined: Thu Jun 26, 2008 11:00 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 11 guests