Retrobot is a Discord bot that allows you to play NES/SNES/GB/GBA games with your friends over chat! Think "TwitchPlaysPokemon", but with GIFs. It accepts button presses, emulates the result, and encodes a GIF to view.
Retrobot simplifies control by auto-forwarding through idle parts of games, such as conversations or battle animations.
Additionally, numbered buttons are added to automatically repeat button presses. This is useful for walking in a specific direction for a long period.
Create a bot in the Discord Developer Portal, and obtain a token for your bot.
Create a file name exactly .env
in your clone of this repository with the following contents:
DISCORD_TOKEN=YOUR DISCORD TOKEN HERE
Run these commands:
yarn install
yarn service:start
Then invite the bot to a server with the following URL. Be sure to update the OAuth Client ID.
https://discord.com/api/oauth2/authorize?client_id=YOUR_OAUTH_CLIENT_ID_HERE&permissions=68608&scope=bot
Once the bot has joined your Discord server, drop an uncompressed ROM file into a channel. The bot will automatically find the ROM file, and begin emulation. Note: only server "administrators" can start new games.
Retrobot is built on libretro
, the code that powers RetroArch. Several libretro
cores have been cross-compiled to WASM to be used in Node.js. Since WASM modules have independent memory spaces, it means several cores of the same type can be instanced. This allows parallelism.