Closed thomasboyt closed 9 years ago
Update: yep, it's the complexity of the object, specifically the body
object that Box2D has. Holy crap, that's complex. Even with only a handful, the game starts to lag.
This isn't really surprising, but disappointing. The only sane solution, and one that probably should have been done from the start, is to change the streaming of entities to be a subscription model, instead of serializing all the entities.
This is specifically related to the (non-)performance of serializing entities. This demo creates lots of tiny particles, each represented as an entity. Serializing all of them is mad expensive. It's unclear whether the cost is due to the number of entities, or if some very complex object is getting serialized.