Garry's Mod

Garry's Mod

Simple Physics Throttler
39 Comments
!!PleaseCleanMyteeth!! 18 hours ago 
This is the teardown method.
The LAMBDA player 13 Jul @ 9:02am 
this is very great,best performance mod it literally lets you explode 100 explosives without your pc dying which i did it,personally use it with a bunch of fix addons like lua patcher,another performance mod and redundant file finder ontop
GAMER & GAMBLER 24/7 9 Jul @ 12:51pm 
very amazing addon, unfortunatly its just kills the gameplay because of my 82948 lagging and conflicting addons. Saved in favorites, will use when I became an adequate human being sometime later
cheese 4 Jul @ 3:48pm 
if you combine it with the original bullet time mod, time slows down when it gets laggier. so it's like your character is getting really focused in the action and it makes for a really cool effect
Link 21 Jun @ 3:43am 
the only actually useful performance mod i have ever seen good job
Spoon 20 Jun @ 9:09pm 
Yeah the sound throttling is really annoying can you disable it
Crimsovil 22 May @ 8:00am 
Is there a way to disable the throttle effect for sounds? Certain sounds break, mostly any custom music or ambience from maps
Unami Fox 13 May @ 8:14pm 
NGL, the constant fluctuations even when its an empty map kinds ruins this.
Cogs  [author] 7 May @ 9:48am 
@EthicalObligation @Osadnickzek140: I'll look into what you've posted and I will also look at the dynamic noclip compensation thing. I am doing finals ATM and so I can't give you guys a timeline, might be a while.
EthicalObligation 3 May @ 2:43am 
Feel free to use any of my script and even publish all of it! :)
EthicalObligation 3 May @ 2:43am 
if SERVER then
util.AddNetworkString( "ClientIdealTimescale" )
net.Receive("ClientIdealTimescale",function(len,ply)
if len == 0 or !IsValid(ply) then return end
local ClientIdealTimescale = 1
ClientIdealTimescale = net.ReadDouble()
if ClientIdealTimescale > 1 then
ClientIdealTimescale = 1
elseif ClientIdealTimescale <= 0 then
ClientIdealTimescale = 1
end
ply.ClientIdealTimescale = ClientIdealTimescale
end)
EthicalObligation 3 May @ 2:43am 
...
hook.Add("Tick","ServerDecidedTimescale", function()
local ClientsSummedIdealTimescale = 0
local players = 0
for key, ply in pairs(player.GetAll()) do
if !ply.ClientIdealTimescale then return end
ClientsSummedIdealTimescale = ClientsSummedIdealTimescale + ply.ClientIdealTimescale
players = players + 1
end
local wantedts = math.min(ClientsSummedIdealTimescale / players,1)
local thetimescale = game.GetTimeScale()
if wantedts < thetimescale then
game.SetTimeScale(thetimescale - 0.02)
end
if wantedts > thetimescale then
game.SetTimeScale(thetimescale + 0.001)
end
-- game.SetTimeScale(wantedts)
-- print(ClientsSummedIdealTimescale / players)
-- print(game.GetTimeScale())
end)
EthicalObligation 3 May @ 2:43am 
elseif CLIENT then
hook.Add("Tick","timescalestuff",function()
-- if math.Round(RealTime() % 5) != 0 then return end
local wantedfps = GetConVar('fps_max'):GetInt() or 30
local fps = (1 / RealFrameTime())
local IdealTimescale = (math.Clamp((fps / wantedfps),0,1))
if IdealTimescale < wantedfps then
net.Start("ClientIdealTimescale",true)
net.WriteDouble(IdealTimescale)
net.SendToServer()
end
-- print(IdealTimescale)

end)
end
EthicalObligation 3 May @ 2:40am 
You also could adjust "phys_timescale" convar instead of host_timescale maybe? :)
EthicalObligation 3 May @ 2:38am 
might be a good idea to read each clients fps_max convar to find the best speed and then for multiplayer to do something like this:

