Dev Blogs

All About Cloud Data!

Hey readers! Today we’re going to talk about one of the newest features in our User-Generated Content ecosystem: Cloud Data Variables, which came out of beta this week! This is a huge step towards enabling our great Rec Room creators to create experiences with a greater sense of progression, replayability, and permanence.

This post is going to also dive into some bits of Circuits V2 terminology, and assumes you have some familiarity with Circuits V2 or have read The Circuits Handbook post from several months ago.

The Reason

Previously, creators have had two kinds of variables at their disposal: Instance and Synced variables. When using Instance variables, each player in the room has their own value for that variable. For example, if I had an Instance integer variable named Apples, my own value for it could be five, while another player’s is three. For Synced variables, all players in the room share the same value, and our networking system broadcasts any changes to the other players. Whenever a player leaves a room, the game no longer remembers any of the values that these two kinds of variables had. 

We want to help people build the kind of games that players come back to over and over again, and bigger games that let you travel from room to room as you explore different corners of a world. Saved data is a natural part of that! We’ve been watching some of the most ambitious creators wring every drop they could out of Leaderboards to let people save their progress, so providing an official way to track things like quest gold, XP, or which rooms a player has visited was a natural next step.

We started out with this core idea: Saving values in rooms. Knowing that we’ll eventually make a leaderboard V2, we came up with two very different angles that we could approach this from: saving values to room instances (and giving players a way to manage their saved room instances, sort of like a save file in a Minecraft world), or saving room values to each player in them. Weighing the pros and cons of each, we decided that we saw more potential use cases and a better user experience for the latter, and started designing what started out as “Per-Player Persistent Variables,” and what would eventually be called Cloud Data Variables.

The Method

When designing a new feature, we focus on defining what the goals are for adding it to the game. These usually go through several iterations, and after such we landed on a few key driving goals and non-goals:

Goals:

  • Allow creators to build rooms with per-player data that persists between sessions and across subrooms

  • Persistence is implemented as low level building blocks that are agnostic about scenario

  • By default, players don’t have to think about loading their data (unless a room creator says so)

  • MVP approach: start with a small system upon which we can build later

  • Intuitive to use on room load (i.e. no weird timing issues with data becoming available)

    • Have data loaded by PlayerJoined event

  • Doesn’t contribute to crashing on room load

  • Avoid hammering the server with constant save requests

  • Creators can tell at a glance when something is persistent

  • Creators can see what persistent values exist in their room

Non-Goals:

  • This is not an attempt to replace leaderboards - that will be a separate effort later

  • We’re not solving things like “items persist across subrooms” directly, but instead giving creators the ability to do this themselves

Once we had gone through several iterations of those goals, dozens of rough sketches, and a ton of thought experiments, we were finally ready to start developing. One server engineer built the back-end, creating the databases needed to house both player save data and the data for each room to track their data across subrooms. A client engineer came through and then built up all of the in-game content, hooking into those saving and loading events and making sure that all of the data got properly piped through Circuits V2. The designer iterated with the UI team to go from the sketch that you see above, to the menu that’s in the game now.

After a couple months of hard work, iteration, testing, bug fixes, a beta release, and more bug fixes, we were finally ready to bring the feature out of beta!

The Result

Cloud Data Variables make it possible for creators to save the values of individual players for the next time they come back to the room. Once a variable is set to be a Cloud variable, at first it will behave just like an Instance variable; circuits can set the value just like any other Instance variable, and each player in the room will have their own personal value for it. The magic happens once the player leaves the room and comes back; when the player leaves the room, they will send up to the server a list of all of their values for variables in the room, and when they return to the room, they will load that list back up and put all the values in the right places. Let’s see what that looks like in action.

Here we’ve got a button that increments an integer variable. Every time the button is pressed, we increment the value by one, and send the user a notification about how many times they’ve pressed the button.

We also wanted it to be easy for creators to tell, at a glance, which of their variables are Cloud Data variables, so the variable will gain a small icon of a cloud in order to make it easy to tell without having to go into the config menu.

With Cloud Variables, we can now store this number, and know that when the player comes back to this room, their value will start at what it last was. There are so many exciting ways that creators can use these values: logging how much time you’ve spent in a particular hangout room, opponents knocked out in a PvP map, enemies defeated in a quest, and so many more that we haven’t thought of, but you will!

But that’s not all! Creators have been asking us for a way to share values like this across different subrooms, and these Cloud Data Variables do exactly that. When you create a new Cloud Data Variable, it not only gets defined for the current subroom that you are in, but it can be used across all the subrooms of your room. With our example above, that means that we can read out the number of times the button has been pressed in a different subroom!

In order to keep track of all the places that you are currently using a Cloud Data Variable, we even have this new handy-dandy settings page that you can access to manage your data!

image7.png

This menu gives you a quick way to see where all of your Cloud Data Variables are currently in use. If you’re no longer using one of the variables in any of your subrooms, you’ll be given the option to delete it, clearing up space towards your limit of Cloud Data Variables for the whole room. If the variable is still in use, you can also Reset the variable. This will invalidate all existing data for that variable name, completely wiping all the data for all users of the room. Use these tools with care!

