Here to Slay
A real-time multiplayer web recreation of the board game by Unstable Games
Why I built it
I play Here to Slay with friends and wanted to be able to play online. The real goal was to learn WebSockets, specifically how to build something where multiple clients stay in sync with each other in real time without polling. A card game with turns, phases, and hidden information seemed like a good challenge for that.
What I built
Players join lobbies, start games, and play through the full Here to Slay ruleset in a browser. The backend handles all game state; which phase the game is in, whose turn it is, what cards are in each player's hand and pushes updates to all clients via WebSocket events.
The card system uses a polymorphic class hierarchy: every card type (Hero,
Monster, Item, Magic, Modifier, Challenge, Leader) subclasses a base
Card class and implements its own apply(game, player)
method containing its unique effect. Cards are registered by ID so the game
can reconstruct any card from serialised state without importing every class
individually.
Clients emit actions (play_card, attack_monster,
roll_dice, end_turn) and the server broadcasts
game state changes back. Private events like hand_updated are
sent only to the relevant player so opponents can't see each other's hands.
What I learned
WebSockets changed how I think about client-server communication. HTTP is request-response the client always asks, the server always answers. With SocketIO, the server can push to clients at any time, which means game events (another player attacked, a card was played) arrive instantly without the client polling for them.
Managing shared mutable state across multiple connected clients was the hardest part. Any action by one player has to be validated server-side, applied to the game object, and then broadcast correctly some state goes to everyone (the board), some only to specific players (their hand). Getting that routing right took the most iteration.