Problem:
There was too much lag when creating the balls that would represent the water. I would do this by creating a body in box2d and giving it the proper texture and fixture. I would then add the body to a body list. Even after they have been deleted with list.RemoveElementAt they would still cause the world to lag.
Impact:
The game would become unplayable after too many balls had been created.
Solution:
I had to delete bodies using the world.deleteBody command this will let you actually delete the body on the world instead of just removing it from the list. You also have to do this with anything else you create on the world like joints.
No comments:
Post a Comment