shapes
shapes copied to clipboard
large/complex static objects
Is this like adding "fixtures"? The ability to do compound shapes?
This one was just for static objects. I think a lot of game levels probably have a large number of shapes that don't interact with each other, like terrain and props, and relatively few dynamic shapes, like players and enemies.
Ideally, the broadphase data structure would be designed to take advantage of this. The current implementation would still check all static shapes (e.g. trees, sections of floor/walls) against each other.
I tried the generic AABB tree approach, but it wasn't that effective. I'm sure with some profiling, I could make it much faster, but I think a fixed-scale grid will probably work better (and be simpler) for a 2D engine. Then this issue is just a matter of keeping a grid of static objects and a separate grid for dynamic objects.
Adding fixtures (joints?) is another thing I'd like to add. It means adding additional constraint types (in addition to the currently-supported non-penetration and friction constraints). That's probably on par with adding support for circles (in addition to convex hulls) in terms of importance and maybe complexity.
I just wrote a sparse-grid-based broadphase that's a lot faster than the brute-force "check all pairs of objects" when you get a lot of objects in the scene. I think it takes care of most of what I had in mind for this GitHub issue.