This project has moved. For the latest updates, please go here.

Disposing Geoms and Bodies causes lag..

May 10, 2010 at 4:54 PM

Has anyone ever had any problems with calling the Dispose method for Geoms and Bodies? It seems like after I remove around 20 geom/body pairs, my game lags terribly.

May 11, 2010 at 12:15 PM
Edited May 11, 2010 at 12:18 PM

I'm not 100% sure but if I remember correctly you should either use a reusable-pool for the geom and bodies (see documentation chapter Performance point 5 or disable the bodies instead of disposing them and then dispose them when you enter the next level instead of every update-cycle. Worked for me.