Game stutters at the start of a level #21

Open
opened 2020-10-14 05:34:09 +00:00 by outfrost · 1 comment
outfrost commented 2020-10-14 05:34:09 +00:00 (Migrated from github.com)

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.

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.
outfrost commented 2020-10-31 03:40:20 +00:00 (Migrated from github.com)

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.gd load 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.

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.gd` load 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.
This repo is archived. You cannot comment on issues.
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: outfrost/ld47#21
No description provided.