Hello Im new to programing in general. I want to create a blood effect such as this one: http://www.davetech.co.uk/gamemakersurfaceblood (link may take a while to load). In game maker, this is achieved using surfaces, transparent screens that you can draw onto. Drawings made into surfaces last until that surface is cleared. So, i wanted to create that same effect in godot. First, I tried using multiple nodes. Node2D where used as the moving blood drops, and those whould be substituted by sprite nodes (that would supposedly no processing power, cus they are just sprites) when they hit terrain. That did work as intended, but performance was terrible - blood caused massive performance drops. Next thing tried was using the draw command. A node2d called "BloodController" would register all the locations at wich blood splatted on terrain in a array, and each time a new splat was added, it would re-draw itself entirely, placing splat sprites where the drops collided. That also works, but the performance is still not good enough and, even tho lag should only be present whenever the controller updates (and draws all splats on the screen), the lag is constant. After a few splats are drawn, the framerate is lowered even without any new splats or active blood drops. After that, i tried using viewports, but i cant find a way to make them transparent.

Thanks for any help. Also, is https://godotengine.org help section dead? theres no answered questions in a long time.

I think you can make Viewports transparent by setting the transparent_bg property to true. That said, it has been awhile since I've messed with Viewports in Godot, so maybe things have changed.


I have made a prototype game akin to INK in both Godot 2 and Godot 3 before. I can briefly explain how I managed the (potentially) massive amount of ink splats. I'm not 100% sure if like what you are looking for, but maybe it will help?

Here is the breakdown of how I handled creating the ink splats:

-| Make a Node2D node/scene that will handle be the 'manager' that all of the scripts that need to spawn splats will call. This node will need to have a list to keep track of 'workers', which will be responsible for rendering the splats.

-| Make another Node2D node/scene that will be the workers. These nodes will have a list that will hold the position and other data needed for your splats. These nodes will draw the splats in the _draw function whenever a new splat is added.

-| In the 'manager', always have a variable that will hold a single worker. We'll refer to this worker as the "current worker". You will also need to make the worker list empty initially.

-| In the 'manager', make a function to add splat(s). When a splat(s) is added, have the manager send the new splat data to the "current worker" and then call the update function on the "current worker" so the _draw function will be called and the new splat(s) will be rendered. I used draw_circle and draw_texture primarily, but any of the drawing related functions should work.

-| Have the 'manager', or the "current_worker", check to see how many splats are in the "current worker" splat list after you have added splats. If the number of splats is over a certain amount, make/instance a new worker, add the "current worker" to the list of workers in 'manager', and then make the newly created worker the new "current worker"

-| Rense and repeat every time a new splat is added. This way, workers will only have N many splats. Because the _draw function is only called when the update function is called, and until the update function is called a Node2D will keep its visuals, this allows you to add many splats without running into performance issues.

Hopefully that helps! I tried to outline how I made a splat system as best I could. Hopefully it will be of some help :smile:

One day, I'll get around to making the INK prototype Godot tutorial on RandomMomentania, and then I can share the code that makes, renders, and manages the ink splats.


As for the GodotEngine.org help section being dead, I have no idea. It might just be that everyone is busy and so it appears to be dead, or maybe the servers are having issues. Last I knew though, the help section of GodotEngine.org is alive and well.

5 days later

Thanks for the help! I managed to do it with transparent_bg. I dont know how I missed seeing this.