GeometryBatchFactory and Complete Destruction of an Object

Hello there!

I’ve been making a game for the jmonkey awesome time blendswap arcade competition and I have a few super fun questions!

Number one!

I’d like to use the GeometryBatchFactory on some nodes within my scene that I’m not using specifically but contain a lot of Geometries!

I’ve attempted to read the docs on it, but I just can’t figure it out!

If someone could provide me an example of batching a node I’m sure I can take it from there!

Number Two!

I’m making a game where I’m shooting water at fire, it seems that the longer the game goes, the more lag I get. I assume this is because I’m creating more and more new fires and waters, while detaching the old one via the removeFromParent() method

Am I removing these objects properly?

Or is there a more complete way to remove these objects, as it seems that the longer I go in the game, the more lag I get.

The who project is available here

Thanks for reading!

Leave the stats open. See if your object count is steadily growing or something… if so then you have some leak somewhere and you aren’t really removing things when you think.

removeFromParent() will completely remove the object and it will eventually get garbage collected. Any slow downs you see from garbage collection will be long pauses… and not just general sluggishness.

If performance is going downhill consistently then it sounds like something else is happening.

@pspeed

any advice on the geometry batch factory?

Ignore this I got it