OdeMax

BlitzMax Forums/BlitzMax Programming/OdeMax

OdeMax
ODE (www.ode.org) for Max (www.blitzmax.com)

This version is a very early version, intended to help hobbist coders get the full potential of BlitzMax.

There are a number of known bugs, however it already has enough functionality to be useful for people to use as a base to build on.

It is hoped that the blitz community will help develop this further as a public project

NB this code is in the public domain except any of the ode library which has not been modified

http://www.traklink.com/component/option,com_docman/task,view_category/Itemid,26/subcat,8/catid,69/limitstart,0/limit,5/

Very nice! Thanks!

(A word of advice...turn off debugging and don't run it in windowed mode)

please dont view this as a finnished anything, there
is the bare minimum of user interface.

Its just to get started coding with...

Here's a tweaked version of the included example:
Strict

Import ".\libode.a" 
Import ".\libodemax.a"

Incbin "wcrate.jpg"
Incbin "ground.bmp"
 
Global ScreenWidth:Float	= 800
Global ScreenHeight:Float	= 600
Global ScreenDepth:Int		= 32
Global FullScreen:Int		= 1

Global Texname,texname2

Global lastspace
Global light:Int=True									' Lighting ON/OFF
Global blend:Int									' Blending ON/OFF
Global xrot:Float									' X Rotation
Global yrot:Float									' Y Rotation
Global lookupdown:Float=0.0
Global heading:Float=0.0
Global xpos:Float=0.0
Global zpos:Float=0.0

Global LightAmbient:Float[]=[0.8, 0.8, 0.8, 1.0]		' Ambient Light
Global LightDiffuse:Float[]=[1.0, 1.0, 1.0, 1.0]		' Diffuse Light
Global LightPosition:Float[]=[0.0, 2.0, 1.0, 1.0]	' Light Position

Global FPS,lfc,fc   ' frame counter since app start
Global s:String=""

Global OdeEntList:tList = CreateList()

Global selectbuffer:Int[512],hits
Global SelectedName,lastselected:odeent
Global viewport:Int[4]

Global world,space,plane,boxbody,boxgeom,mass:Int[1024],boxsize:Float=0.1
Global lms:Int=MilliSecs()

Const MaxOdeEnts=50

include "ode-defs.bmx"

'
' Setup display
Local ScreenFlags = BGL_BACKBUFFER | BGL_DEPTHBUFFER
If FullScreen
	ScreenFlags = ScreenFlags | BGL_FULLSCREEN
EndIf
bglCreateContext(ScreenWidth,ScreenHeight,ScreenDepth,0,ScreenFlags)
bglSetSwapInterval(1)

InitGl()

'
' Create ODE world
world=dworldcreate()
dWorldSetGravity (world, 0,-9.81,0)
space = dHashSpaceCreate (0);
plane=dCreatePlane (space,0,1,0,0);

'
' Create ODE boxes
For Local i:Float=1 To MaxOdeEnts/2	
	OdeEnt.createBox(world,space,i, 0.1,(i Mod 4-2)/4, (i / 4), -1)
Next
For Local i:Float=1 To MaxOdeEnts/2			' 2 loops name param must be created sequentially
	OdeEnt.createBox(world,space,i+MaxOdeEnts/2, 0.1,(i Mod 4-2.5)/4, (i / 4), -1.25)
Next

OMinitcontacts(world)


While Not KeyHit( KEY_ESCAPE )
	
	'
	' Update ODE
	omEmptyContactGroup()
	dSpaceCollide (space,Null, Byte Ptr omnearCallback);
	dWorldStep (world,0.01)
	
	'
	' Render and stuff
	glEnable(GL_TEXTURE_2D)
	DisplayLoop()
	glDisable(GL_TEXTURE_2D)
	glColor3f 1.0,1.0,1.0
	
	Local y=0

	If MilliSecs()>lms+1000 Then
		lms=MilliSecs()
		FPS=(fc-lfc)
		lfc=fc
	EndIf
	s = "#FPS: "+FPS
	s:+"##Use mouse to look around"
	s:+"#WASD/Arrow Keys to move"
	s:+"#Left click to select#"
	If lastselected
		s:+"#Selection: "+lastselected.name+"#"
	EndIf
	
	Local f=Instr(s,"#",1)
	Repeat 
		Local l:String= Left(s,f-1)
		s= Right(s,Len(s)-f)
		bglDrawText(l,10,y)
		y:+12
		f=Instr(s,"#",1)
	Until f=0
		
	FlushMem
	bglSwapBuffers
	fc:+1
Wend
End

'
' transfers the objects matrix into opengl ready to render
Function SetTransformMat(geom:Int)

	Local R:Float Ptr
	Local pos:Float Ptr 
	Local matrix:Float[16];

	pos =Float Ptr  dGeomGetPosition (geom);
	R = Float Ptr dGeomGetRotation (geom);

	matrix[0]=R[0];		matrix[1]=R[4];		matrix[2]=R[8];		matrix[3]=0;
	matrix[4]=R[1];		matrix[5]=R[5];		matrix[6]=R[9];		matrix[7]=0;
	matrix[8]=R[2];		matrix[9]=R[6];		matrix[10]=R[10];		matrix[11]=0;

	matrix[12]=pos[0];	matrix[13]=pos[1];	matrix[14]=pos[2];	matrix[15]=1;

	glMultMatrixf (matrix);

EndFunction

Function InitGl()
'''''' initial setup of gl
	Local tex:TPixmap=LoadPixmap("incbin::wcrate.jpg")
	texname=bglTexFromPixmap(tex)
	texname2=bglTexFromPixmap(LoadPixmap("incbin::ground.bmp"))

	glBindTexture GL_TEXTURE_2D, Texname2
	glTexParameteri GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR
	glTexParameteri GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_NEAREST

	glBindTexture GL_TEXTURE_2D, Texname
	glTexParameteri GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR
	glTexParameteri GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_NEAREST

	glEnable GL_TEXTURE_2D
	glBlendFunc GL_SRC_ALPHA, GL_ONE
	glClearColor(0.4, 0.4, 0.4, 0.0)
	glClearDepth 1.0
	glDepthFunc GL_LESS
	glEnable GL_DEPTH_TEST
	glShadeModel(GL_SMOOTH)
	
	glViewport(0,0,ScreenWidth,ScreenHeight)
	glMatrixMode(GL_PROJECTION)
	glLoadIdentity()
	gluPerspective(45.0,Float(ScreenWidth)/Float(ScreenHeight),0.1,100.0)
	glMatrixMode(GL_MODELVIEW)
	
	glLightfv GL_LIGHT0, GL_AMBIENT, Float Ptr LightAmbient
	glLightfv GL_LIGHT0, GL_DIFFUSE, Float Ptr LightDiffuse
	glLightfv GL_LIGHT0, GL_POSITION, Float Ptr LightPosition
	glEnable GL_LIGHT0
End Function

Function DisplayLoop()

	Local x_m:Float; Local y_m:Float; Local z_m:Float; Local u_m:Float ; Local v_m:Float
	Local xtrans:Float; Local ztrans:Float; Local ytrans:Float
	Local sceneroty:Float
	Local loop_m:Int

	'
	' Blend mode
	If KeyHit(KEY_B)
		blend = Not blend
	EndIf
	If blend = 0 Then
		glDisable GL_BLEND
		glEnable GL_DEPTH_TEST
	Else
		glEnable GL_BLEND
		glDisable GL_DEPTH_TEST
	End If
	
	'
	' Lighting
	If KeyHit(KEY_L) 
		light = Not light
	EndIf
	If light=0
		glDisable(GL_LIGHTING)
	Else
		glEnable(GL_LIGHTING)
	EndIf
 
 	'
 	' Movement
	If KeyDown(KEY_UP) Or KeyDown(KEY_W)
		xpos = xpos - Float(Sin(heading)) * 0.01
		zpos = zpos - Float(Cos(heading)) * 0.01
	End If
	If KeyDown(KEY_DOWN) Or KeyDown(KEY_S)
		xpos = xpos + Float(Sin(heading)) * 0.01
		zpos = zpos + Float(Cos(heading)) * 0.01
	End If
	If KeyDown(KEY_LEFT) Or KeyDown(KEY_A)
		xpos = xpos - Float(Sin(heading+90)) * 0.01
		zpos = zpos - Float(Cos(heading+90)) * 0.01
	EndIf
	If KeyDown(KEY_RIGHT) Or KeyDown(KEY_D)
		xpos = xpos + Float(Sin(heading+90)) * 0.01
		zpos = zpos + Float(Cos(heading+90)) * 0.01
	EndIf
	
	yrot = heading
		
	xtrans=-xpos
	ztrans=-zpos
	ytrans= - 0.5
	sceneroty = 360.0 - yrot
	glClear GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT

	lookupdown=lookupdown+(MouseY()-(ScreenHeight/2.0))/8
	heading=heading-(MouseX()-(Screenwidth/2.0))/8
	MoveMouse screenwidth/2,screenheight/2


	'
	' ---- Picking ----
	'
	glSelectBuffer(512,Varptr selectBuffer[0]);

	glRenderMode(GL_SELECT)	
	glInitNames();	
	glGetIntegerv(GL_VIEWPORT, viewport);

	glMatrixMode(GL_PROJECTION);			
	glPushMatrix();						
	glLoadIdentity();
	gluPickMatrix(ScreenWidth/2.0, ScreenHeight/2.0, 1, 1, viewport);

	gluPerspective(45.0,Float(ScreenWidth)/Float(ScreenHeight),0.1,100.0)
	glMatrixMode(GL_MODELVIEW);

	glLoadIdentity
	glRotatef lookupdown, 1.0, 0, 0
	glRotatef sceneroty, 0, 1.0, 0
	glTranslatef xtrans, ytrans, ztrans

	glBindTexture GL_TEXTURE_2D, Texname2

	Local i=1
	For Local e:odeent=EachIn OdeEntlist
		glPushName(i)
		i:+1
		glPushMatrix()
		SetTransformMat(e.geom)
		drawbox([e.size,e.size,e.size])	
		glPopName()
		glPopMatrix()
	Next
	
	glFlush();			
	hits=glRenderMode(GL_RENDER);

	glMatrixMode(GL_PROJECTION);			
	glPopMatrix();								
	glMatrixMode(GL_MODELVIEW);	
	glColor4f 1.0,1.0,1.0,1.0

	If hits>0 Then processhits(hits,Varptr selectBuffer[0])
	'
	' ---- End of picking ----
	'


	'
	' Render code
	glLoadIdentity
	glRotatef lookupdown, 1.0, 0, 0
	glRotatef sceneroty, 0, 1.0, 0
	glTranslatef xtrans, ytrans, ztrans
	glBindTexture GL_TEXTURE_2D, Texname2

	glColor4f 1.0,1.0,1.0,1.0

	'
	' ground - not rendered in pick selection render
	glDisable(GL_LIGHTING)
	glBegin(GL_QUADS)
	glNormal3f( 0.0, -1.0, 0.0)';// Normal Pointing Up
	glTexCoord2f(0.0, 0.0); glVertex3f(-10,  0, -10)';// Point 1 (Top)
	glTexCoord2f(0.0, 10); glVertex3f(-10,  0,  10)';// Point 2 (Top)
	glTexCoord2f(10, 10); glVertex3f( 10,  0,  10)';// Point 3 (Top)
	glTexCoord2f(10, 0.0); glVertex3f( 10,  0, -10)';// Point 4 (Top)
	glEnd()
	glEnable(GL_LIGHTING)

	glBindTexture GL_TEXTURE_2D, Texname

	'
	' boxes
	Local se:odeent
	glBindTexture GL_TEXTURE_2D, Texname
	For Local e:odeent=EachIn OdeEntlist

		glPushMatrix()
		SetTransformMat(e.geom)
		If selectedname=e.name Then 
			glDisable(GL_LIGHTING)
			glColor4f 1.0,0.0,0.0,1.0 
			se=e
		ElseIf e.state
			glDisable(GL_LIGHTING)
			glColor4f 0.0,1.0,0.0,1.0
		Else
			glColor4f 1.0,1.0,1.0,1.0
		EndIf

		drawbox([e.size,e.size,e.size])	

		If selectedname=e.name Or e.state=True Then 
			glEnable(GL_LIGHTING)
		EndIf

		glPopMatrix()
	Next
	
	'
	' Change selection
	If MouseHit(1) And lastspace Then 
		If lastselected
			lastselected.state=False
		EndIf
		If se
			se.state=Not se.state
			lastselected=se
			lastspace=False
			Local fx:Float = Sin(heading)* -1000.0
			Local fy:Float = 0.0
			Local fz:Float = Cos(heading)* -1000.0
			dbodyaddforce(se.body,fx,fy,fz)
		EndIf
	EndIf
	If Not MouseHit(1) Then lastspace=True
	selectedname=0

End Function

Function DrawBox(sides:Float[])
	
	Local lx:Float = sides[0]*0.5;
	Local ly:Float = sides[1]*0.5;
	Local lz:Float = sides[2]*0.5;

	glBegin(GL_QUADS);
		
		' Front Face
		glNormal3f( 0.0, 0.0, 1.0) ' Normal Pointing Towards Viewer
		glTexCoord2f(0.0, 0.0); glVertex3f(-lx, -ly,  lz) ' Point 1 (Front)
		glTexCoord2f(1.0, 0.0); glVertex3f( lx, -ly,  lz) ' Point 2 (Front)
		glTexCoord2f(1.0, 1.0); glVertex3f( lx,  ly,  lz) ' Point 3 (Front)
		glTexCoord2f(0.0, 1.0); glVertex3f(-lx,  ly,  lz) ' Point 4 (Front)
 		
 		' Back Face
		glNormal3f( 0.0, 0.0,-1.0) ' Normal Pointing Away From Viewer
		glTexCoord2f(1.0, 0.0); glVertex3f(-lx, -ly, -lz) ' Point 1 (Back)
		glTexCoord2f(1.0, 1.0); glVertex3f(-lx,  ly, -lz) ' Point 2 (Back)
		glTexCoord2f(0.0, 1.0); glVertex3f( lx,  ly, -lz) ' Point 3 (Back)
		glTexCoord2f(0.0, 0.0); glVertex3f( lx, -ly, -lz) ' Point 4 (Back)
		
		' Top Face
		glNormal3f( 0.0, 1.0, 0.0) ' Normal Pointing Up
		glTexCoord2f(0.0, 1.0); glVertex3f(-lx,  ly, -lz) ' Point 1 (Top)
		glTexCoord2f(0.0, 0.0); glVertex3f(-lx,  ly,  lz) ' Point 2 (Top)
		glTexCoord2f(1.0, 0.0); glVertex3f( lx,  ly,  lz) ' Point 3 (Top)
		glTexCoord2f(1.0, 1.0); glVertex3f( lx,  ly, -lz) ' Point 4 (Top)
		
		' Bottom Face
		glNormal3f( 0.0,-1.0, 0.0) ' Normal Pointing Down
		glTexCoord2f(1.0, 1.0); glVertex3f(-lx, -ly, -lz) ' Point 1 (Bottom)
		glTexCoord2f(0.0, 1.0); glVertex3f( lx, -ly, -lz) ' Point 2 (Bottom)
		glTexCoord2f(0.0, 0.0); glVertex3f( lx, -ly,  lz) ' Point 3 (Bottom)
		glTexCoord2f(1.0, 0.0); glVertex3f(-lx, -ly,  lz) ' Point 4 (Bottom)
		
		' Right face
		glNormal3f( 1.0, 0.0, 0.0) ' Normal Pointing Right
		glTexCoord2f(1.0, 0.0); glVertex3f( lx, -ly, -lz) ' Point 1 (Right)
		glTexCoord2f(1.0, 1.0); glVertex3f( lx,  ly, -lz) ' Point 2 (Right)
		glTexCoord2f(0.0, 1.0); glVertex3f( lx,  ly,  lz) ' Point 3 (Right)
		glTexCoord2f(0.0, 0.0); glVertex3f( lx, -ly,  lz) ' Point 4 (Right)
		
		' Left Face
		glNormal3f(-1.0, 0.0, 0.0) ' Normal Pointing Left
		glTexCoord2f(0.0, 0.0); glVertex3f(-lx, -ly, -lz) ' Point 1 (Left)
		glTexCoord2f(1.0, 0.0); glVertex3f(-lx, -ly,  lz) ' Point 2 (Left)
		glTexCoord2f(1.0, 1.0); glVertex3f(-lx,  ly,  lz) ' Point 3 (Left)
		glTexCoord2f(0.0, 1.0); glVertex3f(-lx,  ly, -lz) ' Point 4 (Left)
	glEnd() ' Done Drawing Quads
	
EndFunction

Function processhits:String(hits:Int,sb:Int Ptr)

	Local low:Float
	Local ply:Int=Var (sb+3)

	low=Var (sb+1)

	For Local x=0 To hits-1
		Local p=Var sb
		sb:+1
		Local d1:Float=Var sb
		sb:+1
		Local d2:Float=Var sb
		sb:+1
		If ((d1+d2)/2) < low Then 
			low=((d1+d2)/2)
			ply=Var sb
		End If
		For Local n=1 To p
			sb:+1
		Next
	Next

	selectedname=ply
	
End Function
It should work in debug mode now :) and clicking on a box will push it away from the camera.

