Garry's Mod

Garry's Mod

Simple Physics Throttler
51 Comments
EthicalObligation 17 Oct @ 10:15am 
The code I posted is more than enough for most people looking for timescale fps tieing. Just put it in an autorun.lua and you should be good.
iamaether 13 Oct @ 12:54am 
Please work on this addon, This addon works well and i'm not the minimum age to obtain a job to potentially gain a more powerful computer. Thanks.
Middle eastern Scoutmain 9 Oct @ 10:08am 
oh yeah AI SUX (sucks)
Middle eastern Scoutmain 9 Oct @ 10:08am 
i forgot it was a reddit ... forum link but the video still exist in youtube
Middle eastern Scoutmain 9 Oct @ 10:07am 
using chatgpt for suggestions was a SIN

i heard that only 80% of it actually is useful and from real sources (the 20% is made up and fake)

(p.s:if you wonder where i got the darn info i watched kurgezte??something something (title: having "AI SLOP" word in it) the link: https://www.reddit.com/r/mealtimevideos/comments/1o0jp7e/ai_slop_is_killing_our_channel_1213/ )
Cogs  [author] 25 Sep @ 1:37am 
I fully expect to have broken something, so just let me know.
Unami Fox 15 Sep @ 9:24pm 
If you guys don't like it then just make it yourself. (I would prob sub to that instead if its not made by a bot)
A̷r̷b̷i̷z̷y̷ 29 Aug @ 10:02am 
not bad:steamsad:
koishicat 4 Aug @ 3:36am 
just because you stated it doesnt mean these idiots can read.
Cogs  [author] 3 Aug @ 10:08pm 
@koishicat, the use of AI was stated in the Disclaimers'N'Stuff section.

It is my prerogative to work on(or not work on) the code in this addon at any given time. If someone wants to make a superior version of this addon I am not adverse to that (I would like a better version).

In terms of the phys_timescale: It does not slowdown NPCs, grenade detonation timers, and perhaps other things I'm not aware of. This means it might be less helpful in getting frames in NPC heavy battles. (though I don't fully understand the relationship between host_timescale and NPC processing) . All that being said, I think its a good idea to add an option for the addon to use phys_timescale as there are benefits to it. If/when I get around to this for this addon, is up to me. Someone may beat me to it(or not).

I will leave your comment up.

For others:

As of now I am still unsure of a method to gain all the benefits of host_timescale while also not slowing down sounds.
koishicat 2 Aug @ 8:25pm 
guys he cant change it to phys_timescale because he cant fucking code. chatgpt made the entire thing. it becomes obvious when you look at his profile and see his other uploads.

just reupload the mod but better with phys_timescale, he doesnt even own the code.
f2p player 1 Aug @ 1:40am 
could you use phys_timescale instead? the new "sounds slowing down" effect going off randomly is kinda annoying
!!PleaseCleanMyteeth!! 21 Jul @ 1:30am 
This is the teardown method.
BlueCup43 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
WZRD MAGE 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.
Zigota 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
Lfuu 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
c68a5d 14 Apr @ 2:18am 
DLSS in GMOD, no way
sickass 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