So, I just spent all of the hours cobbling this together. It’s a website that synchronizes with my Roblox game in order to display your in-game location on another screen, whether it be a second monitor, a mobile device, a toaster, whatever. It still needs a lot of polish, but I need a lot of sleep first, so I’ll just leave it here for you all to look at.
Pay attention: a 6-character code will appear at the top of the screen in Roblox
4 ) Input said code into the text box on the top left of the website
Now, play ZDale, and watch as your GPS magically updates on the website.
Alright, it’s 2:30 in the morning, I’m exhausted, my head hurts, and I’m bleary eyed. I’m going to bed, I look forward to seeing your opinions in the morning.
Already do. It batches all the player coordinates into a JSON table, which it sends 5 times per second. That leaves 200 requests/minute for other stuff, like generating the code when a player joins.
Already do. It batches all the player coordinates into a JSON table, which it sends 5 times per second. That leaves 200 requests/minute for other stuff, like generating the code when a player joins.[/quote]
5 times per second seems a bit high. I’d go with once or twice per second.
Yeah, I just used the rate I was using in the in-game GPS. I’ve already dropped it to 4, will likely go even lower.
For those curious about technical details, the server is written in Golang and running on Google App Engine. When a player joins the game, Roblox sends a GET request to the server, and the server sends back the 6-char code. The reason for using the code instead of a username is to prevent players from being able to snoop on other players. Meanwhile, Roblox continually sends a JSON string containing the locations of all the players in the game to the server, which keeps them in memory long enough to relay them to the javascript-powered site.
There’s still a lot to be done before releasing this to the general public.