Game stutters at the start of a level #21
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
play+rate
question
wontfix
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set.
Reference: outfrost/ld47#21
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Particularly level 2 causes a massive stutter about half a second into playing it. Only the first time from launching the game, though; if player comes back to the level later, there is no stutter. I suspect this has something to do with loading particles, the shader, or some other stuff.
The stutters are connected to godotengine/godot#13954. The engine links a shader whenever something with it enters the scene tree and the view frustum. That meant that the intermittent things we use like projectiles or fire particles cause extra stutters after a level is loaded.
I've created a workaround - made a loading screen, made
Game.gdload the projectile and fire hole with processing disabled, and subsequently move it behind the camera, but keep it in the scene tree. This eliminates the secondary stutters on level 2. The loading screen is also nicely animated. Still need to work on #10 to make the other stutters less noticeable.