Author Topic: A noticeable issue of lag tied to MPC/AMPC abilities  (Read 664 times)

Quartermaster

  • Outlander
  • **
  • Posts: 73
A noticeable issue of lag tied to MPC/AMPC abilities
« on: February 06, 2021, 09:12:07 AM »
Last night while playing in the Village of Barovia area, Two MPC/AMPC logged in and used the set everyone hostile ability. I received the message that they had. Less than 2 seconds later I received the 10 seconds has passed message.  Then it looked like these players crashed/logged because I got the same two messages another 28 times in the next 20 minutes. Each time the message popped up it was followed by a small flutter in game performance where my character would rubber band a few feet, or stop suddenly then play a hurried animation. One of the said AMPC/MPC was Silver, the other was Helen something or whatever.
I am wondering if that AMPC/MPC autohostile everyone function isn't causing much of the server instability lately.
Personally I find it strange that a server with rules about RP focused before PVP would have a universal hostile function for everyone even those who aren't in the country that the ones using it are in which by default circumvents RP. But that's just me.

evil.bat

  • Undead Slayer
  • ***
  • Posts: 101
  • dead inside, do not open
Re: A noticeable issue of lag tied to MPC/AMPC abilities
« Reply #1 on: February 06, 2021, 09:25:03 AM »
It would be more load-intensive to compare area tags with the MPC's current location than to simply loop through all the PCs on the server. You would be running an additional series of logic checks.

Quartermaster

  • Outlander
  • **
  • Posts: 73
Re: A noticeable issue of lag tied to MPC/AMPC abilities
« Reply #2 on: February 06, 2021, 09:27:45 AM »
it could be scripted to use the server friendly timestop function of only in the area the hostile is in. there by avoiding any unnecessary PC checks, and lag.

evil.bat

  • Undead Slayer
  • ***
  • Posts: 101
  • dead inside, do not open
Re: A noticeable issue of lag tied to MPC/AMPC abilities
« Reply #3 on: February 06, 2021, 09:30:43 AM »
That's only slightly better, since you'd be looking through every object in the area (but stopping if it's a creature with the GetIsPC clause), the way it's done is actually the most optimal in terms of resource usage.

You'd also have to re-run it every transition, which would make it worse in the long run.
« Last Edit: February 06, 2021, 09:32:20 AM by sorrowkitten »

Quartermaster

  • Outlander
  • **
  • Posts: 73
Re: A noticeable issue of lag tied to MPC/AMPC abilities
« Reply #4 on: February 06, 2021, 09:53:08 AM »
So your response is it's as good as it will get even if it causes server instability. Got it. My mistake for pointing out a bug that I experienced.

evil.bat

  • Undead Slayer
  • ***
  • Posts: 101
  • dead inside, do not open
Re: A noticeable issue of lag tied to MPC/AMPC abilities
« Reply #5 on: February 06, 2021, 10:41:29 AM »
I'm just stating my experience with the NWScript system. Not saying it's not an issue.

EO

  • Assistant Head DM/Developer
  • Head DMs
  • Dark Power
  • ******
  • Posts: 22401
  • The one and only, the one everyone wants to be!
Re: A noticeable issue of lag tied to MPC/AMPC abilities
« Reply #6 on: February 06, 2021, 11:13:12 AM »
I'll optimize it a little but will keep it hostiling everyone on the server.

EO

  • Assistant Head DM/Developer
  • Head DMs
  • Dark Power
  • ******
  • Posts: 22401
  • The one and only, the one everyone wants to be!
Re: A noticeable issue of lag tied to MPC/AMPC abilities
« Reply #7 on: February 27, 2021, 09:46:05 PM »
I've optimized this.