Let's make Transformice work in the browser again!
Note
This is still in development, and performance is not on par with Adobe Air TFM
Transformice needs Adobe Flash Player to run in the browser, but that has been unavailable since 2020. Because of this, the game has been playable only by installing it on your desktop.
However, ruffle.rs has appeared, creating a Rust drop-in replacement for Adobe Flash, from scratch. Over the years, Ruffle has improved massively, and now we can play Transformice using it.
Unfortunately, we still cannot play in the browser directly. The game makes use of TCP sockets, and browsers do not support them. However, what we can instead do is to proxy all TCP traffic through a websocket, letting us communicate with the game server. This requires that a proxy server is up and running, and Transformice does not have that, so we must self-host it using websockify.
Using this, we can actually connect and play!
You can use extremq.github.io/tfm-browser, but you will be prompted for a resource proxy address and websocket proxy address. You can either self-host or find someone else that hosts them for you. See further instructions for self-hosting.
First, install websockify. Download the zip/tar.gz from the github repo.
Unarchive and once inside the directory, run python3 setup.py install. You might need administrator access for this.
After installing, come to the Tfmbrowser repo directory and run websockify 127.0.0.1:8000 --token-plugin TokenFile --token-source proxypaths.
Either use the my proxy server, or run the server yourself if mine is down. To host the server yourself, node sever.js, open localhost:3000 and that is it.
Note
You can use Vercel to freely host your own proxy server, just fork extremq/tfm-resource-proxy
Just do,
docker build -t tfmbrowser
docker run -p 0.0.0.0:8000:8000 -p 0.0.0.0:3000:3000 tfmbrowserthen open localhost:3000.
Please report any inconsistencies you encounter. We try to maintain a separate Ruffle build that fixes some of them.