Publishing a BabylonJS Game to the Chromecast Play Store: TWA, Bubblewrap, and What to Expect
Can you actually put a BabylonJS game on the Chromecast Play Store?
Short answer: yes. But there are two separate problems stacked on top of each other — packaging the game as an Android app, and making sure it runs acceptably on Chromecast hardware. The first is solved. The second is a gamble.
What’s running on Chromecast
The Chromecast with Google TV runs Android TV OS, which means it installs apps from the Play Store just like a phone — including the “other devices” category the forum OP mentions. Those games aren’t magic; they’re standard Android apps built with TV interfaces in mind. A BabylonJS game lives in the browser, so the goal is wrapping it in a thin Android shell that the Play Store will accept.
Trusted Web Activity: the right wrapper
The standard mechanism for this is a Trusted Web Activity (TWA). A TWA is an Android app that renders a web app full-screen using the device’s installed Chrome engine — no browser toolbar, no address bar. Under the hood it’s Chrome, so your BabylonJS code runs exactly as it would in the browser, WebGL and all.
This distinction matters for game dev. A raw WebView wrapper (the other obvious option) uses an older, more restricted browser engine. You lose WebGL 2 support and get worse performance. For anything graphics-heavy, TWA is the right call.
Bubblewrap: the CLI that does the packaging
Google’s own tool for generating TWA projects is called Bubblewrap. It reads your PWA’s web manifest and outputs a signed Android App Bundle ready for Play Console upload. Before it’ll work, your game needs to qualify as a PWA:
- Served over HTTPS
- A valid
manifest.jsonwith name, icons, and thedisplaymode set tofullscreenorstandalone - A service worker with a fetch handler (even a minimal offline fallback counts)
- A Lighthouse PWA audit score of at least 80
With those in place, the basic flow is:
npm install -g @bubblewrap/cli
bubblewrap init --manifest=https://yourgame.com/manifest.json
bubblewrap build
This produces a .aab file and an assetlinks.json. Deploy the assetlinks.json to https://yourgame.com/.well-known/assetlinks.json. That file links your domain to your signing key — it’s what switches the app from a Chrome tab into genuine fullscreen mode. Skip it and the browser chrome comes back.
The Android TV gap
Bubblewrap targets phones and tablets. Android TV has additional Play Store requirements that the generated project doesn’t include out of the box.
For an Android TV listing you’ll need to add:
- A leanback launcher intent (
android.intent.category.LEANBACK_LAUNCHER) inAndroidManifest.xml - A TV banner image at exactly 320×180 px
- Navigation that works entirely with a D-pad or gamepad — no touch-only interactions
You’ll need to open the generated project in Android Studio and add these manually. It’s not a lot of code, but it does step outside the purely CLI workflow at least once.
Some developers skip TWA for TV targets entirely and build a minimal native Android TV app that loads the game URL inside a full-screen WebView. That approach works technically, but Google Play’s current policy is strict about “website in a box” submissions — you’ll need to add native value like controller input handling or offline caching to pass review.
Performance reality on Chromecast hardware
Chromecast with Google TV runs on a low-power ARM chip built for video decoding, not 3D rendering. WebGL works. The ceiling is low.
Lightweight 2D games, casual puzzle games, and simple 3D scenes with minimal draw calls have a reasonable shot. Dynamic shadows, multiple post-processing passes, or large texture atlases will struggle. Test before you invest time in the Play Store submission process.
The easiest way to check is sideloading: enable developer mode on the Chromecast, connect via adb, and run adb install yourapp.apk. BabylonJS’s built-in inspector shows draw call counts and frame time — watch those numbers on the actual device, not on a desktop. Falling back to WebGL 1 instead of WebGL 2 can recover some headroom on constrained hardware.
Bluetooth controller input
BabylonJS supports the Gamepad API natively, which is what Bluetooth controllers expose on Android. Standard axes and buttons map through without extra work. The part that needs attention is menu navigation. TV UIs depend on D-pad focus traversal, but most web game menus handle input through mouse hover or touch events — neither of which exists on a TV remote. Wire up keyboard arrow-key equivalents for every interactive UI element and D-pad coverage comes with it.
Play Store submission checklist
- Target API level 35 (Android 15) — required for all new app submissions as of 2025
- Upload as .aab, not .apk
- Fill out the data safety form in Play Console
- Add TV banner and leanback launcher intent for the Android TV listing
- Deploy
assetlinks.jsonto your game’s domain - Provide screenshots taken on a TV form factor for the store listing
The Google Play developer account is a one-time $25 registration, after which you can publish unlimited apps.
Sources