Still, you should not run it in windowed mode, unless you use this fix: http://www.blitzbasic.com/Community/posts.php?topic=43206 or the view will be twirling like mad.

Hey Chris! I get the same thing that I got when I tried your GLui test too:

Building frame2
Compiling:frame2.bmx
flat assembler version 1.51
4 passes, 251215 bytes.
Linking:frame2.exe
C:\BlitzMax\bin\ld: cannot find
Build Error: Failed to link C:/Documents and Settings/mario/Desktop/odemax/frame2.exe
Process complete

I tried in Debug build and plain old regular mode too. Can anyone think of just what I'm doing wrong? I'm extracting the .zip to a folder, plain and simple. Nothing fancy..... ? AAAAAAAAAAAAAAAAAAAAAHH!

does it happen with quick build off?

I have the same problem. Happens with Quick Build on or off. :/

Any idea how to convert quat to blitz3d euler lads?
there's a some bugs we're trying to fix in the blitz3d jedive ode thread in blitz3d userlibs section.

void dQtoR (const dQuaternion q, dMatrix3 R);

ode matrix is laid out differently to opengl
matrix's but if you display the matrix and move
around you should be able to see which is which.

@Booticus any spaces in that path.... ehem....
;p

Chris - works fine without spaces.

Wha? Spaces? Where? Im unzipping your project to a folder on my desktop. "C:\Documents and Settings\mario\Desktop\odemax".... poop!