image4.png

If you want to check out what it feels like to play in a room that uses Cloud Data Variables, check out ^GourmetGarden, which was built on top of this tech in order to allow you to plant your seeds, leave, and come back to progress having happened while you were away!

image3.png

There are some limitations on Cloud Data Variables though. In particular, you can only use them for the same types that can currently be Sync Variables: booleans, floats, integers, quaternions, strings, and vector3. In addition, we ran into some interesting technical limitations on the Circuits V2 side; because of how we had built our previous systems for Variables and Circuit Boards, we realized during testing that there were a handful of bad states that you could get into by placing Cloud Data Variables inside of Circuit Boards, and had to limit Cloud Data Variables to only be used at the room level for now.

I’m so excited to release this new tool to all of you, and even more excited to see and experience what you build with them!

Making Mobile Launch Speedy

Have you used Rec Room on an older phone and found yourself thinking about checking social media while watching the progress bar slide across the screen? We find that frustrating, and I’m sure you do too! We know that Rec Room’s launch speed isn’t what most people expect from applications on their phone, especially on older devices. And mobile devices are an important platform, even more so with the recent Android launch. To get players into the game as fast as we can, the Platform team here at Rec Room set out at the beginning of May this year to understand what was taking so long and what we could do to speed things up.

Copypasta!

Have you ever wanted to copy something? And paste it over, and over and over again?

Well now you can, in Rec Room!

While Rec Room has had the clone tool for a while, we’re thrilled to bring official Copy/Paste support to everyone.

Copy/Paste is a great way to well… copy… and paste! Unlike the clone tool, Copy/Paste lets you paste whenever and wherever, not just next to the selection you copied (though the clone tool still has many excellent uses!).

A Real Pane in the Glass

Glass!

Yz2jsNj - Imgur.gif

Glass is something we’ve talked about a whole lot over the years. It’s been one of the most consistent requests from creators, brought up in every Q&A, and is something we’ve wished for on the team as well. We’re super excited to finally give our creators an easy and fully-supported way to make windows and water and more, without a giant martini glass or hacky strings of CSS.

For more info on how to use the new glass prop, check out:

We put a lot of love into this little cube, and we can’t wait to see what you make with it! But I know glass has been a long time coming, and it looks a little different than what we said we were shooting for, so I wanted to talk a little bit about why we’ve made the decisions we have, and what we hope for in the future.  

Under the hood

We’re doing a little bit of movie magic here to make sure the glass looks nice and shiny everywhere. Some of our base rooms have lush, detailed reflection information built into them from their RRO days...and some of them don’t, because we don’t know what you’re going to build! But a reflective material only looks as nice as what it’s reflecting, so the glass was looking pretty flat in the Maker Room at first. 

We don’t want a reflection that’s blatantly fake - but we don’t want it to be empty, either. So as part of our fancy shader, we’re piping in a little bit of nonsense data that will mix with the colors from the SkyDome chip in the Maker Room. Just enough noise to give it some gleam! 

kcXRG5L - Imgur.gif

Accurate reflection, and fake, respectively!

Why isn’t it a material?

We’ve had a lot of people ask us for glass as a material, and in fact that was our initial approach! Unfortunately, we ran into some issues with it.

When we were talking about glass last fall, we were also exploring ways to make our maker pen geometry render faster. We had high hopes for this work, and among other things, we were trying to solve one of the most pernicious problems with transparent shapes: sort order. (Bet you thought I was going to say performance!)

Roughly speaking, objects are drawn each frame in order from furthest away to nearest, based on their center, so that you see closer objects “in front.” Thanks to some shader magic, merging a bunch of maker pen shapes into one shape container makes them all count as one object for this purpose. That’s why it saves you ink! 

XzWQjcm - Imgur.jpg
v7CuH0O.jpg

Drawing things from back to front isn’t always perfect, especially with really big objects. Let’s say you’ve got a house that’s been merged into one shape container, and you make a little table to go inside it. For most of the places inside that house, the center of the house is closer to you than the center of the table. If the “further away” table rendered first, and the “closer” house rendered on top of it, you wouldn’t see the table at all. It might flicker in and out depending on where you walked. The results would be weird and really obviously wrong! 

F1BeliX - Imgur.jpg

For opaque objects, there’s a “depth buffer” to make sure that if half of an object is hidden by something else, the stuff that’s hidden doesn’t get drawn, no matter which object is actually closer to you. This depth data means that it doesn’t really matter what order things get drawn in, except for optimization. 

SlUGZ9D - Imgur.jpg

However, you can’t use this for transparent objects. They have to be drawn back-to-front or they look wrong - since you can see through them, there’s no faking it with a depth buffer. We found ourselves in the situation of having a house with glass windows, with a glass table inside it, and being unable to ensure that they’d draw in the right order.

