Introducing the new & improved Emulator!

I am really excited to share about my first major project here at ROBLOX: a suite of upgrades to Studio’s device emulator.

Our goal is to make it quick and easy to test playability of your game across all modern devices: layout issues, readability, etc.

Changes include:

Comprehensive Device List
Previously an arbitrary list of devices.
Now a complete list of relevant iOS devices, plus sample Android tablet and phone devices.

Resolution
We give a screen resolution for each device.
Note this is the resolution our game will run in on that device, not necessarily the resolution of the device screen.

Scaling
You can view devices in “actual pixels” (if a 640x480 device will take up 640 x 480 pixels on your screen), or in “physical size” (We present the screen at approximately the size it’d be in real life, in inches).

Scrolling
When you opt to emulate a device whose screen is larger than the viewport widget in Studio, Studio adds scroll bars to pan around the viewport area (as opposed to just growing the entire Studio window to make room for larger viewport).

Wireframe
We provide a wireframe around our core set of mobile devices, to provide context on how the game will look and feel on an actual device.

Mobile UI
When emulating a mobile device, the “laptop” input controls are disabled (WASD keys, right mouse to look around) and the “mobile” controls are enabled (d-pad, jump button, left mouse (swipe) to look around).

Scripting accuracy
When emulating a mobile device, the UserInputService functions and values act as they would on a mobile device (GetLastInputTupe, XXXEnabled, TouchStarted).

I hope you find all this helpful: send your feedback!

Doug

33 Likes

This is awesome! However, the scale to physical size does not seem to be accurate for me.

Edit: My screen is 12.3" with a resolution of 2736 x 1824 (267 PPI) and a 3:2 aspect ratio. The device being emulated is the iPhone 6 Plus, however all of them seem to be too small.

Thanks! Congrats on being First Responder.

Yes the Scale To Physical is based on an estimate that studio is running on a screen that’s around 110 DPI (it is suprisingly difficult to get DPI dynamically).

We have a to-do item to add a widget where you can specify the DPI of your machine: then Scale to Physical will be much more accurate.

6 Likes

Will the mobile emulation ever be updated to simulate the actual memory limitations of mobile devices?

Thats definitely one thing I run into a lot with mobile support on my game, and I’d like to see if theres anything I can do to help reduce my game’s memory usage.

2 Likes

This looks really nice! I like the wireframes around the viewport and the option to make it approximately real-life sized.

It’s also nice that the emulator uses the in-game display size of ROBLOX where appropriate, and not just the raw screen size. Not sure if it did that before, but that’s cool.

@Maximum_ADHD
Great question.
We looked into that and it’s just not practical. There are so many quirks, so many devices out there: to try to simulate actual performance would be just overwhelming. (By comparison, even XCode’s device emulator makes no effort to emulate performance based on the device being emulated).

On the upside, you can check out my OTHER main project here, the new Performance Stats widget.

While running the client on any device, open up “Settings” (Hamburger menu in blue top bar, Settings), scroll to bottom, turn Performance Stats on.

You should see some little widgets on the top of your screen giving real time info on CPU, Memory, etc.

We plan on adding more features to this in the coming months. But hopefully even this preliminary version should offer some insights.

1 Like

Oh my god this is wonderful. It makes developing UI for mobile a lot easier and removes a lot of the guesswork involved.
Also being able to use the emulator as though it was the device with the onscreen controls and UIS stuff is awesome to finally have. No more jumping into the ROBLOX app, finding a problem, republishing the game and testing again.

I do have a question though: Both Physical Size and Actual Resolution both show the UI scaled in the same way, except (for me) Actual Resolution shows the screen as larger. Is there any reason to use one over the other?

2 Likes

While emulating a particular device, I think it’d be nice to set the target usage (forgot what it’s called specifically) in Performance Stats to what’s appropriate for the device being emulated.

@MasterDaniel
Glad you like it!

PhysicalSize: assuming your screen is around 110 DPI, this is about how big the screen will be in terms of inches. It gives you a sense of how the game will feel in real life.

Actual Resolution: this is the actual number of pixels you will have on the device. Most devices are more pixel-dense than screens on laptops.

So suppose your game renders some text to the screen.

The “Physical Size” gives you a sense of how big that text will be when the game is actually on that device, like in inches.
But the “Actual Resolution” gives you a sense of how many pixels will be used to render the text: the text in the “Physical Size” version might be scaled down to fewer pixels.

@EchoReaper
Yes, optimally so.
Current targets are very rough ballpark.

Some really great steps forward for mobile development! I’m very excited about these changes.

Is there work being done on the Developer app that allows us to test locally on our devices?

2 Likes

Awesome, thanks for clearing this up :smiley:

omg I’m already loving this!

1 Like

It looks like this has introduced a white 1px border around the viewport when device is set to default. It does not show up while emulating other devices.

3 Likes

Is there any way we can somehow get the value of ro.product.model on Android? This will allow us to create device specific UI.

Why does the iPhone 5/5s run at a higher resolution than the iPhone 6 or 6 Plus?

Good question.

I will look into it.

I don’t have an iPhone5 handy: could someone tell me, if you run this game:

what screen dimensions does it print out?

And/or could you tell me what ScreenGUI.AbsoluteSize is on an iPhone5?

That’s the value I need.

No work is being done at the moment but we are looking into it for next year.

3 Likes

Top is iPhone 7 Plus
Bottom is iPhone 5

Thanks for the screen shots.

I will look into this. It seems that the same devices are giving different sizes. Not sure why.

1 Like