#Noticeable stutter / freeze when instantiating packed scene on Web build

1 messages · Page 1 of 1 (latest)

scenic laurel
#

I load all the assets for the build in a loading scene, however where most of the game runs fine, instantiating this packed scene always makes the game freeze <@&1349109171240439858>, additionally I'm using load() instead of preload() here is the code I used for instancing

mellow bolt
# scenic laurel I load all the assets for the build in a loading scene, however where most of th...

I think it has to do with on-demand shader compilation. One solution (I haven't tried) is this: At the game start create a sort of preloading scene (all black maybe) that instantiates the troublesome scene(s) and adds it (them) to the tree with scale 0 or something. Make sure you emit the particles or whatever for 1+ frames or so. Then queue_free the stuff. Now when you move on to the real game the stutter won't happen.

scenic laurel
#

the stutter seems to come from genuinely instantiating the object for some reason

scenic laurel
mellow bolt
scenic laurel
#

I wanted to find ways to make it run smoother without pooling, but I will definitely implement it soon

scenic laurel
#

this feels like a hunch, but I think its the particles on the object

#

it only lags when they get instantiated