The amazing ways Playtiles uses the web for retro gaming

Playtiles is a new, indie product that lets you play Gameboy-emulated games on your mobile device. It’s a little, credit-card-sized device that “sticks” (not permanently) to your mobile’s screen and gives you buttons that press onto the screen to work as a controller.

I won’t post images or detailed descriptions. It’s a simple product easily explained by their website.

There are plenty of ways to do gaming on your mobile. But I thought this was a neat approach, and because it’s an entirely physical device, it’s pretty cheap. And they’ve done a community game “season” (like the Playdate does “seasons“) of games with new games available each week for several weeks.

But what Playtiles have also done is create… I don’t know… an “app”? An “operating system”? It’s some software that runs the games and has the on-screen interface that the Playtile uses.

And I put “app” and “operating system” in quotes because in reality… it’s a website! A website, that works like an app, that provides OS and app-store-like functions, that includes offline functionality, that works cross-platform.

It’s such a brilliant use of modern web standards and tech, and I want to tell you all about it.

Note that I am not affiliated with Playtiles in any way. I’m just a happy customer. I may not have got everything here exactly right. But I’ve been curious about the tech they are using and have looked into it a bit.

PWA

The app is really a website. But it’s a special kind of website called a “Progressive Web Application”. This means you can “install” it to your mobile device and it appears as an app icon. It launches full-screen, not in a web browser. And it has some special abilities, such as the ability to send notifications.

PWA’s are actually brilliant, and web browsers now (a PWA does run in a web browser – you just don’t see the browser bits) are so capable, as you will see here, that many apps could just be this way.

The reason they aren’t is mostly because:

  1. There’s a tiny bit of friction in the install process, and it’s a little bit confusing understanding that this app is not actually an App.
  2. The AppStore or Play Store is the place you go to get apps. They are discoverable there. They are documented there. They are rated and reviewed there. They can be purchased there. That’s where you go to get apps. And web apps don’t have those things as features.

But Playtiles chose to do things this way, and I think it has worked really well and it’s amazing seeing so many of the features of PWAs being used in the wild here.

An emulator in WASM

The Playtiles app runs a Nintendo Gameboy emulator inside the web app’s “browser”.

If you know web development then you _may_ be thinking “Wait, did someone write a Gameboy Emulator in JavaScript?”

And, well, someone probably has done that somewhere. But Playtiles is using a thing called WASM, which is an fast and efficient way of running code written in other languages inside the browser.

Playtiles seems to be using binjgb – an emulator written in C, but that runs in the browser.

It’s really quite impressive stuff. And the browser helps so much by enabling WASM to be run.

Offline storage with IndexedDB

Storage needed for the “offline games” feature which saves game files for use when you don’t have the internet, and for saving game states too.

This seems to be done using IndexedDB, which is a standard thing built into browsers that lets your website keep a local database on your device. The game files are small enough that they can just be stored in this database.

Again, the browser gives the devs what they need to achieve a function like this.

Notifications

I don’t know the tech behind this, but this app has definitely sent me a push notification on my iPhone. I know there’s a web notifications API and there must be some service worker running in the background, keeping the app alive or checking in occasionally.

It’s very cool that something that is essentially a website can do this now.

Passkeys

The final thing isn’t really PWA-specific, but it’s nice to see modern authentication being used with Passkeys as the primary login mechanism. This does have the downside that your username is like “player-XXXXXXXXXXXXX”, but perhaps that will change in future.

Summary

Web browsers are so powerful now. Playtiles has used modern web features so successfully that you hardly notice it’s not a real app and it is able to do so many things that apps can do. But they write it once and it runs pretty much anywhere.

I applaud the devs and the Playtiles team for figuring out that they could do this and then actually doing it.

I really hope to see more developers looking to make progressive web applications like this in the future.

Great job Playtiles! It’s really clever and inspiring to see what you have done.