ec3t
Newton Scholar
Posts: 103
|
Post by ec3t on Apr 2, 2005 17:41:56 GMT 1
upgrade 5.8 final is out it made my prog crash but maybe you will be more lucky !
|
|
Wings
Newton User
Posts: 46
|
Post by Wings on Apr 2, 2005 20:18:59 GMT 1
There was something about needing to recompile with new header files, for 3rd party dll's will the wrapper need this? and any ideas about advanced terrain?
|
|
ec3t
Newton Scholar
Posts: 103
|
Post by ec3t on Apr 5, 2005 3:09:05 GMT 1
the wrapper seems to need to be recompiled imo with new settings regarding terrain yea .... and advanced terrain plus is going out in one week now ... so let's be patient , wing you can try to "synthetize" the bug with a posted snippet and i'm sure kjelle will update it , me i'm gonna try to do that so he can see the bug for himself and try to arrange this.
|
|
|
Post by kjelle69 on Apr 5, 2005 15:19:01 GMT 1
The recompiled headers is not needed for the wrapper. The commands we address through the wrapper all works through a different technology. (Somewhat classified I might add :-) )
|
|
|
Post by zircher on Apr 6, 2005 2:36:31 GMT 1
I'll put my money on alien spores using a shared hivemind. Unfortunately, my virus scanner can not confirm nor deny that theory. -- TAZ
|
|
Wings
Newton User
Posts: 46
|
Post by Wings on Apr 6, 2005 13:11:34 GMT 1
No bugs ec3t!
I've actually avoided U5.8, I want all the addons to work first (which for me is advanced terrian and newton) before I take the risk, and was just woundering if Newton would need to sorted too, but if it doesn't then it's just Ad-Ter I'm waiting for
|
|
ec3t
Newton Scholar
Posts: 103
|
Post by ec3t on Apr 6, 2005 19:27:38 GMT 1
Well here the demo don't compile , explain me how you call that then ?
|
|
|
Post by kjelle69 on Apr 6, 2005 19:36:57 GMT 1
The advanced terrain demo compiles and runs just fine with 5.8 and newton wrapper 1.32. Running stable at 75 Fps I might add There can be a bug in the code, where a path is misspelled, if you get the error , try copy and paste all this code into the demo09: ` Newton DBPro Wrapper v1.30a demo 09 - modified advanced terrain demo!!!! ` this is the example that comes with the adannced terrai pack, modified to ` work with Newton.
` Advanced Terrain System - Example 1
` sky textures from - SkyMatter ` heightmap created by - David Smith ( infiniteloop@optushome.com.au ) ` terrain base texture - generated from Advanced Terrain System Plus ` demo by - TGC
` set up display and camera sync on backdrop on autocam off set camera range 0.5, 30000
` movement g_fSpeed# = 0.05 g_fTurn# = 0.3
` load base and detail texture load image "..\media\advanced terrain\texture.bmp", 1 load image "..\media\advanced terrain\detail.tga", 2
print "Making Terrain....." sync sync
make object terrain 1 ` create the terrain object set terrain heightmap 1, "..\media\advanced terrain\map.bmp" ` set the heightmap set terrain scale 1, 1.2, 0.2, 1.2 ` set the scale set terrain split 1, 16 ` split value by 16 * 16 set terrain tiling 1, 4 ` detail map tiling set terrain light 1, 1, -0.25, 0, 1, 1, 0.78, 0.5 ` light - xdir, ydir, zdir, red, green, blue, intensity set terrain texture 1, 1, 2 ` base and detail texture build terrain 1 ` finally build the terrain
` load our skybox load object "..\media\advanced terrain\skybox2.x", 200 set object light 200, 0 set object texture 200, 3, 1
position object 200, 1000, 2000, 4000 scale object 200, 30000, 30000, 30000
` position the camera position camera 28,15,47
print "Setting Up Newton..." sync sync
` ---------------------------------------------------------------------------------- ` ADDED NEWTON COMMANDS START HERE!!!! ` ---------------------------------------------------------------------------------- NDB_NewtonCreate
NDB_SetVector 0, -50, 0 NDB_SetStandardGravity
`make the TreeCollision from terrain! print "making Newton TreeCollision...." sync col = NDB_NewtonCreateTreeCollision( 1, 1 ) Body = NDB_NewtonCreateBody( col ) ` ---------------------------------------------------------------------------------- ` ----------------------------------------------------------------------------------
` main program loop do ` handle user input and show some stats gosub userInput gosub information
` get the height of the terrain at the current camera position a# = get terrain ground height( 1, camera position x( ), camera position z( ) )
` now position the camera slightly above the terrain NOTE I RASIED THE HIEGHT OVER THE TERRAIN FOR THIS DEMO position camera camera position x( ), a# + 10, camera position z()
` let the terrain handle some internal work update terrain
` final screen update if controlkey() then NDB_DebugDrawNewtonLines
`NEWTON UPDATE COMMAND!!!!! NDB_NewtonUpdate
sync loop
userInput: ` simple mouse and keyboard movement
` move around with arrow keys control camera using arrowkeys 0, g_fSpeed#, g_fTurn#
` store old camera angle OldCamAngleY# = CameraAngleY# OldCamAngleX# = CameraAngleX#
` store new camera angle CameraAngleY# = wrapvalue ( CameraAngleY# + mousemovex ( ) * 0.4 ) CameraAngleX# = wrapvalue ( CameraAngleX# + mousemovey ( ) * 0.4 )
` rotate camera yrotate camera curveangle ( CameraAngleY#, OldCamAngleY#, 24 ) xrotate camera curveangle ( CameraAngleX#, OldCamAngleX#, 24 )
` speed up movement if inkey$ ( ) = "+" if g_fSpeed# < 1000 g_fSpeed# = g_fSpeed# + 0.01 endif endif
` slow down movement if inkey$ ( ) = "-" if g_fSpeed# > 0.002 g_fSpeed# = g_fSpeed# - 0.001 endif endif
`----------------------------------------------------------------------------- ` ADDED NEWTON COMMANDS HERE `----------------------------------------------------------------------------- `let's see if they clicked for us! if mouseclick() = 1 and M_CLICK = 0 M_CLICK = 1 `left mouse button clicked, so let's create a tennis ball, and throw it! `camera is always at (0,0,-100), we'll create it just below the camera. NewBall = MakeSphere( camera position x(), camera position y(), camera position z(), 2.0, 10.0 )
`now we need to set an initial velocity for the body, as if we've thrown it. `we want to throw in the direction we are looking, so we'll use the camera to get `a simple vector in our look direction, and multiply that by the throw power.
x1# = camera position x() : y1# = camera position y() : z1# = camera position z() move camera 1.0 x2# = camera position x() : y2# = camera position y() : z2# = camera position z() move camera -1.0
unit_x# = x2# - x1# unit_y# = y2# - y1# unit_z# = z2# - z1#
`now, to get the initial velocity, we multiply by the throw power! vel_x# = unit_x# * 100.0 vel_y# = unit_y# * 100.0 vel_z# = unit_z# * 100.0
NDB_SetVector vel_x#, vel_y#, vel_z# NDB_NewtonBodySetVelocity NewBall
endif
if mouseclick()=0 then M_CLICK = 0 `----------------------------------------------------------------------------- `----------------------------------------------------------------------------- `-----------------------------------------------------------------------------
return
information: ` show some information
` start printing at top of screen set cursor 0, 0
` show frame rate print "fps = " + str$ ( screen fps ( ) ) print ""
` current camera position print "" print "x = " + str$ ( camera position x ( ) ) print "y = " + str$ ( camera position y ( ) ) print "z = " + str$ ( camera position z ( ) ) print ""
` finally the polygon count print "polygon count = " + str$ ( statistic ( 1 ) ) print ""
print "CLICK MOUSE TO THROW SPHERES!!!" return
`This function makes a rigid body with a sphere shape. the code is almost identical to the BOX function, except that `it creates a sphere collision, and sphere primitive shape instead of a box. everythins else is identical. function MakeSphere(x#,y#,z#,s#,mass#)
Col = NDB_NewtonCreateSphere( s# ) Body = NDB_NewtonCreateBody(Col)
`Set initial position and rotation NDB_BuildMatrix 0.0, 0.0, 0.0, x#, y#, z# NDB_NewtonBodySetMatrix Body `notice that I calculate the MI (moment of inertia) for a sphere shape this time. NDB_CalculateMISphereSolid mass#, s# NDB_NewtonBodySetMassMatrix Body, mass#
NDB_NewtonReleaseCollision Col
obj = FreeObject() load object "..\media\sphere.x", obj color object obj, GetColor() set object ambience obj, 50 scale object obj, s#*100.0, s#*100.0, s#*100.0 position object obj, x#, y#, z#
NDB_BodySetDBProData Body, obj NDB_NewtonBodySetDestructorCallback Body
NDB_BodySetGravity Body, 1
endfunction Body
function FreeObject() repeat inc i if object exist(i)=0 then found=1 until found endfunction i
function GetColor() repeat r = rnd(1)*255 g = rnd(1)*255 b = rnd(1)*255 until r<>0 or g<>0 or b<> 0 color = rgb(r,g,b) endfunction color
function NeverCalled() if memblock exist(1) then delete memblock 1 endfunction
|
|
ec3t
Newton Scholar
Posts: 103
|
Post by ec3t on Apr 6, 2005 21:26:47 GMT 1
here is the dbpro answer :
[COMMON] PathToEXE=C:\Renaissance\Dlls et Plugins\Newton\NDBv_132\NDBv_132 Release\demos\demo09 - advanced terrain\CrashOn_04_06_05.txt [CEXE] m_dwRuntimeErrorDWORD=Internal Code:0 m_dwRuntimeErrorLineDWORD=38
i'm sorry to be telling you some of your work isn't working here , but that's true , i hope you will take what i say in consideration , considering also if i have this problem , some end user will also get it , and that this would help not only all coders using newton , but also all users
got winXp , dpbro 5.8 (working) , 2gb ram , oc 3200+ Barton
|
|
|
Post by kjelle69 on Apr 7, 2005 17:04:20 GMT 1
That means that it is one of those lines making the error:
set terrain texture 1, 1, 2 build terrain 1
Is that happening when you try with the code which is pasted in the message above ?
|
|
ec3t
Newton Scholar
Posts: 103
|
Post by ec3t on Apr 7, 2005 23:18:06 GMT 1
yes it is ... i really dunno what could cause that , i'm quite convinced it's not coming from me , i'm do believe it's more like ... some conflicts , hardware conflicts , cause my installation went ok , i already have the lastest updates patch etc ... wich works ! (compiled all the demos) , so i do believe something with the instructions makes the cpu or ram or vid card or something fizzle ... now i dunno what this is and ask for help !!
kjelle , when terrain plus is out , would you make it so we can have the new version working along with newton ? Mike told me he would send me the beta , and also that i had the right to give you a version of it ... would you accept ?
|
|