Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Just use havok


That is overkill for a lot of things. For others, it's useless... it's very hard to make good arcade-style "physics" with a full-blown physics simulator, and totally unrealistic stuff may not be possible with it at all... but those things still may need collision detection.


While I generally agree that "just use havok" is a bad approach, havoc, along with most physics engines, are able to be used for just collision detection, and not response. In many cases, it may prove useful to use an existing engine even for very unrealistic things.


That's a great point. I probably wouldn't do it with a HTML5 shooter with hundreds of projectiles though... what I mean is, those engines still have to check "what shape is it, oh, it's a circle, so now check what I am colliding with..", while you e.g. know the projectiles are circles and the walls are orthogonal planes. This may not always apply, of course, and I agree that as soon as you enter more complex territory you can save yourself a lot of pain by using a "proper physics engine".


> what shape is it, oh, it's a circle, so now check what I am colliding with

While this is true, consider that the huge library of built-up optimizations in a well used collision library like Havok very likely makes up for these checks.

Alternatively, they generally offer a lower level API such that you could just always call: `Havok::CheckCircleAAPlane` and then not have to worry about Havok doing it's dispatch. But then again if you don't use Havok's spatial culling you're likely missing out on a whole lot of optimizations, and advantages to using Havok.


Agreed. Even Box2D is overkill most of the time (if we're talking about 2D games).


With my limited experience with Box2D, I can hardly think of a case where it would be both useful and overkill. It's really a quite straight-forward tool and provides rich features. Once I started using it, I immediately found that many of its features made a lot of interesting options suddenly trivial to implement. The only 2D projects where I would discourage it are ones without any semblance of physics; tile-based games, or example.


Right now I am looking at hundreds of projectiles bouncing around (cheaply, that is they are points) a tile based maze without any slowdown at all (Javascript). I'm sure Box2D does a lot of smart things, but in this case it just cannot beat simply doing one lookup into an array to see if the tile is solid or not. And that's all the world collision I need, since I intend enemy/player movement to be slower and less physic-y, they don't need to bounce off corners correctly or anything, sliding along them is just fine :P

I used Box2D it with C before and loved it, but with Javascript every bit of CPU I save I need for doing the game logic in my amateurish ways :) I'm a sucker for particles etc, and since I don't need accurate physics, it would just be throwing away resources I could use for stuff I do need (or rather want).


Isn't havok for industry level 3d games?


just use Box2d would be nearer the sensible route




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: