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

rosmax_13371 reply#
I don't think the foremost message on the landing page should be a "join our discord" call. It should feature examples and links to the source/docs.

In fact, the prominence of "join our discord" on projects like this is off-putting for me personally. I don't doubt I am alone in this regard.

hju22_-32 replies#
You are not.

I really dislike discord as anything else than a platform for disposable communication, e.g. between friends and stuff, but people have this tendency of using it as the prominent platform for support questions and even as documentation. And together with terrible search, and no search indexing, it's just terrible when you need to search for a solution.

joshbuddy1 reply#
Fwiw, we're only using Discord for disposable communication. We have a docusaurus site up for the docs, and otherwise all the development is taking place on Github. Discord seems very popular with the board game crowd, so it was kind of the first place we went to try to reach gamers before we started reaching out to developers.

What do you prefer to discord for disposable communication? Certainly open to suggestions.

bananamerica4 replies#
I don't think anyone's criticizing or advising against the use of Discord for the things it's adequate for, but rather its proeminence in the webpage, which communicates that you'll have to go to Discord to get more substantial information on the project. Having to talk to people is a source of stress and attrition for introverts. Not everyone needs or wants to have to modulate their language to a different social environment every time they need clarification.

Continue this thread — 4 replies

radlad1 reply#
I have the same issues with Discord - but surely there must be bots that publish Discord support channels as indexable websites?
catapart2 replies#
Looks good! There's a lot of moving parts for such a wide array of functionality, so this looks like a lot of really good work! If nothing else, it's nice to have a game engine that focuses on tabletop games, that doesn't necessarily focus on how to render said games.

All of that said, as someone who has developed a card and dice game, using plain html and javascript to create a programmatic version that could be played online, I am still having a hard time figuring out how to recreate that kind of thing, using your system.
Based on the docs, I can see it supports cards. And based on my experience developing the same basic gameplay, I can see that it's general-purpose enough to be suited for a wide variety of games (and my game is simplistic, so it should be possible). Feels like it should be a pretty straightforward build, with a robust enough library, and yours seems to be fairly robust, so my thinking here is that a step-by-step tutorial would go a long way. I know enough to see why you've chosen the abstractions you have (Actions, Flows, selections, conditions, prompts, etc), but without seeing them constructed, it's hard to know where to make the specific changes I would want to make.
Anyway, just one opinion! It may feel more straightforward to other people. But I don't think I would personally make much headway with it, without a tutorial.

andrewghull#
Thanks for the comment, and yes we'd love to add more docs. (it's time consuming!) I understand that even a simple-sounding game can feel daunting to translate into a formalized API. I did record a video of me building part of a game FWIW.

https://docs.boardzilla.io/game/creating-a-game

AlecSchueler#
It looks like it's based on two main classes, which make sense in context of the physicality of board games. You have things you move around (`Piece`s), in your hand, from player (`Player`) to player and onto different spaces on the table itself (`Space`).

So for game you'd need your dice and your cards to be defined subclassing `Piece`, and give them to your players (which subclass `Player`) and maybe also to a Teller (also `Player` who manages the deck, before thinking about which instances of `Space` you'll need to set up on your board for your rules.
Your rules all in an instance of the `Game` class and it itself has this concept of actions, at their core instances of the `Action` class. Those take arguments that allow you to write the prompts for the user, define when the action is legal in play, and what effect it should have.
Beyond that the API then just kicks in and seems to have a lot of handy functions for finding pieces, making comparisons, all the stuff you expect. Beyond that just depends on your game logic.
There's also some handy functions to filter for different Spaces and Pieces so that you can build up the UI logic quite quickly, judging by the examples.

jvehent6 replies#
Don't called your project *Zilla. The copyright owners of Godzilla are known to go after everyone who tries to use the "Zilla" suffix. Mozilla learned its lesson long ago and had to negotiate a special agreement.
joshbuddy3 replies#
Um, wow, I had no idea. I've got some other pretty good domain names at the ready, so, maybe I need to pull the trigger on that.
doublerabbit1 reply#
Hi Josh,

I'm receiving an error upon accessing the page.
Object.hasOwn is not a function. (In 'Object.hasOwn(t,n)', 'Object.hasOwn' is undefined)

Continue this thread — 2 replies

