Lightlimn
|
  |
| Joined: 09 May 2010 |
| Total Posts: 4079 |
|
|
| 14 Jan 2017 01:25 PM |
| I'm updating something every like 10 seconds or so, and it's fine at first but starts lagging behind dramatically, like 20 seconds sometimes. Any reason for this? |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 14 Jan 2017 01:27 PM |
OnUpdate OnUpdate 30 + numPlayers * 5
|
|
|
| Report Abuse |
|
|
Lightlimn
|
  |
| Joined: 09 May 2010 |
| Total Posts: 4079 |
|
|
| 14 Jan 2017 01:28 PM |
| Should still be plenty. It's for a queuing system where people need to be able to join it and leave, but it updates slow. Queues can have 5 people, and the only problem is the updating. There's no reason for it to be slow except roblox, right? Or am I updating it too much so it lags? |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
| |
|
CamoNoobX
|
  |
| Joined: 27 Jan 2011 |
| Total Posts: 268 |
|
|
| 14 Jan 2017 02:37 PM |
Is this for a matchmaking system? I'm actually interested in how you're doing this, seems like different servers would read outdated datastores.
|
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 14 Jan 2017 02:40 PM |
http://wiki.roblox.com/index.php?title=Matchmaking
|
|
|
| Report Abuse |
|
|
CamoNoobX
|
  |
| Joined: 27 Jan 2011 |
| Total Posts: 268 |
|
|
| 14 Jan 2017 02:42 PM |
@TimeTicks This is not cross-server. I would want to make a cross-server system, but it seems like datastore OnUpdate can be inconsistent and it might be kind of buggy.
|
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 14 Jan 2017 02:46 PM |
youll need to test outzide of studio
the change isnt always immediate.
|
|
|
| Report Abuse |
|
|
Lightlimn
|
  |
| Joined: 09 May 2010 |
| Total Posts: 4079 |
|
|
| 14 Jan 2017 03:21 PM |
| Yeah, it is cross-server. Seems to work quite well actually. It's just that OnUpdate isn't great at the moment. It did work somewhat, though. Basically, I have an ################ of queue names(random 15 character strings), and I search for one with a certain priority depending on what I'm looking for. From there, I use that queue key to search for the full queue on a normal data store which has all the information - players, maxplayers, queue name, priority, queue holder etc. But again, it's not working well because of OnUpdate. I think it is to do with how often I'm using it, but there doesn't seem to be an easy way around it. Eventually I'll shift over to HTTPService for it and set up my own thing there, but that requires a lot more effort than I want to put in at this moment, and isn't necessary for this right now. It would be if more players were on, but there won't be many right now. |
|
|
| Report Abuse |
|
|
Lightlimn
|
  |
| Joined: 09 May 2010 |
| Total Posts: 4079 |
|
| |
|
|
| 14 Jan 2017 04:10 PM |
| I actually tested the latency between the OnUpdate times, and it was exactly 30 seconds behind every time. Try using HTTPService for a matchmaking system if it's too laggy. |
|
|
| Report Abuse |
|
|
Lightlimn
|
  |
| Joined: 09 May 2010 |
| Total Posts: 4079 |
|
|
| 15 Jan 2017 05:15 AM |
| Yeah, I will do soon. It's a shame that it does that, though. |
|
|
| Report Abuse |
|
|