UserVar intensive?

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
moccha
Posts: 112
Joined: 13 Feb 2014, 16:09

UserVar intensive?

Postby moccha » 02 Jan 2018, 17:26

How intensive is it an operation to save a UserVar? I was planning on saving a player's X and Y coordinate to a UserVar every time it is sent from the player, which is about every 300ms per user. Is this unreasonable / costly of an operation to do, or is there simply a better/faster way to save this info?

I'm more than happy to repeatedly update from the last value, but I'm worried that it might be "expensive" to save that frequently.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: UserVar intensive?

Postby Lapo » 02 Jan 2018, 19:21

Hi,
it's difficult to say "how intensive" because there isn't an scale of "intensiveness" with which we can express that :)

In any case setting variables is an ultra light operation, so there should be no problem with a server having to set tens of thousands of vars per second.

Updating variables every 300ms is perfectly fine. No worries :)

cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
moccha
Posts: 112
Joined: 13 Feb 2014, 16:09

Re: UserVar intensive?

Postby moccha » 02 Jan 2018, 19:24

Lapo wrote:Hi,
it's difficult to say "how intensive" because there isn't an scale of "intensiveness" with which we can express that :)

In any case setting variables is an ultra light operation, so there should be no problem with a server having to set tens of thousands of vars per second.

Updating variables every 300ms is perfectly fine. No worries :)

cheers

Ultra light, you say? That's all I needed to hear. :) Thank you again for your expertise.

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 65 guests