soneca1 reply#
Using this thread as bug report.

There is a typo on the “Credits” card on game pages: ”arist” -> ”artist”

joshbuddy#
Thanks Soneca. Fixed and deployed.
gkanai#
As an 10 year Mozilla veteran, I agree you should switch domains/project names. Mozilla was able to negotiate a deal for a number of reasons- Mitchell herself is a lawyer, the project is a NPO, and probably other reasons too, but it's not worth the effort to defend a slightly infringing name against the copyright holder in this case.
cyberninja152 replies#
Woah, this is wild. Never knew how aggressive the copyrights were for *Zilla.
gkanai1 reply#
When you consider the most recent Godzilla film, Minus One, is the 37th in that franchise, and was not only nominated for an Oscar, and may be it's most lucrative, you can see why Toho would aggressively police that copyright.

Minus One is legit a great film.

thfuran#
No, I can't. That makes it even less reasonable.

Edit: on the other hand, they apparently elected to use Godzilla as their logo, which kind of ruins the otherwise considerable unrelatedness.

paradox4602 replies#
Wonder how the people of Zillah Washington feel about it
marssaxman#
I'm fairly sure that the antiquity of the Book of Genesis trumps any conceivable trademark claim!
altairprime2 replies#
It’s not called Boardzillah, so maybe not much at all.

Continue this thread — 2 replies

xky1 reply#
Meta also pursues trademarks applicants for trademarks ending in 'book' as well.
20after4#
That seems a lot more dubious than the *zilla trademark.
Aeolun#
How would this even remotely relate to Godzilla or it’s copyright?

It’s not even close to a big scary nuclear fueled monster.
I’ll note that the only TM case they ever lost was against a company selling trash bags named ‘trashzilla’, partially because it did not constitute a danger to Toho’s business interests.
Edit: Uh, I missed the logo. Definitely a problem.

dharmab1 reply#
Revzilla and Partzilla also had a long legal conflict over the *zilla name.
pbhjpbhj1 reply#
It's pretty clear that "zilla" is a genericised word suffix, cf "bridezilla", in English.

Whilst it seems to originate with Godzilla -- which honestly also doesn't seem to associate with a particular company but instead I would say it's a now traditional monster name in stories, like Dracula -- noone is confusing this with any Godzilla franchise. These sort of attempts to own a word sten, across trademark categories, are an over-step that legislators need to rein in IMO.
Does the recent Sky trademark battle speak to this?
This comment is entirely my opinion and does not relate to my employer.

dharmab1 reply#
> Whilst it seems to originate with Godzilla -- which honestly also doesn't seem to associate with a particular company but instead I would say it's a now traditional monster name in stories, like Dracula

This is a really weird take. Dracula is in the public domain, while every piece of Godzilla media is still copyrighted and trademarked to Toho, one of the big four movie studios of Japan.

Continue this thread — 1 reply

cobbzilla#
oh crap
smcin5 replies#
You're using Typescript+CSS. Was hoping you'd support Python on the server, for game logic. Your timing is good because developers and publishers currently using BGA are unsettled and spooked by Asmodee's business model.

