It's been a few years since I built anything in Elixir so I decided this weekend to refresh my memory.
Rather than build yet another location-based API, I decided to try a game.
Combining super-simple gameplay and Phoenix Channels, I eventually ended up with Snex - Multiplayer Snake.
On page load, you are assigned a random session ID so you can copy-paste the URL and share it with any one to play on the same board.
I've currently got it deployed on Gigalixir.
The performance on the deployed version isn't great due to network latency. Essentially, the game ticks every 100ms and sends an update to each player so if you're moving left then press down, typically the server will process one more left
event before your down
arrives. There are plenty of blog posts about handling latency, not just in multiplayer online games but also specific discussions on multiplayer online snake. I decided I could either dig into refreshing my knowledge of that or stick with refreshing my knowledge of Elixir and Phoenix. I went with the latter.