how many spaces between the words documents and settings ??


is *ANYONE* interested in helping with this as a community
project, you dont necessarily have to have coding skills

My ode test app now has the following features

* world loading and saving
* entity placement scaling etc
* turn objects into fast static entities
* multiple camera views
* changed way collision reaction works
* added extra global functions to change a few things specific to odemax
* added some stability (as in physics!) changes in ode (described on ode wikki)

Planned

* shaders (didnt realise they were *that* straight forward!)
* implement 3d gui (i'm up to 20 keys already!)
* improved saving and loading, with loading of object
mesh's and textures
* avoidance of bloatie graphics effects
* object path following


* long term goal, experiment with embeding jvm for web
rendering and user interface tasks

what are the stability changes on the wiki you refer to?

Chris - I'm willing to help out, time and skills permitting.

Something that bothers me is that maybe the planned features should be seperate modules from each other: physics, shaders, 3D engine, etc. Just a thought.

SONOFAGUN! I threw your project(s) in the root dir of my hard drive and it worked! So to run your projects I need to throw the folder into a directory that has no spaces! Who'da thunk? I haven't run into this problem anywhere else. Wierd! I'll tinker with the directory dealie and see why that is. Guess its a windoze thing with the spaces, etc.

Hi Boot,

well, I thought it was a well known thing.

Right now, BlitzMAX hates spaces in folder and file names,
turns green, gets huge, and smashes and bashes anything around it.

@flying have a good poke round the wiki site and the docs! theres easy to mod things in the source, also run doxygen
on the source...
specifically i want to add a slight amount of ground friction and generally get a good set of setting, suitable for fast graphics with realistic results.
I've not been working on it long, but already i've found it to behave a lot better than some of the C examples!!

@fredborg nice to see someones played with it *and* given somthing back, cheers m8!

@beaker If enough people show willing maybe a sourceforge project? btw sorted those small mem leaks on save/load world

I heartly agree with a modular approch, (without interdependance) and a "core" module.

Things like shaders are not that big a deal I've researched them and scouce kindly sent me his shader example, it looks like a few hours work to shoe horn in...

You could argue that with physics and reasonable graphics you have 90% of an engine

Maybe "pluggable" effects, how you'd implement that tho...

@booticus its been a common long known problem... honest!
but its amazing how many times you can look at a file path or piece of code and just not see...;)

