I need to use the Edge Shapes in a game I'm making, but I'm pretty sure they haven't been ported to the most recent version of JBox2d. This is more or less a request to see if Edge Shapes could be added back in. It's not super-critical, but I plan on using them for optimizing my level data.
I would be willing to help with the porting, but I'm not sure what all needs to be done.
Okay, I can give that a shot. It looks like those are individual shapes, so concavity won't be a problem, but one of the biggest things I'm worried about is speed. There's going to be a lot of these, so I want to make them as fast as possible.
My game uses a tile based world, and in the very beginning, I used a single shape for every tile. This worked, but was obviously very slow.
Right now, my game combines adjacent rows of solid tiles into one shape, which helps a lot, but it only combines 32 tiles at a time (this is an intentional limitation, because my world is based on chunks of tiles), and only combines them on the x axis.
I'm working on a replacing this system with a new one based on the marching squares algorithm. It will trace a shape out of the tiles, and then make one big set of edge shapes to create the physics representation.
I'm hoping this new system will be faster, and I think it will be, due to the greatly reduced number of bodies. So I just want to make sure that this polygon shape system is going to be an actual improvement.
One thing I liked about the edge shapes was that if something got on the "wrong side", it would push them to the other side. Will this method of creating edge shapes with polygon shapes preserve this behavior, or is it just a workaround?