Geode, previously known as Geometry Lines Background, is a module providing a way to render randomly tweening dots that will be able to connect depending on their distance to each other.
Lines are now cached instead of creating and destroying old lines (unused lines will be cached until Stop is called which will destroy all lines in the cache)
Would stand out more if it’s optimized for performance. I’ve tried this in the past and trust me, it’d get laggier even if you just add a few more. If you haven’t, try using a quadtree to lessen the number of checks needed
How would these data structures help optimize the performance? (I’m not that well-versed in those kinds of topics, apologies if I sound a bit stupid here)
You see, I’ve also been looking for ways to improve the performance but even after 2 years, nothing much really came to my mind on how do I improve the performance.
not at all, I’m not that well informed about quadtrees as well.
A quadtree recursively splits your 2D space into four quadrants (octrees for 3D). So in dense areas, the tree will divide more until each box has just a few nodes. When you need to find neighbors for a node, instead of scanning the whole space, you only search the relevant quadrants.
When searching, start at the root and work your way down. For each quadrant, check if it even intersects with the node radius (assuming you use a radius). If a quadrant is completely outside the radius, just skip it. Also if you find that a whole quadrant is inside the radius, you can just grab all the nodes in that box to avoid unnecessary checks.
There are of course more to this but this is all I know about them. I recommend seeing this video from TheCodingTrain to see how to implement this in code: