mdkess / Platformer2

A second attempt at making a 2D platformer, this time with libgdx
3 stars 0 forks source link

Determine and create a good object re-use scheme #12

Open mdkess opened 12 years ago

mdkess commented 12 years ago

Allowing the garbage collector to run/collect memory causes a big performance hit. We should ensure that after a level is loaded, memory pools are used.

I'm leaning toward having a per type pool of object. It'll be a bunch of boilerplate code on each type, but it should be quick.

mdkess commented 12 years ago

I've been just adding some boilerplate object pool code to each object. Annoying, yes, but it gets the job done.