Here is my issue.
I currently have Box2D setup and working. But, it works with my Entity system. So I can create static objects and dynamic moving ones, and they simulate fine.
However, my world is made up of tiles.
I have very easy ways of determining which Tiles a Body is intersecting, but I'm not sure how to tell this to Box2D.
I could obviously turn each tile into a Body but that would waste a lot of ram because I have 10s of thousands of tiles.
The tiles also form some cool patterns and can be converted to an empty tile at will.
My thought was to do something like this:
-Iterate the bodies, find which tiles they are touching, add these as static bodies into the world. Step the world. Remove the bodies.
This seems like a bit of a hack though and I am wondering if anyone can think of a better way.