OdeMax

BlitzMax Forums/BlitzMax Programming/OdeMax

Chris C(Posted 2005) [#1]
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/


fredborg(Posted 2005) [#2]
Very nice! Thanks!

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


Chris C(Posted 2005) [#3]
please dont view this as a finnished anything, there
is the bare minimum of user interface.

Its just to get started coding with...


fredborg(Posted 2005) [#4]
Here's a tweaked version of the included example:
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.


Booticus(Posted 2005) [#5]
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!


Chris C(Posted 2005) [#6]
does it happen with quick build off?


Beaker(Posted 2005) [#7]
I have the same problem. Happens with Quick Build on or off. :/


flying willy(Posted 2005) [#8]
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.


Chris C(Posted 2005) [#9]
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


Beaker(Posted 2005) [#10]
Chris - works fine without spaces.


Booticus(Posted 2005) [#11]
Wha? Spaces? Where? Im unzipping your project to a folder on my desktop. "C:\Documents and Settings\mario\Desktop\odemax".... poop!


Chris C(Posted 2005) [#12]
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


flying willy(Posted 2005) [#13]
what are the stability changes on the wiki you refer to?


Beaker(Posted 2005) [#14]
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.


Booticus(Posted 2005) [#15]
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.


dangerdave(Posted 2005) [#16]
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.


Chris C(Posted 2005) [#17]
@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!


Booticus(Posted 2005) [#18]
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. ;)


teamonkey(Posted 2005) [#19]
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 :)


Chris C(Posted 2005) [#20]
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...


flying willy(Posted 2005) [#21]
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 :)


Chris C(Posted 2005) [#22]
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?


teamonkey(Posted 2005) [#23]
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?


flying willy(Posted 2005) [#24]
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...


Chris C(Posted 2005) [#25]
*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


VIP3R(Posted 2005) [#26]
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 :)


Chris C(Posted 2005) [#27]
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)


dangerdave(Posted 2005) [#28]
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.


Chris C(Posted 2005) [#29]
0.02 !!! have a look at V0.04!!! ;D


Chris C(Posted 2005) [#30]
@VIP3R please mail me


Chris C(Posted 2005) [#31]
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


bradford6(Posted 2005) [#32]
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


Chris C(Posted 2005) [#33]
that looks like *yet another* attempt to compile in a directory containing a space.....

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


dangerdave(Posted 2005) [#34]
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.


VIP3R(Posted 2005) [#35]
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 :)


Chris C(Posted 2005) [#36]
@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...


Trumpetto(Posted 2005) [#37]
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


Chris C(Posted 2005) [#38]
@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