project screenshot 1
project screenshot 2
project screenshot 3

WarpMonsters

Multiplayer virtual gameboy running pokemon blue that picks the next input based on everyone's actions

WarpMonsters

Created At

Frameworks

Project Description

This project uses a frame to render the gameboy screen and make API requests to a modified emulator running pokemon blue. The emulator has two endpoints that enable move submission and getting the latest rendered screen frame, which is how the frame image is displayed to the users. Every button input is submited via a text input in the frame and submitted, tallied and applied then redrawn with the new game screen to make subsequent moves. There is also a refresh button to simply watch everyone else's movements and see where the journey takes us.

How it's Made

This project uses Frog for the rendering and frame actions / routing as well as making the API post request on frame input. The game screen is returned as a JPEG from the gameboy emulator and set as the background URL for a div in the /game screen of the frame. The gameboy client is a fork of the rboy project with an axum server running in the same process, all written in rust. To connect and render properly Xvfb is used to create a virtual display on the server. Users can submit moves via the frame which posts their inputs to the axum server and queues them in pending moves, translated to game keypad buttons. Every 100ms~ all of the pending moves submitted via the frame are counted and the top submitted input is applied to the actual game. There is a short delay between submission and re-rendering the frame so that the applied action will be visible without having to refresh the screen again.

The emulator and frame server are hooked together over tailscale and the frame server is served via Caddy on a digital ocean VPS. There are also supposed to be pinata analytics and a donation page that was supposed to send a user-supplied amount of USDC on the Base network to use as many partner technologies as possible, however these didn't end up working properly, maybe the pinata analytics works but I can't see anything on the dashboard.

background image mobile

Join the mailing list

Get the latest news and updates