Hacker News new | ask | show | jobs
by tgb 4927 days ago
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.
1 comments

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).