Antilag & Lag Detection Module for DarkRP

This is Antilag, a lag prevention routine and detection script. Depending on an interval you set, optimally 5 to 10 minutes, this script simply freezes all props, clears decals and stops sounds and notifies all users. Clearing decals and stopping sounds is configurable.

I’m releasing this super tiny project I made with a friend for use and expansion by anyone who’s interested in gmod lua and doesn’t know where to start. We created this for some server owners and also to get into glua, but I felt like it would also serve as a good tutorial of sorts for someone who knows a bit of computer science but wants to try glua. (Includes new networking library, hooks, etc.)


Because clearing decals and stopping sounds makes the server less laggy.

I guess in a way, it makes the worst performing clients free up a little CPU to use for responding more promptly to the server… rather than deal with “server lag” as such.

No. In no way. It’s the purest form of placebo. You immediately notice a change when someone clears decals or stops sounds. Suddenly the apparent “mess” of scorches and bullet holes are gone and for a moment, all is silent. This gives a very strong feeling of a reset.

The problem is that the feeling is all it gives. The impact of sounds and decals on performance is practically none. It’s placebo. It doesn’t work. It doesn’t solve lag because it’s not the cause of lag.

It’s like trying to feel better by rubbing some face mask mud in your face instead of stopping the guy who’s punching you in the face.

A better way of a anti-lag plugin would be to decrease the tick rate when the amount of players or the amount of lag increases. But not sure if changing it while the server is running is even possible.

Correct, the stop sounds and clear decals are run client side. The magic is the prop freezing, which you left out… not sure why?
The stop sounds and clear decals is optional because of its marginal benefits. But either way, having the annoying broken records stop and decals cleared up is helpful for some people even if it doesn’t deal with the lag.

Added video to OP.

You completely missed his sarcasm

I left that out because the prop freezing could actually work if the lag isn’t caused by a script.
Surely by marginal benefits you don’t mean performance benefits?

Really, the inclusion of stopsound and cleardecals just panders to the myth that they solve lag. They really don’t.

Look, it’s mostly placebo. Like even 99% placebo. But there is a tiny effect (that you won’t notice).

While on this subject, is it possible through a non-lua module to detect which props are colliding?

This would make antilag scripts 100% better and not annoy everyone because of one(?) single player trying to be cute.

Psych 101 placebo’s do work :slight_smile:

For humans, not computers.

And you must’ve missed mine :slight_smile:

You guys are great. Put stuff out for money, get shit on. Put stuff out for free, get shit on.
I didn’t release this because it’s a stellar full featured lag prevention tool, I put it out to help out the new guys.
Did anyone read the OP fully?

*Correction - anything with DarkRP in the title gets shit on.

[editline]30th January 2017[/editline]

Also, it’s probably due to the fact that a lot of tools already exist that do this. Don’t to take it the wrong way, people just like seeing new things, rather than the same thing repeated.

It’s a human that thought it made a difference “idiot…” Why you trying to flame me when you’re wrong… I bet your gonna rate dumb and not reply lmao.

I mean you are pretty damn dumb if you think he was “flaming” you by saying “For humans, not computers” he’s just stating something and you’re blowing it up like he threw water in your face.

Clearly not if your response to his sarcasm is…

… which implies that it DOES help performance, which it does not.

Nowhere in your post does your sarcasm show, so it looks like a legitimate post.

This was primarily a discussion about how cleaning decals and stopping sounds does not help the client at all, which people seem to mistake easily.

Ascertaining the sarcasm from a post and a post with sarcasm are two different things.

Let me just say that I don’t like the way you’ve explicitly linked clearing decals and stopping sounds on the client as ways of abating serverside lag.

Even though you’re allowing this to be disabled, I can’t help but think this is only going to make more people think that this is how it works. It isn’t. To add on to what falco said - I’d be more inclined to blame lag on calc-heavy scripts, collisions, and/or constraints doing wacky shit, for instance. If your aim is to “help out the new guys,” please consider this.

Edit: the repo’s been taken down, but what this effectively did was kinda like if you were to smell something rotting in your kitchen trash can and then go and scrub the toilet to get rid of the smell.