Incredibly high ping on my game, what could be the issue?

Recently i’ve been having reports of a lot of lag and very high ping on my game IttyBittyAirport.

I personally haven’t had huge issues but have received reports from people with very good internet and PCs. Some people were getting a ping of up to 900ms.

I believe that one of the issues is my server side pathfinding algorithm. Each player has their own server script which runs every 4 seconds and goes through a recursive pathfinding function and some other bits to see if a plane can land and make its way to a jetway.

If it can, the path of nodes is passed to the client and planes locally move around the tarmac.

I’m happy to go into more detail, but does anyone have some idea of whether or not what i’ve described is what is causing the really high ping issue (having 4 scripts looping every 4 seconds) or if it might be something else?

I’d really appreciate it if someone could also assist me with what causes a high ping on Roblox as Google isn’t doing me many favours. The unnoficial wiki claims that ping is purely due to the client but i’m not educated enough in this to know better.

7 Likes

If its ping then I’m assuming your server is being overloaded, if its FPS drop then its most likely your map, etc…

With this much information we can’t help you very well, do you have any examples of when a users ping rises?

4 Likes

Sorry the question’s quite vague. There’s just so much going on in a server at once.

Apparently the ping is just high 24/7. The server is constantly running path-finding algorithms and processing 4 plots being manipulated by their owners all at the same time.

I have considered moving algorithms to the local user but there are multiple exploiter issues I would have to deal with as well as these scripts lagging the client’s PC.

One of me theories is that ping is high in servers where every player has a very large airport. But I cannot confirm that.

I’m happy to invest in a less intensive path finding system but would like to double check first that it’s what is causing the issue. The recursive function can often go a few hundred layers deep for some airports but it shouldn’t branch out that much.

1 Like

If you theorize this you could setup a test server full of large airports and constantly watch your script usage as well as looking at the memory profiler / other tools which could help see where the root problem is.

If you say it’s high 24/7 then it’s possibly a high script usage is causing delay but I can’t confirm that off hand.

3 Likes

The ping could be the amount of parts in the game, the size of the game’s map, or the amount of scripts that are currently being executed. Looking at the game, I’d say it’s the latter. Where and if possible, condensing the scripts could help.

1 Like

I believe its most likely because everyone has a very large airport and the amount of scripts that has to run, causes it to lag? Are you the only one experiencing it? Or is every player aswell?

1 Like

Appreciate your concern however not a single free model has been inserted into my game, nor has it ever been open on team create with other devs. The only way a backdoor could be in the game is via a plugin however I am fairly certain they are all safe. I’m still fairly certain the lag is due to the large amount of server side processing so will probably look into improving my algorithms.

So most likely going to have to group lots of things if ungrouped, you can also reduce lag with a script that loads the parts slower than usual ( to make it more precise and reduce lag ) , you can also just full on put anti-lag.

This kind of fear mongering is very harmful to the community, and drives panicking players into the hands of malicious plugin creators more than anything.

No Roblox script/model is able to, in any way, interact with account data or cookies. No model/script can in any way interact with the local computer, all of this is sandboxed by Roblox. No models contain code that magically executes outside of this sandbox, and you should never claim so.


Futhermore you should note that anti-lag models are generally useless; there is no catch-all type of lag removal method available and the best thing to do is to look at the microprofiler to figure out a specific case.

9 Likes

How many scripts are there in the game? Try to keep server scripts to a minimum.

I doubt it’s the 4 second function as I have server code for each player which runs every 0.75 seconds in my game and it works fine. Unless it’s a very intensive function.

1 Like

You may benefit from a Fat Client architecture to reduce server load and reducing client-server requests!

High Ping is usually caused by:

  • High Bandwidth Usage - (server & client have limited bandwidth, and if you’re sending many requests they’ll be added to a queue and dequeued once the other requests have passed through. This will increase ping because requests have to be held before being transmitted.

  • High Server Load - If you are eating the (very) limited resources allocated to your server by Roblox, it’ll take more time for packets to be processed and register events, so that’ll increase your ping.

  • Large Hop Count Client <-> Server - This isn’t something you have much control over, but be aware that if packets are being routed via inefficient routes you will encounter a high ping. Generally that is a problem with the clients though, and again all you can do is try and mitigate.

You can mitigate these issues by:

  • Reducing the number of requests you make between the Client and Server.

  • Shifting the processing burden to the client where it is sane to do so.

  • Developing your game so that even if there is a high ping, it is less noticeable to the user. As stated before, you might want to research Fat client architecture, though a takeaway should be that you shift non-critical rendering to the client as this is generally a smoother experience (because the action takes the same amount of time to happen regardless of ping) and reduces bandwidth usage.

9 Likes

This is not the case at all!

Firstly, this user is a professional developer. It is the last resort to assume that there are any sort of virus scripts, and while it’s a minor point to be checked, viruses are rarely a leading cause of latency - especially high ping.

Secondly, I don’t know exactly what you’re referring to by “Grouping” - do you mean utilising the “don’t repeat yourself” paradigm? But as a note if this is not what you meant, grouping models has no effect on efficiency or latency, and a high part count would be very unlikely to cause latency - generally only client-sided lag. Unioning and meshing practices however are useful when used correctly. This video from RDC should describe proper practices for this process.

Finally - Anti-Lag scripts should not be used!
There is no “catch-all” solution to lag - if there was, it’d be built into the game! Often Anti-Lag scripts are malicious, or they actually cause lag.

10 Likes

Thanks for summing that all up. Extremely helpful!

1 Like