for key, ply in pairs(player.GetAll()) do
if !ply.ClientIdealTimescale then return end
ClientsSummedIdealTimescale = ClientsSummedIdealTimescale + ply.ClientIdealTimescale
players = players + 1
end
local wantedts = math.min(ClientsSummedIdealTimescale / players,1)

if wantedts < thetimescale then
game.SetTimeScale(thetimescale - 0.02)
end
if wantedts > thetimescale then
game.SetTimeScale(thetimescale + 0.001)
end
Osadniczek140 30 Apr @ 2:19pm 
would it be possible to add an option to dynamically incerase the players noclip speed when the game slows down?
Osadniczek140 30 Apr @ 2:17pm 
the npc wars look cool as hell in slowmotion
horny bmw technician 26 Apr @ 9:15am 
RECONSIDER YOUR LIFE CHOICES.
raging.baiter.1340 19 Apr @ 1:35pm 
this mf made me panic. :steamthumbsdown:
Pinhead Larry 18 Apr @ 3:30pm 
Joey can eat my ass
Sëëth 17 Apr @ 10:43pm 
@Cogs, Alright, that should be do it for I noticed settings being saved after every sessions hosted. I appreciate that for you fixed that.
Cogs  [author] 17 Apr @ 9:50pm 
@Seeth @Objir I think the saving across sessions should be working.
Cogs  [author] 17 Apr @ 11:24am 
I am somewhat busy ATM, but I see the settings reset issue and I will work on that! Thank you for your feedback.
Sëëth 17 Apr @ 11:17am 
You need fix settings reset after every sessions hosted by new map, It'll make annoying so I can make any changes to this over again.
BillyNabil 17 Apr @ 5:11am 
how do i not make the sounds low pitch?
Mønster 17 Apr @ 1:57am 
WARNING! Carry on reading! Or you will die, even if you only looked at the word warning! Once there was a little boy called Joey, he was ten-years-old and he lived in a mental hospital because he posted a shitty copypasta onto a People Playground mod's comment section . He got so bad he went to kill all the staff in the hospital so the Feds decided that best idea was to get rid of him so they set up a special room to kill him, as inhumane as possible. And he sat there in agony for hours until he died. Now every week on the day of his death he returns to the person that reads this letter, on a monday night at 12:00 a.m. He creeps into your room and kills you slowly, by pegging you and watching you bleed to death. Now send this to ten other profiles on this one site, and he will haunt someone else who doesn't. This isn't fake. apparently if u copy and paste this to ten comments in the next ten minutes nothing will happen: sorry man i am not taking the risk
Dark_Renaissance 16 Apr @ 7:55pm 
wow this legit works so freaking good.
Sandvich Cooker 14 Apr @ 11:38pm 
it helps a lot
Lfu 14 Apr @ 6:23pm 
Now my NPCs epic war can finally be smooth.
cczack 14 Apr @ 9:30am 
This mod is so crazy. A legit fps increaser for gmod ive never been able to have such stable npc wars
Dichete 14 Apr @ 6:59am 
i used to do this manually when the game lagged with a slow mo addon lol
cad 14 Apr @ 2:18am 
DLSS in GMOD, no way
Boneworks 13 Apr @ 8:15pm 
stop throttling my fucking physics
objir 13 Apr @ 12:56pm 
Settings are reset after starting a new map.
NextKurome76TheSoldier 12 Apr @ 4:46pm 
using phys_timescale may also work
ph0roggy 12 Apr @ 8:54am 
make for servers plss :Dogeface:
GAMLET 12 Apr @ 5:05am 
Make it for servers, so that it can be used as an anti-crash system.
Ramin Inuras 12 Apr @ 2:39am 
Turns lags into a cinematic experience
Snekenjoyer6 11 Apr @ 9:05pm 
Hey you can make a kickass zed time mod with this!