Accurate Play Solo

Accurate Play Solo

Summary

Currently, Play Solo executes both client and server code in a single data model.

With Accurate Play Solo (APS), we simulate using two separate data models (one client and one server) communicating over http.

This provides our developers with a much more accurate picture of how their game will execute in production: “Non-Experimental Mode” can be enforced, RunService::IsServer and RunService::IsClient will return the correct values, etc.

While emulating, you will see a control to toggle your view between the two data models.

We use a blue/green border on the main tabbed view to indicate current data model, and messages to the output window are also a tagged blue/green depending on source.

For the short term, APS is opt-in: go to File->Settings->Studio->Advanced, check “Use Accurate Play Solo”, and restart Studio. This will ultimately become the default and the existing Play Solo will be removed.

Caveats:

  • Each “view” (Edit, Play Solo Client, Play Solo Server) has its own state regarding which scripts or plugins are opened. When switching from one view to the other, we will close all plugins/scripts associated with outgoing view and attempt to re-open/restore any plugins or scripts associated with the incoming view.

  • The debugger will only work on the Server data model.

  • Diabolical mode doesn’t do anything in APS.

Flavor Text

Gather ‘round young’uns: sit down by the fire, take a nice molasses biscuit and hear the tale of how Grandpa added support for accurate play solo (APS).

Now you young whippersnappers grew up with APS, but let me tell you there was a day when developers running play solo had to run everything in a single data model! A SINGLE DATA MODEL I SAY!! Client and server functionality all shoehorned into a single data model, violating the laws of nature and good sense and all that is holy. A script that should run on the client could create objects! A script that should run on the server could affect the GUI! Oh, it was terrible times.

Then Grandpa hitched up his breeches and got to work! He worked for days, weeks, months even, wrasslin’ that code into shape. He also had to wrassle a bear, but that’s another story…

When he was done, and purt near tuckered out, there she was: Accurate Play Solo!

Keep in mind, of course, that APS was an option: they had to open up Settings/Studio/Advanced and turn it on!

But once they did, hoo-ee!!

  • Play Solo now used two data models, one for server and one for client.

  • While emulating, they could use a toggle to switch their view from client to server and back.

  • The main tab control had a colored border indicating whether they were in client or server.

  • Messages written to output widget also had a colored stripe indicating whether they came from client or server.

  • Emulation now properly reflected a real distributed environment: Client scripts ran on Client DM, Server scripts on Server DM, and limitations on who could write what were properly enforced.

Whoops, Micah, don’t knock Cessy into the fire like that….

Of course, there were some changes and setbacks too. The debugger only worked on the server, there was no Diabolical Mode, and each “view” (Edit, Client, Server) maintained its own separate notion of which scripts and plugins were opened.

And what happened next, you ask? Did the developers take to APS like a kitten to a bag of plums, or did they get mad as pig on a merry-go-round?

THAT IS A TALE FOR ANOTHER DAY!!

254 Likes

About time.

This is great!

14 Likes

Thank you, very cool!

11 Likes

Will this version of testing give us a prompt with every version of Studio from the Windows Firewall, like the “Create Server” option does?

10 Likes

Having read several articles on time-managing libraries, I’ve come to the conclusion that I do not understand time. Nevertheless, I’m pretty sure “Tues 8/21” was last week.

7 Likes

I’ll have you know, I find merry-go-rounds quite amusing.

This will help tremendously in helping debug my many per-player manager objects used by both the client and server. Thanks grandpa!

8 Likes

Make all posts in announcements have flavored descriptions.

  • Yay
  • Nay

0 voters

11 Likes

I was even able to set a keyboard shortcut for switching between server/client! Awesome!
Less awesome: I can’t find a way to add the switching action to the Quick Access bar? Is this a bug? Or is this something that is planned but not yet implemented?

3 Likes

Accuracy is sweet, and sweet is tasty! I look forward to testing with efficiency.

And man, you need to pull us by your campfire for some developing tales, smores on me!

8 Likes

I don’t think you guys recognize how huge of a change this is. This is easily one of the most impactful updates for Studio in the past couple of years.

  • No more “it works in Studio but not in-game”
    • Find errors as soon as you test instead of until you spin up a test/live server later
    • No more mass confusion from new users WRT this
    • No more scripting support questions for this
  • No longer need to use slow test server unless testing with multiple players
  • No more having to write special logic for scripts/plugins to run where client/server are the same

Having used this for some time, I refuse to go back to legacy play solo.

Nope, it’s pretty seamless – you might not even notice it’s enabled if someone switches the setting while you’re not looking. You can tell Studio engineers put in a ton of effort to this, as there are no tradeoffs whatsoever for accurate play solo.

62 Likes

This feature is incredible & this post is incredible.

16 Likes

Thank you for this! Also great post lol! :smiley:

3 Likes

Amazing to hear! I remember the mix of opening that new server, opening the new client, AND being hit with that prompt leaving my computer at an absolute chug. Time to turn it on and say goodbye to Legacy!

4 Likes

This is my favorite post, not only because I’ve been waiting for APS, but because of the tale

10 Likes

Yes, the legend is back! :smiley:

5 Likes

Sounds great, just hoping that there is little speed difference between APS and old PS (for the slower PCs out there).

Mmmm, flavored text. Delicious.

2 Likes

My bad. Fixed.

6 Likes

Fantastic update. Any chance that test servers could be revamped to use this? I’d love to test multiple players without slowly booting up a bunch of entire studio windows.

4 Likes

I love this feature! Just a small design suggestion:

Seeing as we identify studio with a blue version of the Roblox logo and the client version is identified with the red Roblox logo, should we not use those colors to more intuitively identify which data model we are viewing?

16 Likes

This is great, allows us to test in studio without having to join the game separately to test for bugs.

Thank you!

2 Likes