I'm working on a big project, a game where a whole ecosystem is simulated: hundreds of objects are on the map in real time and interact with each other and with the world.
Performance issues are not new to me, and in the last NW versions (with NW2 enabled) they're are better, but there is a problem: after few minutes in game, lag starts.
I've just discovered that when i unload all sounds, the lag disappears and CPU usage goes back as it should be!
This is a great discovery for me, cause i've at least an understanding on the issue, my concern now is to find a way to use that to solve the issue unintrusively: i can't just trigger "unload all sounds" from now and then, that would ruin the game's atmosphere...
Do you have any suggestion? I've read there is a trick in this guide related to the issue, is it still relevant in newer NW2?
Thanks, and btw TheRealDanny, you're doing God's work, it's really appreciated :*
UPDATE1: i'm trying the GC workaround, should i execute "global.gc();" every tick, at a timer or just at layout start?
UPDATE2: Unreleted with the above issue, but the icon is still a red square in NW 0.42.4 and nightly 0.42.5, although the changelog states it is fixed.