Lurker News
Show HN: Boardzilla, a framework for making web-based board games

Tldr: We’ve made a framework for web-based board games. You can try out some games over at https://boardzilla.io, or you can take a look at https://docs.boardzilla.io to learn more about how to develop your own game. Source is available at https://github.com/boardzilla
Hey y’all. My brother and I have made a framework for board games. During the pandemic we started to look at BGA but got discouraged by how old-fashioned the tools were and how cumbersome the development process was. We set out to make our own framework where you could use the same code for both the client and server. Our hope is anyone familiar with Typescript and CSS could code up a game without worrying about state management, persistence or networking.
It’s still very much a wip, and we're rapidly adding features and games. But we’ve got our first draft of developer docs done, and we've put up a few games we've developed to showcase and test out the platform. Source for the games and framework is available on Github, and we’re excited to code more games and hopefully encourage other people to try it out. Happy for any feedback.

Comments (105) 22 threads

Earlier comments
Longwelwind1 reply#
You might be interested by an open-source project I started a few years ago but never really finished: https://github.com/ravens-engine/core

I had the idea after developing Swords and Ravens, an online adaption of A Game of Thrones: the Board Game (2nd edition), and realizing that there was a way to make a library to allow people to create board games without having to bother with the network part.
I also wrote a blog post about it: https://longwelwind.net/blog/networking-turn-based-game/
Good luck in your project!

joshbuddy1 reply#
Oh wow, thanks, I'll check this out.

We were doing something more like merely recording the game moves and applying them to arrive at the game state (having deterministic per-session rng). It's a good way to do it, but for the same of simplicity, this time around we just record the whole json blob per move. It simplifies undos and it also lets us easily move through history if you want to view a previous state.
But I'd love to try to apply some of your lessons to a later version. The challenge for us now is making a good api for expressing board games. That's been really tricky tbh. We've been working on this for ~7 years and have gone through many iterations of this api trying to get it right. I sure hope we're closer this time.

Longwelwind1 reply#
You might be interested in the Phase abstraction of my engine.

Basically you represent your board game as a tree of phases through which your game progresses in.
Each node of your phase tree can contain state. At any point, your game is at leaf of your tree, and the state of the game is composed of all the states of all the nodes from the current leaf-phase to the root of the tree. Each leaf node also have a set of possible inputs describing what possible action players can take to progress into the game. This makes it really easy to handle games that have special "rare" phase that can break the flow of the game (for 7 Wonders: Duel, for example, phases where players must resolve a wonder's effect that asks them to destroy an opponent's card).

andrewghull#
That's almost exactly what I've done here, and then defined various nodes with different behaviour like for-loops, while-loops, etc.

Take a look at https://docs.boardzilla.io/game/flow to see how it looks.

kevinyew1 reply#
Been enjoying playing a couple games of Seven Wonders Duel so far, but one immediate issue is that there is no way to unsubscribe from the emails telling me it's my turn. I've already got browser notifications turned on, so these emails are filling up my inbox fast.

I've also reported a couple bugs so far, the main one being not being able to build Wonders even though I have adequate resources, but other than that, amazing work! I'm keen to implement a game myself sometime soon.

joshbuddy#
Oh darn, sorry about the email notifications. I'm going to disable them and give them a little extra polish later. Thanks for letting me know
sjrd#
This looks very interesting. One question: would I be able to develop a game using my favorite compile-to-JS language? Or would the game infrastructure force me to use TypeScript?
joeld421 reply#
Hey this looks great. I'm working on some AI bots for board games and this might be really useful as a frontend for local testing of the bot players. I'll check it out.
andrewghull#
We've been planning to add a way to do pluggable AI functions (both for solitaire play and for testing). If you want to try, take a look at the TestRunner class for an easy way to automate playing the rules for multiple players.

Load more comments