How to Intentionally Lower Framerate

Ok so I’m aware that there are some bugs in my game that only are present on lower framerates.

I know studio has a testing tool for testing if the server/client loses connection, but are they any ways to intentionally lower my framerate to help test the game’s performance on lower framerates?

I only have PC’s that are fully capable of running Fray at 60 FPS all the time, so I’m not able to just log onto a different machine and test it out.

2 Likes

If you’re testing connection, you might wanna check this.
I don’t think there’s a way of changing FPS.

3 Likes

There is no proper way to do this that isn’t hacky.
Fractality_alt posted a solution in 2017 that does accomplish it, but it is hacky.
https://devforum.roblox.com/t/what-are-you-working-on-currently-2017/32228/4572

To generalize the solution a bit, here is how to target an arbitrary frame rate (instead of just 30).

local TARGET_FRAMERATE = 30

while true do
    game:GetService("RunService").RenderStepped:Wait()
    local t0 = tick()
    game:GetService("RunService").Heartbeat:Wait()
    repeat until t0 + 1/TARGET_FRAMERATE < tick()
end

If you are doing this in Roblox Studio, you can also use my Render Settings plugin, which has a slider to simulate 6 to 60 FPS.

33 Likes

You can easily do this by running your game on a virtual machine with low memory allocation.

1 Like

I’d hardly call setting up a virtual machine easy compared to yielding RenderStepped.

8 Likes

Ah my bad, I just assumed everyone had VMWare running for some reason.

10 Likes

You may also take a significant performance hit with a hyper-visor running on top of Windows or OS X, and won’t be controllable like the RenderStepped solution stated above.

2 Likes