Farewell to the OGRE: The New ROBLOX Rendering Engine is Here

March

28, 2014

by zeuxcg


Archive
ApocRising

ROBLOX Engineers used Apocalypse Rising as a benchmark when crafting the new rendering engine. On average, the smash-hit title runs 2x faster.

We’re proud to announce the full-blown release of a custom-built rendering engine, now powering games across ROBLOX. The creation of this engine is the culmination of all we’ve learned from features released in the past year (such as fast and featherweight parts), which were tailored to function within the parameters of our previous rendering engine, the open-source OGRE (Object-Oriented Graphics Rendering Engine). Though we were able to come up with workarounds to achieve all we needed within the confines of OGRE, we began to hit limits on low-end hardware and mobile platforms. We eventually concluded that for ROBLOX to be everything we envision (and our vision is massive), we needed to develop our own rendering system. This was one of the biggest challenges the Client team has ever undertaken — read on to learn about not just the performance upgrades you’ll be seeing, but what this new rendering engine means for you (a lot more than you probably think).

The drawing board

Let’s talk about mobile, since this platform was the driving force behind our early decision-making process. Mobile gaming is a huge market, and we believe ROBLOX belongs everywhere gamers are. Mobile devices, just by virtue of form factor, are slower and less capable machines than laptops or PCs (well, for now). We’re not talking about just iOS devices either — the same is true for Android devices (no promises on timing there, but we’re doing our research). All year we’ve been repeating the same mantra: “We need to be faster on mobile.”

We pushed as far as possible within the confines of OGRE, and we’re proud of what we accomplished with it. (We’ve been using it for the past five years; clearly they’re doing something right.) But when we started to look at the goals and aspirations we had for mobile optimizations in the coming year, what we wanted to accomplish would be impossible without creating our own rendering engine. The idea had been suggested before, but the sheer scope of such an undertaking kept many of us hesitant to pull the trigger. It was finally time. And like any great feature we develop here at HQ, it started with an experiment.

What can we achieve with rendering now? The sky is the limit.

What can we achieve with rendering now? The sky is the limit.

The experiment

Here we go. The question was asked, and many of our engineers (some with degrees so specific they would make your head spin) and I met to discuss how to begin rewriting our entire rendering infrastructure. The first and most obvious question was simple: “What would happen to ROBLOX if we rendered everything ourselves?” We made a prototype that only included very basic components of ROBLOX, but was functional. We studied it carefully. ROBLOX is a complex system — there’s much more going than you may think when you’re playing a casual game of Dodgeball. Stripping our system to the core with local rendering showed us a lot — mostly that the benefits to creating our own engine far outweighed the costs. It was then that we realized, “this isn’t just going to make ROBLOX faster on mobile devices. This is going to make ROBLOX faster, period.”

Farewell to the OGRE

We wrote more code for the rendering engine than any other single project before it. We ran into obstacles and bugs that were mind-boggling — particularly challenging was writing code optimized for the huge range of hardware out there, much of which is outdated or uses poorly written graphics drivers. We had to rewrite most parts of the rendering code that worked in parallel with OGRE. We then slowly released the rendering engine to a random 10% of ROBLOX users and watched, keeping a close eye on any reported bugs. Then 20%. Then 30%. (If you were part of the test group, you probably didn’t even know it!) It was like watching paint dry — a cool analogy if you know that, when it’s finished drying, you’ll find yourself staring at a beautiful painting. We’re extremely proud to announce that today, the picture is complete — and it’s beautiful (if we do say so ourselves). Our new rendering engine is on.

Middle Ocean Island really flexes our graphical muscles.

Middle Ocean Island really flexes our graphical muscles.

In my tests, I found a roughly 2x increase framerate while playing Apocalypse Rising and other games. Your results will vary depending on your hardware (i.e., if you’re already running a blazing fast gaming PC, ROBLOX will just continue to run the same awesome way it always has). Also, keep in mind that this optimized rendering framework is not just about framerate — changing the infrastructure has addressed framerate, join speeds, framerate hitches, and overall loading speeds. What’s more (and arguably even most exciting) is that rewriting our code base means that all of our scripts (like particle effects and ambient shadows) that were formerly dependent on OGRE are now our own, meaning you will be seeing many new features in the future. We don’t want to let the cat completely out of the bag, but soon you will be able to create custom particle effects.

Looking back… Then forward

This was a massive project, and one of the biggest reasons we were able to accomplish this task is because of all of the improvements we’ve made throughout the last year. Each and every addition showed us that we need to move away from restrictions — and that our own custom engine would eliminate them. This simply had to be done.

In the past, we were forced to work around the limitations we encountered. Now, any problem or bug we encounter is our problem. This system means that the ROBLOX internal workload has been simplified and improving ROBLOX graphics will be a much more streamlined process moving forward. This is a big step that we’re proud to have made. Enjoy the new system, and let us know what you’re looking forward to seeing in the 2014 rendering pipeline.