With this, my newest prototype game doesn't create any noticable garbage in the engine while running the main game.
can you please give some numbers ?
my game was reporting ~20.000 freed objects per ~5 seconds (4000/sec) on emulator
i couldnt really find where this much came from.
i've tried some experimental things. for example replaced
if (tile.isHighlighted()) {
object3d.setAdditionalColor(JConfig.COLOR_TILE_HIGHLIGHT);
} else {
object3d.clearAdditionalColor();
}
with
if (highlighted != tile.isHighlighted()) {
highlighted = tile.isHighlighted();
if (highlighted) {
object3d.setAdditionalColor(JConfig.COLOR_TILE_HIGHLIGHT);
} else {
object3d.clearAdditionalColor();
}
}
this dropped gc to ~30.000 objects per ~15 seconds (2000/sec)
so almost cut gc in half.
may it be that such methods accidentally create temporary objects ?