Performance issue causing weird physics (Steam Deck)

Godot Version

4.2

Question

I’m making a 2D-game where there are several characters walking on screen. When a character is hit by something - like a falling block with spikes - they ‘emit blood’. This is done by spawning between 50-100 ‘blood’ scenes/nodes.

Now, there might be a better way to go around this, but it works. It looks as intended, with blood staying on the floor for a while and interacting with the environment. I know particles might be more efficiënt, but afaik they can’t interact with stuff.

This is also not the issue, it works fine even on a Core i3 with 8gb of ram.

HOWEVER, when i run the game on my Steam Deck, there is a short but clear frametime spike when spawning the blood; and, more troublesome, this causes the physics of the falling block to become weird. The blocks fall too far and get stuk in the level tilemap.

Disabling the blood eliminates the problem, so i’m pretty sure that’s the issue. General performance is still fine though.

Is there a way around this? I tried creating an object pool, but somehow those scenes either never show up or at the wrong place, and performance isn’t really that much better that way. I do believe it has to do with the spawning of the blood scenes; a small slowdown would be acceptable (and could probably be remedied), but the physics getting out of sync is a real issue.

I’m using preload to load the bload scene. The scene is added via a add_child() call.

Any help is much appreciated!

Show your code that spawns the blood using preformatted text with ```, and some screenshot of the scene structures, and ideally a short video footage from your gameplay on Steam Deck.