BGA Studio's stack is JS/CSS + PHP (client and server) + MySQL [0]
Yucata.de is JS + HTML + .NET 4.5 on the server [1]
(TTS was using Lua, which I looked into but seemed eccentric and limited, it's not even OO, why on earth choose a non-OO language for a boardgame).
Also here's a useful review of sites/frameworks from 2021: "VassalEngine: Survey of other boardgame software" [2]
Can you please please please integrate with Python on the server?
[0]: https://boardgamearena.com/doc/Studio
[1]: https://www.yucata.de/en/FAQ#t17
[2]: https://forum.vassalengine.org/t/survey-of-other-boardgame-s...

gam61211474 replies#
> why on earth choose a non-OO language for a boardgame

Lua has usually been a very popular choice for game developers. One reason is that it gives you an easy way to embed a scripting language in your game.
You can do OOP without classes [0].
> Can you please please please integrate with Python on the server?
You expect the developer to port and maintain their entire project to Python because you can't be bothered to learn a new programming language?
[0]: https://en.wikipedia.org/wiki/Lua_(programming_language)#Obj...

tgtweak2 replies#
Seems pretty trivial to support Python serverside. Python is very easy to run in a lightweight isolated container (and you can compile it to static executable). The game data that the engine makes available to the server side code looks pretty standard and doesn't look like a huge shim to maintain.

You could even cross compile the Python to typescript for a simplified server side environment (typy for example).

monkeywork#
>Seems pretty trivial to .....

Then go do it. If it's pretty trivial....

hermitcrab#
Anything is trivially easy when you aren't the person that has to do it.
Ensorceled#
>> > Can you please please please integrate with Python on the server?

> You expect the developer to port and maintain their entire project to Python because you can't be bothered to learn a new programming language?
They are literally begging, 3 "pleases", rather than "expecting".

askvictor#
I remember a book on the shelf at home in the 90's entitled "Object Oriented Programming in Macro Assembler".

And indeed, C has function pointers, so you can do OO. Just not some of the more fun stuff.

smcin3 replies#
I clearly didn't "expect" the developer to port or do anything, I requested they consider also integrating with a (server-side) language that's in general more widespread, more expressive, more userbase, more libraries, more powerful developer tools. Per the examples I cited, boardgame platforms put most of the game logic on server-side, for complex games. The client-side checks that moves are not illegal, cheating or nonsensical.

I wasn't aware Lua had become widespread in game programming [0] (or more specifically, scripting on top of a game engine written in some other language); but supposedly not mainly due to whether Lua language has adequate features, but in part as a reaction to (client) performance of the Lua VM vs Python (VM maps to register set rather than stack-based; lower memory usage; coroutines); on client rather than on server. Some discussion in [0].
I did in fact in 2020 look into implementing a friend's boardgame in Lua on TTS vs in Python. That programming only confirmed my experience that line-for-line, Python is more expressive, IME more productive to develop in, also has much stronger library support.
Why is the basic documentation [1] on whether/how to implement OO Lua so contradictory and all over the place? When I look for a how-to document, I want a clear how-to, I don't want to see Lua's own users in a decades-long debate [2][3][4][5][6]. Or [7]. Or a lua-users.org/wiki that isn't even accessible via https [8]. (If I should be using a more accurate term than "OO", then just tell me what that is, instead of ad-hominems.) So for example, do we need polymorphism, mixins, the ability to call super, serialization (probably can do without that), etc. Should we sacrifice other features for more deterministic GC and performance? What are the compelling reasons for server-side Lua? on a feature-by-feature basis vs say Python?
(There's also a constituency who insist that Tcl is object-oriented, FWIW.)
Probably the best way to keep this discussion on-focus is to define "What is the consensus on an adequate set of OO features that's considered necessary for server-side game logic programming?" (that's a rational discussion, not "can't be bothered to", which is just ad-hominem).
As to TS, in my experience I don't find strong type-checking to prevent that many bugs, in codebases written by a small number of developers. I can program JS, so again if I saw a compelling reason to start using TS I would. (Sure, you could also crosscompile Python.) Again, that's not the primary issue, the primary issue is what server-side language once the game becomes complex and outgrows a pure TS implementation.
[0]: "Civilization V ditching Python for Lua" https://www.reddit.com/r/programming/comments/bp5m8/civiliza...
[1]: https://www.lua.org/pil/16.html
[2]: How can one implement OO in Lua? https://stackoverflow.com/questions/4799078/how-can-one-impl...
[3]: Is doing OOP in Lua considered bad practice? https://www.reddit.com/r/lua/comments/tbaxlo/is_doing_oop_in...
[4]: Really, how best to give Lua an object/class structure? https://www.reddit.com/r/lua/comments/tia21g/really_how_best...
[5]: Is Lua an object-oriented language? (SO, 2011) https://stackoverflow.com/questions/3477676/is-lua-an-object...
[6]: Why inheritance isn't as useful in dynamic languages, and other notes on OO in Lua (marc.info) "In short: inheritance is in most cases not a feature, just a simplistic method for expressing similarity." https://news.ycombinator.com/item?id=98529
[7]: r/ProgrammingLanguages, 2022: "If Lua is faster and smaller than Python, while being just as powerful and capable, then why is Python so much more popular?" https://www.reddit.com/r/ProgrammingLanguages/comments/tfurk...
[8]: https://wiki.c2.com/?LuaUsersWiki

Continue this thread — 4 more replies

Load more comments