There are ways to solve this, but unfortunately, we haven’t found a solution yet that runs well on all of our platforms. We aren’t finished exploring rendering options, but it’s a long term effort, and it became clear that waiting would mean you guys had to go much longer without glass. And we really wanted to get you something fun and useful sooner than that! 


ghPnANZ - Imgur.gif

What’s next for glass?

A real glass material is still on our wishlist! We’re also starting to discuss ways to let creators set up custom reflection information for their rooms, which will improve the accuracy of glass reflections and metallic surfaces, and generally make all of the lighting look nicer. We hope to continue to make glass more expressive, and to that end, expanded configuration options are coming very soon to let you enable decoration mode and remove the collision. And if you have any other glass-related requests, we would love to hear them!

Audio FX zones!

But wait, there’s even more! Also introducing: Audio FX Zones! A resizable gadget that modifies sound within its invisible volume. 

xtOQUeF - Imgur.gif

One of the delights we’ve had in creating Rec Room quests is the environmental storytelling we get to do. Sound plays a critical role in immersing you in these rooms. We wanted to give you the same power to bring players into special audio environments in your rooms, like how we take you into space in ‘The Rise of JumboTron’ or take you underwater in ‘The Isle of Lost Skulls’.

You now have the ability to make a great throne room with heavy echoes, or a misty field with muffled sounds, or a partially flooded submarine where you move in and out of underwater sections and metal corridors with creepy reverb. 

To enable this, we’ve included our first implementation of Audio FX zones. Using the maker pen you can find Audio FX Zones in the ‘gadgets’ and then ‘other gadgets’ section. One of our use cases for the Audio FX Zones has been to let you tell the story of a complex place through how it sounds, which means you need lots of capability with the shape of the volume.

You can use all of your regular tools to scale, move, and rotate volumes to fit most spaces. We’ve also added in the ability to make spherical Audio FX zones so you can fit curved spaces as well.

Sometimes, you’ll find yourself overlapping these zones, which is why we’ve also included a priority section. This will let you set some zones to higher priorities, so in case you’re standing in an overlap, you’ll hear the effects of that zone, over others. 

We’re excited to see how you use the different effects, and want to hear what you’d like next! 

Learn how to add extra character to your rooms with audio effects by watching a quick tutorial here!

As always, thanks for playing!

All About Ink

If you’re a creator in Rec Room, and have spent some time making custom Rooms, you’ll have noticed that everything you create in a Room has an Ink cost and there’s an Ink limit in each Room that determines the amount of stuff you can put inside it. If you’ve noticed this, it’s probably because you’ve “run out of Ink” and asked yourself something along the lines of “why can’t I have more?”, and then subsequently things like “why does this or that cost so much!?” or “why does Rec Room hate my creativity??”

I will try to explain a little bit about why the Ink system exists, how it works, and hopefully answer some of these questions.

More Rewarding Rewards

Our main focus this year on the Econ Team is compensating creators for their contribution to Rec Room. Part of the problem with exchanging tokens for real money is potential “botting”, aka farming, of tokens. Besides giving people a way to essentially steal tokens, it creates instability in the economy, and prohibits us from compensating creators. To solve this problem, and to spice up our reward system, we’re introducing/re-introducing a new/old way of rewarding players for playing the game: Items!

ILS on Quest 2

Today is a very exciting day with the new Oculus Quest 2 coming out, and we’ve got a special surprise to share with you. We’ve done a lot of work to optimize Isle of Lost Skulls, and have set it live for Quest 2 players! With this release, we wanted to take the opportunity to answer a common question we get from users:

Why isn’t some content available on all devices?

The Making of Cakes

This week we want to take you behind the scenes of Rec Room’s bakery and give you some back story on how we made the cakes!

Cake has been a long-requested food item so we were excited to bring out a variety of them for our players to enjoy! Last month, we added chocolate and red velvet cakes for the first taste test. However, some cakes are just incomplete without candles. That is why we just added two brand new ones - the celebration cake and the 87 flavor cake, both with candles that can be blown out with your microphone. They are great to share with friends to celebrate special occasions together.

Maker Pen Workshop #1: Tomb Heist! Release

Note: this is the end of 4-part series on Tomb Heist that started with costumes++ and continued with AI features and doors++.

Maker Pen Experiment #1 Recap

Tomb Heist! is the name of the current Maker Pen Experiment we are building internally at Rec Room using only the maker pen. Unlike previous #RRO rooms, Tomb Heist will be released as a community room. As we build it, we’ll be creating and releasing new creative tools.

Maker Pen Workshop #1: Tomb Heist! & Room Doors++

Note: this is part 3 of a 4-part series on Tomb Heist that started with costumes++ and continued with AI features.

Tomb Heist!

It’s been a while, but just to recap what Tomb Heist! is all about:

Tomb Heist! is the name of the current Maker Pen Experiment we are building internally at Rec Room using only the maker pen. At the end of the project, this would not be released as an #RRO, but rather a community room. As we build it, we’ll be creating and releasing new creative tools.