Condense and Compress: Our Custom Binary File Format

Binary CityThink about the performance improvements and rendering features we’ve brought to ROBLOX in the last year. Among them are featherweight parts, fast clusters, efficient collision detection and dynamic lighting. These improvements have crushed the limits – on part count, physics simulation and aesthetic flexibility – builders once encountered and opened doors to a world of possibilities. They’ve also exposed new limits as builders have pushed the boundaries further than ever. In this article, we’ll explain how we’ve achieved an approximately 100x reduction in the file size of ROBLOX places and a 5-10x reduction in load/save time.

Think about featherweight parts. The feature, which now applies to all ROBLOX parts (as opposed to only select shapes and materials), allows you to create a ROBLOX place with tens of thousands of bricks, and have it run on both desktop and mobile devices. However, a place with tens of thousands of parts can result in a very large file. Our test place, which we’ll reference throughout this article, has 50,000 parts and weighs in at a whopping 230 megabytes. That’s big enough to affect builders in multiple ways: rendering, saving/loading, publishing, loading the place from a server and more.

Continue reading
     
 

Physics Performance Demo: Domino Stress Test

As you may recall, we recently published an in-depth article about how we’ve sped up ROBLOX’s physics by 2-4x as a result of modeling collisions using impulses rather than springs. The “impulse solver,” together with three recent bug fixes, has drastically improved the performance and realism of one of our favorite physics-engine stress tests: Ultimate Dominoes! by armitroner. In this test, a single force cascades through thousands of standing parts, causing them to topple in quick succession.

Continue reading
     
 

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.

Continue reading
     
 

Impulse Solver Gives ROBLOX’s Physics a Serious Speed Boost

Big CrashIn late 2012, a significant fraction of ROBLOX developers worked together to make games run on performance-constrained hardware (iPad, iPhone and iPod touch, to be exact). The team set off on an exhaustive hunt for inefficient processes within the ROBLOX source code, then found ways to optimize the problem areas that had substantial performance payoffs. This allowed us to bring the full in-game multiplayer ROBLOX experience to mobile devices in December, but we did have to make a concession: there would not be a destructible environment in ROBLOX Battle. The physics simulation was too resource intensive.

Soon, that’s going to change, as Kevin He has altered the way ROBLOX handles collisions – one of the major components of our distributed physics engine. Better yet, you’re about to see a 2-4x increase in physics performance across all games and hardware.

Continue reading
     
 

Dynamic Lighting and Shadows: The Voxel Solution

Graphics gurus Simon Kozlov and Arseny Kapoulkine have been hard at work prototyping a ROBLOX lighting system that uses voxels to create dynamic shadows and lights that can be placed anywhere. 

A constant challenge for us is improving the ROBLOX world while keeping it scalable–as much as we want ROBLOX to look and feel like a triple-A video game, we have to make sure a wide range of hardware can handle it. With that in mind, we’ve created a lighting and shadows prototype that not only drastically changes the look of our game, but can also run on a range of different machines. In order to create this new look, we’re developing a dynamic light and shadow engine where most of the heavy lifting is done on the CPU (instead of the graphics card) and we’re leveraging a voxel-based data structure to do it.

Continue reading
     
 

Featherweight Parts: One Million Parts, One ROBLOX World

FeatherFeatherweight parts, despite their name, have nothing to do with feathers, flying or anything bird-related. They do, however, have a lot to do with weight: while old ROBLOX parts are “heavy” memory users, featherweight parts are “super light,” allowing us to load and render more of them with the same computing power. The first iteration of featherweight parts has now released for ROBLOX on all platforms and it has already proven revolutionary in some ROBLOX places.

The following table shows the number of milliseconds required to render one frame. In a future release, these numbers will improve even further as we featherweight more materials, surfaces, and primitives.

Continue reading