You didnt mention how you found ode!

Bare in mind I threw it out as quick as I could because I felt that dispite the bugs I'd left, (mainly physics settings and the odd silly mistake) that is was very important to put somthing out there that would help people struggling with opengl


You can basically drive ode without physics and use it as
a entity handler, telling ode where you want the entities
each frame in a similar-ish! way to b3d, theres some useful and some undocumented utility routines in there....

Working out things like a transform from camera to second camera really made the old matrix maths sink back in, so using a frame work that doesnt "baby" you can help your skills along no end...

V0.02 out now!

Ha! Yeah I looked back at Chris C's GLUI dealie and saw someone had posted that EXACT same problem and solution. Course I never saw THAT little post. ;)

Excellent work. Works really well. I'll definitely be having a proper play with this later on.

You could do with tweaking the CFM a bit though - the ground's a bit spongy :)

CMF etc will be changable via OMcollisionCMF(cmf)
when i get round to it!

as will all the other settings used in the collision
callback

in the mean time change odemax.cpp and run
mingw32-make in the directory...

I am anxious to see how you progress :) Personally I'm happy if you can get a 2D version of ODE working - that is forget all about Z...

is this possible? 2D games can have nice physics too you know :)

V0.03 out

@flying you could try setting all Z values to 0 each
frame but this isnt ideal....
why not try it yourself? it does take a *lot* of complication
out of 3d in opengl



