Forum BigDB Potential 'lag' retrieving information

Discussion and help relating to the PlayerIO database solution, BigDB.

Potential 'lag' retrieving information

Postby happygiant » July 8th, 2014, 11:45 am

Is it possible that people in Vietnam/Philippines or other far places around the world get potential lag retrieving information? If so, how can I prevent this issue?
happygiant
 
Posts: 2
Joined: November 11th, 2013, 8:55 pm

Re: Potential 'lag' retrieving information

Postby AquamentosGames » July 8th, 2014, 3:31 pm

Distance on the internet is not quite the same as distance in geography. It's usually measured in how many connections data has to go through.

Areas that are more technologically remote (such as Vietnam and the Philippines, as you suggested) or even rural areas in North America tend to have a higher latency than major cities that are part of the core internet hub.

There is no way to 'prevent' latency. Even in areas that are well connected, some types of connections (such as DSL internet) get 'clogged' when a lot of users are using them at the same time (peak times - like right after school gets out for the day).

Worse still, the higher the latency the greater the likelyhood of packet loss or corruption. I don't know how well the Player.IO sdk handles these issues, though I have never seen lost or corrupted data, so there may be some error handling there.

As a developer, your only solution is to try to try and offset latency in your game by predicting what is 'likely' to happen and then correcting it if what actually happened doesn't match. (This is why some games have a bit of 'rubber banding' where you'll move and then 'snap' to a different location because the server and client don't quite agree. It's better to 'smooth' the correction over a period of time rather than snapping in my opinion)

I found this thread on Stack Overflow which offers many useful ideas and articles to read that might prove useful.
http://stackoverflow.com/questions/4251 ... rked-games

As far as BigDB goes, specifically, simply design your code so as not to need to objects right away. Load them before you need them. If you are loading enemies or map information, load them while they are still offscreen but when you know the player is headed in that direction. That way when the player does need them they area already in memory.
AquamentosGames
 
Posts: 27
Joined: December 9th, 2011, 12:44 am


Return to BigDB



cron