Invite The Bot To Your Server!
Yeah it's another X plays Pokemon, I know. I wanted to have one for a Discord server I'm in though and could only find self hosted bots and not one where people could just invite. There was one that I could just invite, but all Discord servers shared the same instance of Pokemon.
So, I wanted to try serverless with AWS Lambda and allowing each server to have their own instance of the game. Everytime an action is performed, the previous game state is fetched from DynamoDB using the Discord server as the key, PyBoy then loads the game state, processes the input, and advances the game 300 frames, then saves the game state back into DynamoDB.
Well I wanted to try writing something with a serverless function. This means that if nobody uses my bot, then it costs me nothing to host! If people do use my bot, it'll scale well.
Invite the bot to your server, and if you're a manager of the server go to a channel and type /pokemonplay to start
In your AWS function add an aditional layer with a GameBoy pokemon rom named yellow.gbc