I’m planning to write a node graph generator and an AI based on it because everybody knows Roblox’s pathfinding is completely unreliable when it comes to even the simplest of the paths.
Since my map is pretty big, creating a lot of nodes would cause a significant performance loss.
I’ve researched on this topic a bit, some people say invisible parts are removed from the rendering pipeline therefore they’re not being rendered at all.
So does large amounts of invisible, non collidable and non touchable parts affect game performance even by the slightest bit?
Yes it’ll affect the performance a bit because youre still adding in new instances, but the lag caused shouldnt be a frame drops kind of lag, because youre right, it wont render them.
Instead it’ll be server lag which might cause scripts to be sluggish… think if you had 1k unanchored parts, that kind of lag.
All I can say is test it and find out, it might cause no kinds of lag at all.
To increase the performance, create the graph before hand and store it in a module script. All the parts that you use to make the graph, place them in a folder that’s parented to game:Workspace. Then while in studio, generate the graph. The script should print the graph out in table format so you can just copy/paste into a module script. Then when you’re done, pull the folder out of the workspace and put it somewhere else. Since the graph is now pre-computed, there’s no reason to have the parts on the map or to have the clients create the graph for you.
If your game has multiple maps, you would do this for each map.