Mythruna
April 28, 2024, 04:46:45 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to the new forums. See "Announcements" for a note for new users.
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: possibilities of heavy physics grief  (Read 9096 times)
zeldafan99
Newbie
*
Posts: 3



View Profile
« on: January 30, 2012, 12:01:12 PM »

if the physics will be implemented as it seems.. there needs to be a way to limit it without hurting gameplay. we all know how easy it is to crash a gmod server by just making things hit echother.
« Last Edit: January 30, 2012, 03:27:38 PM by zeldafan99 » Logged
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #1 on: January 30, 2012, 12:14:37 PM »

if the physics will be implemented as it seems.. there needs to be a way to limit it without hurting gameplay. we all know how easy it is to crash a gmod server by just making things hit echother.

edit: damn it i posted this in tech diddnt i

I moved it. Smiley  I hope that was ok.

Yes, physics grief is a possibility but can be mitigated in a few ways.  In the real game, that fact that objects cost resources will automatically limit how many objects are active.

Even still, a player could take all of their resources and potentially make 1000 little things to gum the works.  I think this case is detectable tough and there might be a few ways I can handle it.

One thing, objects that are inactive go to sleep and so aren't directly handled by the physics engine.  They do get factored into collision detection, though... but will generally be ruled out pretty quickly.

Also, the physics engine is setup to be as stable as possible... so if there are lots of objects it will simply slow down rather than do bad math.  I'm worried if I go too far down that explanation that peoples' eyes will start to glaze over. Smiley

Suffice it to say, spamming objects will cause lag... but that's already true.  Spamming objects will also cause the physics simulation to run in what appears to be slow motion.

If I detect these cases then I could put all or some of the objects "to sleep"... meaning they would freeze wherever they were until touched again.  This would limit griefing to just causing physics to pause for some objects... which is probably acceptable.

This is something I think about a lot though.
Logged
zeldafan99
Newbie
*
Posts: 3



View Profile
« Reply #2 on: January 30, 2012, 01:17:43 PM »

interesting, it would also be nice to have server admins or moderators (if there will be any once the main server starts getting really large) to quickly have the ability to just toggle off physics if they detect someones doing something screwy. after all, the best anti grief is the console commands.  Smiley
Logged
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #3 on: January 30, 2012, 01:24:34 PM »

Yep.  Anything is possible.  I already have a command to delete all objects in a certain radius.  It wouldn't be hard to have one to make all mobile objects in a radius static.
Logged
Moonkey
Hero Member
*****
Posts: 1587

This is probably a picture.


View Profile
« Reply #4 on: February 02, 2012, 08:57:59 AM »

interesting, it would also be nice to have server admins or moderators (if there will be any once the main server starts getting really large) to quickly have the ability to just toggle off physics if they detect someones doing something screwy. after all, the best anti grief is the console commands.  Smiley

Ermm about that... Mythruna server is already very big. I've seen lots of people that aren't even on the forum play. I've never seen an admin besides paul either... The servers are very unprotected right now and any server will need admins even if it is small. BTW Suggestion: Make objects that leave your sight in a certain radius disappear off yourscreen and turn inactive. If nobody is around the objects in the area make all objects disable physics in that area. When somebody comes inbound to the objects they re-enable. This would help griefing calm down a bit and help all players.
« Last Edit: February 02, 2012, 09:01:06 AM by Moonkey » Logged

Mythruna: Don't you dare read any posts I made before 2014.
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #5 on: February 02, 2012, 10:33:00 AM »

Objects already disappear outside of a pretty close radius.  You can see them popping in all the time if you look for it.

While I can increase the priority of putting objects to sleep when they are out of the player's view, I can't arbitrarily put them to sleep because they may be part of a larger chain reaction that extends into the players view.
Logged
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #6 on: February 02, 2012, 10:37:11 AM »

Regarding "admins", most servers would have them, I think.  I try to make the server as self-running as possible so that adminning is more a labor of love than a full time job.  I used to have to log in every day just to clean things up.  The property system and the ability to revert areas to previous states has helped a lot.

It is easy to write admin commands so that they can be granted to other players... and it will get even easier at some point.  I've already granted some players one or two admin commands.

In general, if people run their own servers then I'd expect them to want to admin... or at least operate as a DM in some way.  Part of the fun of running your own server would be setting up quests and stuff, I'd think.
Logged
FutureB
Donators
Hero Member
***
Posts: 512


RAWR


View Profile
« Reply #7 on: February 18, 2012, 02:04:03 PM »

Yay for anti greifz and yay for admin tooolz Roll Eyes
Logged


Say the opposite of these words:
1)Always.
2)Coming.
3)From.
4)Take.
5)Me.
6)Down.
Moonkey
Hero Member
*****
Posts: 1587

This is probably a picture.


View Profile
« Reply #8 on: February 28, 2012, 09:27:21 AM »

How about if there is a large amount of moving objects in the area make the objects Slow down... And render their collisions and gravity directions correctly? It'd help lots for dah lag.

Or if there is an un-useful amount of objects in collisioning with eachother delete the ones that are causing most server tension? The delete balance might go into a spasm rage and delete everything lol. I still think your bug that makes things fly away when collisioning with eachother sometimes helps best xD!
« Last Edit: February 28, 2012, 09:32:31 AM by Moonkey » Logged

Mythruna: Don't you dare read any posts I made before 2014.
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #9 on: February 28, 2012, 10:15:24 AM »

Physics works at a fixed time step so objects already slow down when there is lag.  If the physics is stepping objects at 60 FPS and the physics is only able to run at 30 FPS (because of slowness) then objects will move at half speed.

Furthermore, there is already simulated annealing in the physics simulation.  Objects have a temperature and the slower their temperature, the slower time moves for them.  This is precisely to deal with the case where they are very chaotic; I just slow time down for them.  It's tweaking these parameters and minimizing the need that takes time.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!