-
What do you want to achieve? Optimize my game
-
What is the issue? Lag spikes each 1 second (game completely freezes for a few frames)
-
What solutions have you thought of so far? Changed most unions in the game to box collision, changed streamingenabled to Opportunistic and added many settings in-game to lower quality. And I tried using microprofiler, but I’m not sure what each thing means, the ones causing most delay is Scene and RenderJob, anyone knows what these two mean?
There’s not a whole lot of information to go off of here. Any scripts that are possible causes?
I think the main cause is the huge amount of trees and unions, in the microprofiler scripts doesn’t seem the main problem
Hmm I’m not too good in that area. But I wonder if the objects have lots of vertices, many parts?
Each tree has about 12 wedges and a cylinder (the wedges are in one union and cylinder is a basepart) but the amount of trees I can’t say because when I try to select or run a script to count my studio just crashes
Is it your computer? Are you maxing out while working Studio? CPU, Memory? Task manager.
My computer, it also happens when I publish the game and test on a roblox server. And no my studio uses average RAM and average CPU when pressing play. (i took long to reply because my computer crashed while typing this)
I think I found (half) the solution, I went to microprofiler and selected the frame with most delay, and the problem seems like that I have used too much task.wait in my game, because the biggest problem is “Heartbeat” and “DelayedThreads”. But why I think it’s half? Because when the game doesn’t ‘heartbeat’ the FPS is still at 30.
So, I removed all task.wait that I could find and it kinda helped, it lowered the screen freezing time, but there’s still lag spike by something called “WaitingHybridScriptsJob”, not sure what it is
maybe a free model virus? this has happened to me before with viruses.
I don’t use free models, when I use it’s just a mesh (because I don’t know blender) and I check if there is something inside it
SOLUTION: Turns out it was a problem with one of my SendRemote local scripts where it would get all the descendants of workspace every 0.2 seconds, I fixed it by making it 0.5 seconds and instead of getting descendants from workspace, it gets descendants from the Propertys folder (which it’s where the thing it is searching for is and always will be) My game is now running at 60 fps
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.