Cloud-GBA

Cloud gaming for GameBoy Advance, free memories of your childhood to help you navigate through these though times.

Motivation

Have you ever used console emulators to revive memories of your childhood ? They are pretty cool, but using them can be fairly cumbersome. It was time for the Game Boy to finally enter the era of game streaming.

Design

Since the beginning, we wanted to design a project so that screen and the commands of the GBA could be decoupled, in order to display the game on your TV and have the control on your smartphone. Bonus points, since the game only runs on the server, all the saves are in one place and you can resume your games wherever you want.

The architecture of the project was then pretty natural : a python server running the game, to which you can attach video streams for the display and input streams for the commands. The server communicates using websockets, which allowed us to build a web front end.

The front end is a TypeScript React app. It means that we can run it on both smartphones and computers without any problem.

We tested our prototype locally with a PC and in the cloud using a DigitalOcean instance.

Challenges

The first part was to find an emulator that we could tweak easily. We chose mGBA as it is by far the most maintained and feature rich emulator.

We then had to discover the codebase, which is pretty large. At first we planned on tweaking the SDL renderer, but we discovered an undocumented python binding. After managing to build it, and spending some time reverse-engineering the source to know how to use the library, we managed to build a working example of an execution of a game.

We had to compress the video stream (which is nothing more than an image sequence in our case), by compressing every frame using JPEG. This allowed us to have a video stream of ~200KB/s, which can be easily sustained by most internet connections.

The front end had to be developed for desktop and smartphone browsers, which needed some work in the codebase.

Share this project:

Updates