Skip to main content

arc play

Play a game.

Usage​

arc play [game] [options]

Positionals:
game Game handle or ID [string] [default: "self"]

Options:
-r, --release Release channel or version [string] [default: "production"]
--browser Open in a web browser [boolean] [default: false]
-j, --json Format output as JSON [boolean] [default: false]
-q, --quiet Output only errors [boolean] [default: false]
-C, --cwd Set the working directory [string] [default: "."]
-h, --help Show help [boolean]
-v, --version Show version number [boolean]

Description​

Plays a deployed game.

arc play                    # this project: production, or staging before the first release
arc play -r staging # the latest prerelease
arc play -r 1.2.0-beta.1 # a specific version
arc play star-drift # any game, by handle or ID
arc play --browser # play.arcadible.com instead of the app

With the default self, the game is the current project's handle, or its id when there's no handle.

Without -r, it plays production, or staging if the game has no production release. It aborts with Game not found: … when the game isn't on Arcadible, which it checks for another game and, without -r, for self. If Arcadible can't be reached, it plays production. --release takes a channel (production or staging) or an exact version, and maps to the play URL:

https://play.arcadible.com/star-drift/                 # production
https://play.arcadible.com/star-drift:staging/
https://play.arcadible.com/star-drift:1.2.0-beta.1/

Builds can't be deleted one by one, and each stays playable at its version link until its game is deleted. To roll back, deploy the earlier code again with a new, higher version.

By default the game opens in the Arcadible app, using the game's orientation: from your manifest with self, or from its latest production release otherwise. If the app isn't installed, it opens in the browser instead.

It prints where it opened, and the URL:

$ arc play
Opened in the Arcadible app.

https://play.arcadible.com/star-drift/

When it falls back to staging, it says so first, on stderr: No production release yet, so opening staging. With --quiet, it prints nothing.

Output​

It prints where it opened the game, and the URL. With --json, it opens the game all the same, and prints both:

{ "opened": "app", "url": "https://play.arcadible.com/star-drift/" }

opened is "app" or "browser", or null when it couldn't open either, which still exits with 0: open url yourself. url names the channel or version it plays, so a fallback to staging ends in :staging/.

CodeWhen
0The game was opened, or its URL printed
1The game wasn't found, there's no handle or id, or the project's files can't be read