to date I have had no concrete offers of help...
could this be my last public project?

flying willy: There's a 2D addition for ODE floating around somewhere. Basically it acts a bit like a contact joint that keeps the z axis at 0.0

Chris C: What kind of help are you looking for?

Chris - count me in to help you. What do I do? Currently I own Blitz3D (see blitz3d userlibs for jedive ode where I am also having trouble) and Blitzmax.

I'm not much of a technical programmer so I don't know where to start.

Your efforts are amazingly helpful though! Don't get disheartened. I'll help but don't know how...

*much* appreciated! I'll contact you direct (asuming an email in your profile)

help areas


odd coding problems (help with)
writing ode demo's (which will encourage me to add more ode
functions & get the contact consts changable)
feedback
soak testing (someone with a spare PC they can leave test code running for extended periods)
feedback!! (If you think you know a solution research and test first b4 bitching >;) )
graphics and maybe specific mesh's
input about wanted OdeMax utilities, I'm gonna have to leave the world editor alone for a while to make test beds for
trimesh and joint functionallity
demo writers

So if you think your a n00b programmer, well forget about the complication of opengl, read through the ODE docs twice over and mess around with the demo code

I need more eyes to spot subtle ODE bugs... they must be there but 1 person alone will take ages to spot them

theres so much to do next, I almost dont know which way to turn, a bare framework for coding, joints, trimesh?

