Lag simulator not working for MMO rooms?

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

User avatar
meanvel
Posts: 129
Joined: 19 Jan 2017, 14:06

Lag simulator not working for MMO rooms?

Postby meanvel » 09 Feb 2017, 07:43

Anyone know if the lag simulator is working? Tried it in both my zone extension and room extension, didn't cause any lag...

this.lagSimulationMillis = 2000;//Lag in milliseconds
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Lag simulator not working for MMO rooms?

Postby Lapo » 09 Feb 2017, 08:53

Hi,
sorry I am not sure that this code:

Code: Select all

this.lagSimulationMillis = 2000

refers to?

Can you clarify?

thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
meanvel
Posts: 129
Joined: 19 Jan 2017, 14:06

Re: Lag simulator not working for MMO rooms?

Postby meanvel » 10 Feb 2017, 09:55

Umm, I read that lag simulation was added as far back as SmartFox 1.x for Java extensions.

If you just type "this.lag" in extension init() in a Java IDE two different variables come up...
lagSim.png
(8.24 KiB) Not downloaded yet
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Lag simulator not working for MMO rooms?

Postby Lapo » 10 Feb 2017, 15:40

Thanks.
Yes you have two parameters:
lagSimulationMillis and lagOscillation. The former indicates a base value and the latter adds or subtracts a random value in the range [1.. lagOscillation]

The system works by causing the server response to get to the client with additional lag. So it's server --> client only.
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 74 guests