Future Butcher
Currently unavailable while I sort out a certificate renewal issue.Turn-based strategy game built with Elixir/Phoenix and Emberjs.
Do you remember Drug Wars? I spent hours during high school math class playing that game on my TI-83 calculator. I got hooked on the game's simplicity, and how RNG and a somewhat forbidden subject combined to make it infinitely replayable.
So in 2017 when I needed a project to learn the Elixir language, Drug Wars came to mind. I had started reading the excellent Pragmatic Programmers book Functional Web Development with Elixir, OTP, and Phoenix, which provides an in-depth tutorial building a Battleship-type game. But instead of following the material to the letter, I decided to build my own game with the book as a guide. I didn't want to rip off John E. Dell's original either, so I spent some time brainstorming a new world.
Design
Right off the bat, Future Butcher had a cyberpunk feel. The original name was Slinger, and the player could buy and sell brain implants with different gameplay effects. But the concept was hard to grasp for players who hadn't read any Gibson. So instead I took the game in a new direction - cannibalism.
I kept the cyberpunk feel, with a UI intended to resemble an old terminal. Some of the events and encounters underscore that feel, with mentions of all-powerful corporations, weak (and possibly failed) governments, and near anarchy.
After struggling to find an artist I opted for free icons and creative animations to give the game some life. It doesn't look great, but it served my purposes.
Architecture
Following the PragProg book's approach, I designed a stateful game engine in Elixir. It handles the turns, player statistics, game rules, etc. The engine is a dependency of the server application, built with Phoenix.
The application use's Phoenix Channels to communicate with the client, and OTP supervised processes to spin up a state machine. Authentication is non-existent, because I wanted to provide an arcade experience. Players don't need an account or to enter their email address, just their name for the scoreboard. It turns out that after I stopped marketing the game and traffic died out, a few players dominated the scoreboard. At some point I'll impose a uniqueness constraint on the top-100 high scores.
The client is an Emberjs application. At the time, my work's client side application was built with Ember, so I went with what I knew. The client communicates with the server application via Websockets.
More
- Play the game (Currently unavailable)
- Game engine repo
- Server application repo
- Web client repo