just what are priorities for you guys?

best
Chris

[edit] okay so 1 of you has an email address in their profile

Excellent work so far Chris, I'm flat out trying to get the JediveODE wrapper fully functional at the moment, but you can count me on board too when I get that lib sorted out.

Btw, the rotation problems are now fixed with JediveODE, thanks for your input :)

V0.04 out!

Coming in 0.05

eurlar rotate works on local object axis

new function TransLateLocal which moves the object
on the 3 local object axes
(up,back,forward,side to side from the objects point
of view)

Hi Chris,

Thanks for working on this project.

With ver. .02 demo, I kept getting memory errors and blitzmax would crash. This would happen when I was trying to move objects around.

I haven't had much time to look at this.
I look forward to using this more on Saturday.
I haven't done anything since the new ver. of Blitzmax and this lib came out.

Thanks again.

0.02 !!! have a look at V0.04!!! ;D

@VIP3R please mail me

V0.05 includes a "car" demo, next job to get rid of any C code I plan to move the collision into each max application
Its long over due and will mean that instead of having global values for contacts, you could have different surfaces behaving differently, your car could handle differently on ice or dirt in the same environment for example, while other objects still retain their normal behavior

no go:

Building buggy
Compiling:buggy.bmx
flat assembler version 1.51
18 passes, 373804 bytes.
Linking:buggy.debug.exe
J:\BlitzMaxBeta101\bin\ld.exe: cannot find

