Ben's blog
Software development, games, and all that jazz
Home
Archive
Posts
Pages
Search:
Edit Post
Title:
Body:
<p>Bloody crapping pile of wank with a cherry on top. I had no idea physics libraries were so crap. I've been wading through my code, purging it of everything OPAL and replacing it with Newton bits, and in the process have been finding out just how terrible the library actually is. In OPAL, you set the gravity like so:</p> <p><code>sim->setGravity(opal::vec3r(0,-9.81,0));</code></p> <p>Nice and easy. In Newton, you have to set a custom callback to a function that will be called every update, which adds a force to the object, <em>for every object</em>. I won't demonstrate what that looks like in code, just believe me when I say it's horrible. Anyway, I got all this coded, then ran the app and basically not a lot happened. Stupidly, the world size is set by default to something very piddly indeed, and anything outside the world stops.</p> <p>Many problems like this later and I eventually find out that arbitrary meshes (such as my island) can only have infinite mass (ie. they're immovable). Bloody great.</p> <p>So, Newton is rubbish, OPAL/ODE are rubbish, what's next? PhysX looks good, and it seemed that way until I got hold of the API (After registering with them - all very businesslike). Apparently that can only handle static meshes too. Frankly, I'd be pretty peeved if I was an Xbox 360 developer who'd just paid $50,000 for the library, and discovered I couldn't simulate anything that's not a box or a ball. Knobbers.</p> <p>Tokamak was next on my list, and was looking good until I again saw the word 'static' next to 'mesh', though I only found this after browsing their <a href="http://tokamak.xwiki.com/xwiki/bin/view/Main/WebHome">wiki</a> (which details such classes as 'neM4', 'neT' and other cryptically named oddities), their <a href="http://www.tokamakphysics.com/phpbb/viewforum.php?f=2">forum</a> (which details such themes as 'amateur cum', 'bukkake movie' and other erotically challenged topics), and their <a href="http://www.tokamakphysics.com/documentation/">API documentation</a> (which I'll let you look at yourself. HAR!). What a bloody disgrace.</p> <p>Bullet is apparently rather good, but I beg to differ- once again, no mesh support beyond ones that can't move. And there was me thinking physics engines were all about things <em>moving</em>. Silly me. Anyways, finding this out required a lot of browsing around manually, as they've somehow cocked up their website so that their 'search' feature simply tells me "you have requested an invalid special page". Wankers.</p> <p>Everything else I can find either has <em>no</em> support from the developers, costs more money than I'll ever own, has no mesh support or has been bought by Ageia (the PhysX people). So, where does that leave me.....?</p> <p>Back with OPAL. What a huge waste of time. I guess I'll just have to battle the weird instabilities some more. Or release a buggy, crappy game, I don't know. Frankly I'm fed up and more than a little disillusioned with the current 'state of the art' in physics engines. I think for my next game I'll just do pong. Night night.</p>
Tags:
cities-in-the-sky
Body markup:
Plain Text
Textile
HTML
Markdown
ReStructuredText
Draft: