Data Stream

Pushing ROBLOX Place Data Faster Than Ever Before

Data StreamHave you noticed that you’ve been jumping into ROBLOX games quicker? That’s because our networking team has been hard at work exploring ways to make our network more stable, secure, and most importantly, fast. After a ton of experimenting, we’re pleased to report that our network is the fastest it’s ever been–our data is faster and its footprint is smaller, and we’re continuing to make tweaks and enhancements. We tapped ROBLOX Software Engineer Yunpeng Zhu to tell us how we got there.

ROBLOX has sped up dramatically thanks to a couple of changes we’ve made in our networking infrastructure. A few of these changes were very simple, while some of them became extremely complex–it’s difficult to gauge how much faster ROBLOX is running because it’s not entirely dependent on networking, but the hardware users are playing on.

In order to speed up our network data, we kept asking ourselves, “how can we push everything out from the server as fast as possible without degrading performance?” Caching and Compressing are the easy answers, but we’ll get to that.

When a player joins a game, our servers have to transfer the current state of the place to the new joining player. The server collects all the parts of the place (scripts, services, objects, etc.) and translates that information into a “bit stream” of data ready to be fired out across the internet.

We’re always working to push out more data at a faster speed from our server to our clients. The more bit stream data (network representation of objects in a game) we can cache, the less we’ll have to recreate for each newly joined player. A big development was the idea of only having to load network representation of data (like a place in ROBLOX) just once, as opposed to having to recreate bit streams every time a new player enters the game. Now, the second another player enters a game, we can re-feed the already created bit stream back to that player. Our new method of compression will allow us to do this.

Our current compression method, which we’ll refer to as the “dictionary” method, takes words and indexes and catalogs them, individually shrinking the text portion of the data in any given place. We then send the indices, instead of the words, which use less bandwidth overall.

Happy HomeOur dictionary plays a large role in decreasing the amount of data in a place, because it allows us to swap out long words with short numbers. If you’ve got a level with 2,000 parts, each part has several letters in their names (i.e. “smooth part”). That’s eleven characters. Multiply by that by 2,000 parts, and you’ve got a ton of data floating around. Our dictionary lets us characterize it with a number that uses far fewer characters. This drastically reduces level data payload–just using the dictionary alone, Happy Home was reduced from a 7 megabyte place to a 1.5 megabyte place.

Problem is, dictionaries aren’t synchronized across clients; they’re in flux, constantly changing as players enter games and change the environments. The number that corresponds to “Part 1″ to the first player in a place is radically different than the corresponding number to “Part 1″ to, say, the fifteenth person who entered the place. And because ROBLOX environments change dynamically (and because any user can change them at any given time), each user “dictionary” has similar words in it, but the words are in a different order.

We turned off dictionaries in an effort to cache all the data–doing so had two very powerful effects: On a positive note, caching all data meant we didn’t have to recreate the bit stream for each new player. On a negative note, lack of compression made the size of our game data way too large–no compression whatsoever means our servers would have to send entire entries in every instant, every time a new player joined the game. This would require an unreasonably high amount of bandwidth.

Basically, we discovered that compression is entirely necessary, we just needed to find a new method of compression that would limit the size of our data in a singular, uniform way. For this, we’re turning to zlib.
Zlib is a standard compression technique that does an awesome job of finding repeated patterns and efficiently encoding those patterns. It’s a proven industry tool that’s been utilized by several big names in the gaming hemisphere, including Sony (PS3) and Microsoft (Xbox360). Zlib won’t be completely substituting our dictionary system, it will be supplementing it, focusing primarily on “joining” player data. We’re going to start utilizing zlib in a few short weeks, and we’ll be sure to keep you posted with the performance data we gather.

45 thoughts on “Pushing ROBLOX Place Data Faster Than Ever Before

  1. Kitteh Ellis

    Fantastic job developer team!
    Now, how about working on those ‘Beta’ features that have been in beta for about a year, at least, now, hm?

  2. Cade1307

    Also, will it be possible for NBC’ers to see our custom advertisements while joining a game?

  3. crabbybuildingblox

    I can’t wait until technology is so advanced there’s no such thing as lag.

    1. Anonymous

      i cant wait until they get better computers so like no lag or anything like a new apple computer

      1. cvbm4

        There is a Problem With Mine, It Freezes at times like a Car. I Am Building on the First minute, Then it Turns into a Mess.

  4. TheCrazyGuyWithAnRPG

    You are using the same software as Xbox and Playstation? Why don’t you make Roblox for that? I would happily go to the store and buy an Xbox gamecard JUST to download it. Plus, we could buy Robux and BC with Microsoft points! And for chatting, you could make a small Roblox keyboard that attaches to your controller. I have one already, but people would like to get one to use while playing the game. I know this will probably go ignored, and I am going to get a lot of replies on this, so send me a Roblox message to TheCrazyGuyWithAnRPG

    1. Liam

      No, Sadly that is usually because of the hardware you are using. Try getting a new, faster computer or maybe check your internet speed.

  5. Jammintoad

    Does this mean that making names of parts shorter in game would speed up the join time?

  6. RubiksCubix

    Awesome to see. I enjoy watching experimentation with different types of data storage and compression. This will lead up to a cool update.

  7. pinopoly1

    …NO! it takes forever to join a game. A few years ago i would INSTANTLY join the game…

  8. Leb747

    I look forward to seeing games like 1dev2’s Welcome to the Town of Robloxia Move much Faster!

  9. supergokurocks

    This is very good. Congratulations on improving the place join itmes! I knew you could do something like that! ;)

  10. MeGaLoVania

    When I was in the game “Destroy the wall (roughly 4 years)” every few seconds every brick in the game would be transparent, including characters, and all you would see was the skybox, could this be a result of the update?

    1. icrawler

      No, that is not the result of the update. It’s the result of too much scripts running simultaneously at a small area.

  11. Superdogiepoop

    In 2012 it took me 30 seconds to start the game. Now it takes like, 6. Good job, roblox team! Keep it up!

  12. xjr8665

    I believe That is great but If the Storage units and access computers should use the Tesla™ M1060 Processor Not only would data flow be faster but processing would be way faster if ROBLOX is investing and buying new technology this would be a good buy. the Tesla M1060 processors deliver super-computing performance while requiring less power and space.This means while getting the fastest data flow you also conserve energy.

  13. dizzypokemondude2

    How unfortunate considering I can’t play game because there’s an error that pops up

Comments are closed.