Persistent decals as nodes - efficient?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By esdo

Hello!

Im very new to godot and programming in general.

In gamemaker, i made a blood effect in a 2D plataformer game where a hit would spawn multiple blood drops. These drops would then fall (like a physics object) and have a % chance to “splat” on the bacckground, becoming a permanent part of the scenario. Blood drops that hit the ground (tileset) would “splat” on it and become part of the scenario.

In gamemaker, i made the blood drops objects affected by physics. Upon “splating”, the objects would be destroyed and a red splat is then drawn on a surface (basically, it becomes a sprite).

In godot, I would be able to easily achieve the same effect using nodes, and just freezing them in place after they “splatted”, however, i am worried about performance issues. My blood effect would use literally thousands of nodes on a single level. Would that be a problem?

Thanks for any help and sorry for bad english

Update: I used Node2D as my blood drops, and they are moved by changing .position values. Those are destroyed and replaced by animatedsprite nodes (that dont have any code) when they hit the walls or background. This does produce the effect i wanted, but it causes way too much lag. 100 blood drops, even when “inactive” (as sprites) already reduce FPS by an considerable amount. So, is there any way to work around this???

This is what i've been able to achieve

esdo | 2019-01-02 05:00

image link because it didnt load

Screenshot by Lightshot

esdo | 2019-01-02 05:00

This is a site where I learned how to do that blood effect in gamemaker. It contains a flash game that shows exactly the effect I want, minus the background splat.

Persistent Unlimited Memory Efficient Blood in GameMaker (HTML5 Compatible) - Stuff Made By Dave

esdo | 2019-01-02 16:06