Pokemon filled many childhoods with joy. For some of us as adults, server side Swift does the same. What better way to spend a fun afternoon than combining the two?

Let’s walk through how to build your own version of Twitch Plays Pokemon powered by text messages using the Twilio API, Vapor and Lua scripting for the Visual Boy Advance emulator.

Getting Equipped

Before moving on you’ll need to do the following to set up your environment:

Install wine to be able to run the emulator we need, as only the Windows version has Lua scripting functionality.

If you’re on a Mac, you can install Wine using Homebrew with the following command: