Currently, with my zombie system, i create a thread for every zombie to move, updating on every Stepped event with RunService
Would it be more efficient to just update all the zombies at once with a RunService.Stepped:Connect()
How many zombies are you running at a time? Updating them all on renderstep would lag the game a lot, especially on lower end devices. But if your creating a ton of threads then it wont get you any farther performance wise then using renderstep.
Also, side note. Only use RenderStepped for rendering things, such as moving the camera because RenderStepped fires before the frame is rendered. For everything else, use Heartbeat
It depends, but sometimes it can be over 100, also is there a big difference between Stepped and Heartbeat?
Stepped fires right before the frame is rendered, so any game logic will hold up the rendering process. Heartbeat fires right after, therefore not holding up any of the rendering.
Also, 100 threads should be fine. Once you get into the thousands things start to slow down thread wise. What’s the code your going to be running each step?
I changed it so it all runs under 1 thread so it would be easier to make it go backwards around corners, but it just lerps the zombie with SetPrimaryPartCFrame and check if its near any spikes that would be considered touching
Yeah, that should be fine for (at a peak) 100 threads.