Author Topic: Question on addon feasibility  (Read 3278 times)

0 Members and 1 Guest are viewing this topic.

Offline Buzzkill

  • Respected Community Member
  • Full Member
  • *****
  • Posts: 176
  • Karma: 59
    • The Hundred Acre Bloodbath
Question on addon feasibility
« on: November 22, 2014, 09:00:49 AM »
Greetings all.  Quick-ish question for you on an idea I've had bouncing around in my head.

A little back story.  I was fairly involved in the scene about 10 years ago, doing development on MetaMod with Hulu and to some extent AdminMod.  I recently got pulled back in when I found my kids playing GMod  (the circle is now complete!).

So I fired up a junk PC and have been screwing around with a sandbox server.  Given the low CPU specs, spam is something I'm paying close attention to.  I'm currently using PatchProtect, which is my favorite-of-the-day, and it does a decent job, but the server can still get run into the ground on occasion.  I was thinking about a more brute force approach....

Say an addon monitored performance and if it detected CPU > X for more than Y periods, it began intelligently removing props.  In theory it sounds like it has some possibilities, but I was wondering if anyone had already tried this and run into some issue that isn't obvious to me. Any thoughts or insight is appreciated.

Thanks for the time.
Buzz / Mike

Offline Neku

  • Hero Member
  • *****
  • Posts: 549
  • Karma: 27
Re: Question on addon feasibility
« Reply #1 on: November 22, 2014, 02:30:14 PM »
I'm not sure if you can retrieve CPU usage in Garry's Mod.

There are plenty of other alternatives for removing props, just Google "gmod anti prop abuse" or something along those lines.
Out of the Garry's Mod business.

Offline XxLMM13xX

  • Sr. Member
  • ****
  • Posts: 265
  • Karma: -51
  • New to lua development
    • Twitch
Re: Question on addon feasibility
« Reply #2 on: November 22, 2014, 02:33:21 PM »
DarkRP servers come with a anti pro spam unit if that's what you mean

Offline Buzzkill

  • Respected Community Member
  • Full Member
  • *****
  • Posts: 176
  • Karma: 59
    • The Hundred Acre Bloodbath
Re: Question on addon feasibility
« Reply #3 on: November 22, 2014, 08:14:26 PM »
Thanks guys.  I realize that there are a number of anti-spam, prop protection tools.  I've played with Simple Prop Protection, Falco's and Patch Protect.  They all do a good job of restricting props and throttling spam.  However, it seems there'd be some value in attacking the problem from the other end (ie, when the server gets slammed).  If processor usage stats aren't available through GMod then it's probably a no-go then.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: Question on addon feasibility
« Reply #4 on: November 22, 2014, 11:00:45 PM »
We had an addon that we made at one point that would disable physics if the game started lagging. You can compare CurTime with RealTime or something like that to see if it's starting to slow. I don't quite remember.

Offline Buzzkill

  • Respected Community Member
  • Full Member
  • *****
  • Posts: 176
  • Karma: 59
    • The Hundred Acre Bloodbath
Re: Question on addon feasibility
« Reply #5 on: November 24, 2014, 06:44:42 AM »
Interesting. Might Frametime provide better insight into point-in-time server performance?  There'd need to be some averaging and perhaps a baseline value calculated at map start, of course.  Maybe even some kind of function against active player count.


An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given