Process complete

that looks like *yet another* attempt to compile in a directory containing a space.....

and I'd upgrade max while your at it! ;)

Chris,

I'm able to run the three demos without problem.
I'm able to run both debug and no debug.

Using BMax 1.03 and ver. 5 of your lib.

Hi Chris,

Version 0.5 worked fine except the following:
world demo - some objects were disappearing through the ground plane (might be moving too fast?)
rope demo - 'libodedebug.a' is missing in the zip, changed it to 'liboderelease.a' and it worked fine.

Email sent :)

@viper, thx m8!
world demo bug is known about, think i did actually fix it
btw theres a debug ode lib on www.traklink.com ...

@dangerdave
kool, hope you like it, dont forget to contribute a demo!

@bradford
sussed your mistake yet?

OdeMax v0.06 out soon, it will feature changable global contact parameters (done)
and tri-mesh, can only get it working with spheres at the mo, even with the trimesh bug fixes from cvs
looking at the C samples again I notice they suffer from similar bugs...

need to sort out some kind of texturing method for the
milkshape loader...

Anyone understands this;

ld: warning empty table of contents: /Applications/BlitzMaxSetup100/samples/odemax/libodemax.a (can't load from it)
ld: archive: /Applications/BlitzMaxSetup100/samples/odemax/liboderelease.a has no table of contents, add one with ranlib(1) (can't load from it)

ranlib says;
ranlib: warning for library: libodedebug.a the table of contents is empty (no object file members in the library define global symbols)


thanks

@trumpetto at a guess you're using either Linux or Mac version here, I wouldn't recommend the Linux version for now...

If you're using the Mac version have a go at recompiling the library from the ode sources and creating libodedebug.a for yourself.




I'd be really interested to hear if anyones had any luck on the mac platform...

Having some real grief with trimesh at the moment...

James Arthur has contributed some really exellent code that
enables the ode collision callback code to be done in Max!!
(NOT a easy as you'd at first think by any means!)

As soon as we figure out a neat way to package the 3d stuff
together there should be a really neat next release, but
please be patient, this might not be any time soon...

Best
Chris