HungryProton / scatter

Godot engine addon to randomly fill an area with props or other scenes
MIT License
2.07k stars 94 forks source link

Really long load times and lagging #195

Open Minoqi opened 5 months ago

Minoqi commented 5 months ago

I'm using the addon to add some foliage to my environment. Some grass, trees and rocks, not a lot of stuff. I have a few scenes of different environments that I load randomly at runtime. While opening the scene itself is fine in the editor, when I run the game it lags HARD, like almost crashes hard. I removed all scatter nodes to see if that's what it was and it does run perfectly smooth when all scatter nodes are removed.

I tried making it so it's only the grass to see if it helps, and while it did, it still lagged a lot. It's a chunk system too, so as you move around the old chunks are moved to a new location and the environment pieces are rechosen and relocated. This stutters with the addon but has no issues without the addon.

I took a look at the issues and I've found too where performance during runtime seems to be an issue, is this going to be a planned fix? Little disappointing that such a simple scene is enough to lag the game as much as it is.

TokisanGames commented 5 months ago

Save the transform cache to a binary resource file.