For the past few weeks, I’ve been writing a multi-player game using Ruby on Rails. I’ve deliberately chosen to stick to Rails defaults and avoided using any external dependencies (apart from Redis to support Turbo Streams). Does it sound like I’m taking it too far? Yep, that’s precisely what I am trying to do here.
The first attempt is surprisingly encouraging, as you see in the video below.
What’s happening here?
00:00 - 00:05 As the players join, they start appearing as active in the right section. This is handled using a Turbo Stream that updates when a player status changes from
00:05 - 00:42 The players move across the 8x8 grid using arrow keys and simultaneously shoot other players using a mouse click. The aim is to kill all your opponents and be the last survivor.
00:43 Once the game engine detects a lone survivor, they are declared a winner. Again, that’s a Turbo Stream update triggered by a change in the game state.
I aim to host it on a reliable server in the coming weeks, but stay tuned for updates until then!