6 ms·
Show HN: Boardzilla, a framework for making web-based board games
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 https://boardzilla.io, or you can take a look at https://docs.boardzilla.io https://docs.boardzilla.io to learn more about how to develop your own game. Source is available at https://github.com/boardzilla 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.
- fayazara 3y agoOne thing about the JS ecosystem, there's a shit ton of libraries and frameworks.
- josephcsible 3y agohttps://github.com/boardzilla/boardzilla-core/blob/main/LICENSE https://github.com/boardzilla/boardzilla-core/blob/main/LICE... Commons Clause :( If you're worried about some corporation leaching off of you, why not go AGPLv3 instead?
- deleted 3y ago[deleted]
- andrewghull 3y agoCo-creator here. I thought AGPL was ok as well, but Commons Clause specifically tried to address perceived deficiencies in the AGPL although I admit that it didn't really seem to catch on. I'm not super well versed in the technical details. Why would you recommend AGPL?
- josephcsible 3y agohttps://fedoraproject.org/wiki/Licensing/CommonsClause https://fedoraproject.org/wiki/Licensing/CommonsClause has several links explaining what's wrong with the Commons Clause. The reason the AGPLv3 is my preferred replacement is that the FAANGs are irrationally afraid of it and refuse to let it be used anywhere in the company (e.g., https://opensource.google/documentation/reference/using/agpl-policy https://opensource.google/documentation/reference/using/agpl...), but it's still 100% Free Software and Open Source and so allowed to be packaged in Linux distributions that disallow proprietary software.
- andrewghull 3y agoAppreciate that! We'll take another look at this.
- pessimizer 3y agoRemember (I'm sure you do) that you can relicense the code for the use of anyone who wants to pay you for it. AGPLv3 protects you, but doesn't hold you back.
- dingnuts 3y ago[flagged]
- josephcsible 3y agoThe AGPLv3 only requires you to make your modified source code available to people that you choose to give a copy of the binary to or allow to use on your computer over the network. You never have to make anything available to the original owner if you don't let them use your modified version.
- boucher 3y agoI've seen a lot of takes on the GPL but this is a new one to me. As another comment points out, you only have to make changes available to others if you make the software itself available to others; either by distributing a binary or by using it to provide a web service. But this is, fundamentally, the point of "Free" software: someone who uses a piece of software should be entitled to change that software as they desire. This obviously implies that if you make your own modified software available to others, they too must be able to make their own changes.
- jamager 3y agoLooks very cool, congrats on the initiative! I think it can be great to develop prototypes, but to build a BGA alternative you will need permission from the publishers to implement / distribute their games, and given how big is BGA and that it belongs to Asmodee, that is going to be tough... Hope I am wrong, good luck!
- joshbuddy 3y agoHey jamager, thanks for the kind comments. Totally agree, Asmodee has basically prevented a real competitor from entering the market. We have an idea in mind that doesn't involve going up against BGA, but instead looks at more smaller games from indie publishers. Not sure how viable that is, but not sure what else someone is supposed to do.
- vindex10 3y agoIANAL, it seems, game mechanics can't be copyrighted, unless you use the same images for cards / board, or literally copy the rule book. > In short: you can trademark the name, logos. Have copyright on art (even the board itself as art). You can't copyright the mechanics, processes or rules. That explains the Monopoly/Scrabble clones. https://www.reddit.com/r/gamedev/comments/10f2nov/comment/j4uubum/ https://www.reddit.com/r/gamedev/comments/10f2nov/comment/j4... which refers to this youtube video: https://www.youtube.com/watch?v=iZQJQYqhAgY https://www.youtube.com/watch?v=iZQJQYqhAgY
- jamager 3y agoMechanics can't be copyrighted, but the board gaming community can smell rip offs from afar and don't particularly appreciates them. Besides, it's going to be madness to advertise that you have the game X on your platform but can't use the name or any artwork. If I were the OP, i'd try to gear this towards publishers and make it as easy as possible to create functional prototypes. They need to iterate countless times on prototypes, one little change at a time, and this could be a huge time saver for them, facilitate playtasting, etc...
- joeld42 3y agoHey 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 3y agoWe'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.
- joemi 3y agoI'm looking forward to trying this out! You might want some sort of mention in the website copy about it being self-hostable (unless I'm misinterpreting the docs). The website copy talks about your hosting and the related benefits (as it rightly should), but I didn't see any mention of self-hosting so I almost didn't click through to the docs to see that local development is possible.
- joshbuddy 3y agoHey Joemi. I wanted to make a self-hosted single game runner, but I haven't gotten to it yet. The interface used by the game/server is detailed here https://github.com/boardzilla/boardzilla-devtools/blob/main/interface.md https://github.com/boardzilla/boardzilla-devtools/blob/main/... so it should be pretty easy to make this runner. I hope to get to it soon.
- joemi 3y agoAh, I guess I need to look at the docs more closely.
- catapart 3y agoLooks 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 3y agoThanks 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 https://docs.boardzilla.io/game/creating-a-game
- AlecSchueler 3y agoIt 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.
- lencastre 3y agoA couple questions: did you get permission from Friese for Funkenschlag? Why Typescript? Any plans to control for players who rage quit, anti-play (in all forms), cheat (two connections from same IP)? I tried but couldn’t test right away, is this more like BGA or TTS?
- andrewghull 3y agoYes it's like BGA, not TTS. No, we haven't done much to secure the online playing experience for strangers other than simply enforcing the rules of the game. We've been so far more focused on the API side of building game than the service side of having customers, but these are all on our radar as table stakes to make this an nice experience for random players.
- Illniyar 3y agoWow, this seems unreasonably well made! Kudos. I'll definitely try it out.
- iamevn 3y agoReally cool looking! Excited to mess around with this. Happy to see the everyPlayer[1] flow command to allow for simultaneous actions. This is something that's missing from the other boardgame frameworks I've tried. [1]: https://docs.boardzilla.io/game/flow#everyplayer https://docs.boardzilla.io/game/flow#everyplayer
- jvehent 3y agoDon'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.
- joshbuddy 3y agoUm, 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.
- doublerabbit 3y agoHi 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)
- jitl 3y agoYour browser is too old to work with the library. Object.hasOwn is available for 93% of users according to https://caniuse.com/mdn-javascript_builtins_object_hasown https://caniuse.com/mdn-javascript_builtins_object_hasown
- soneca 3y agoUsing this thread as bug report. There is a typo on the “Credits” card on game pages: ”arist” -> ”artist”
- doublerabbit 3y agoThe page immediately errors for me. Error Object.hasOwn is not a function. (In 'Object.hasOwn(t,n)', 'Object.hasOwn' is undefined) The stack trace is: o@https://www.boardzilla.io/build/_shared/chunk-IP5CEA34.js:3:85 https://www.boardzilla.io/build/_shared/chunk-IP5CEA34.js:3:... rt@https://www.boardzilla.io/build/root-NYPPT2G6.js:3:2506 https://www.boardzilla.io/build/root-NYPPT2G6.js:3:2506 Fs@https://www.boardzilla.io/build/_shared/chunk-QNN53S6I.js:9:128279 https://www.boardzilla.io/build/_shared/chunk-QNN53S6I.js:9:... Ch@https://www.boardzilla.io/build/_shared/chunk-QNN53S6I.js:11:180657 https://www.boardzilla.io/build/_shared/chunk-QNN53S6I.js:11... _h@https://www.boardzilla.io/build/_shared/chunk-QNN53S6I.js:11:176432 https://www.boardzilla.io/build/_shared/chunk-QNN53S6I.js:11... Jg@https://www.boardzilla.io/build/_shared/chunk-QNN53S6I.js:11:176360 https://www.boardzilla.io/build/_shared/chunk-QNN53S6I.js:11... Ei@https://www.boardzilla.io/build/_shared/chunk-QNN53S6I.js:11:176215 https://www.boardzilla.io/build/_shared/chunk-QNN53S6I.js:11... rs@https://www.boardzilla.io/build/_shared/chunk-QNN53S6I.js:11:172603 https://www.boardzilla.io/build/_shared/chunk-QNN53S6I.js:11... Rh@https://www.boardzilla.io/build/_shared/chunk-QNN53S6I.js:11:171554 https://www.boardzilla.io/build/_shared/chunk-QNN53S6I.js:11... Rh@[native code] Ba@https://www.boardzilla.io/build/_shared/chunk-QNN53S6I.js:4:61845 https://www.boardzilla.io/build/_shared/chunk-QNN53S6I.js:4:... Ia@https://www.boardzilla.io/build/_shared/chunk-QNN53S6I.js:4:62237 https://www.boardzilla.io/build/_shared/chunk-QNN53S6I.js:4:... iPhone - ios 14.8
- joshbuddy 3y agoHey Doublerabbit. Thank you for the bug report and stack trace, super helpful. I'm taking a look at it now. I've got to go to bed soon, but I'll try to fix this as soon as I can.
- joshbuddy 3y agoI think I have a fix deployed now. Please try it again if you have a moment.
- doublerabbit 3y agoWonderful, Working perfectly. Thank you.
- sjrd 3y agoThis 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?
- cableshaft 3y agoNice. I have a ton of board game prototypes I'd like to make web games of at some point, so I spent a little time writing up some functions for a general board game library myself for making board games, but didn't get too far (just some grid generation, custom die rolling, card drawing, tournament functions, some tests to demonstrate various scenarios, and a few other things). But I'll never have time to do it properly, especially juggling other projects. Maybe I'll just see how easy it is to work with your library. I concur it's a bit painful to learn the BGA platform, as it's 1) stuck on their platform, you won't be able to put the game anywhere else, and 2) all in PHP, which I prefer not to write in anymore, and 3) with documentation scattered around in various places, including a couple of Powerpoint presentations.
- smcin 3y agoYou'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 https://boardgamearena.com/doc/Studio [1]: https://www.yucata.de/en/FAQ#t17 https://www.yucata.de/en/FAQ#t17 [2]: https://forum.vassalengine.org/t/survey-of-other-boardgame-software/72519 https://forum.vassalengine.org/t/survey-of-other-boardgame-s...
- gam6121147 3y ago> 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)#Object-oriented_programming https://en.wikipedia.org/wiki/Lua_(programming_language)#Obj...
- tgtweak 3y agoSeems 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 3y ago
- jslakro 3y agoGood initiative but I consider screentop.gg is a solid and pretty consolidated option on that field. It's quite easy to create games on that system
- JoeOfTexas 3y agoThis is a very difficult space. I think the best way to be successful is to have an instant hit game, or spend tremendous community effort getting players every day of the year. I tried my luck with https://acos.games https://acos.games early on when there was very few alternatives to BGA. I still develop for it behind the scenes when I'm bored. My biggest failure is UI/UX. People don't care too much about the awesome technology hiding behind the scenes. =(
- jmpavlec 3y agoLooks really well done. The documentation was very well written. I don't have a use case at the moment but it was interesting reading through the documentation to see what is possible. The state management and replaying games seemed neat. I'm writing my own set of games and just thinking about making the system flexible enough for others to integrate with feels like a big undertaking. Cudos for the work you put in.
- mNovak 3y agoLooks great! I'll poke around--my dream is make a WH40k-like turn based strategy.. curious to see if this can handle sufficiently convoluted rules.
- eps 3y agoAll sample games show an error: Object.hasOwn is not a function. (In 'Object.hasOwn(e,A.from)', 'Object.hasOwn' is undefined) The stack trace is: su@https://www.boardzilla.io/build/_shared/chunk-ZEYFFM3P.js:16:114536 Fs@https://www.boardzilla.io/build/_shared/chunk-QNN53S6I.js:9:128279 Ch@https://www.boardzilla.io/build/_shared/chunk-QNN53S6I.js:11:180657 ... Perhaps put some polyfill in place?
- darekkay 3y agoIf you're looking for something more low-level, I can recommend boardgame.io [1]. [1] https://boardgame.io/ https://boardgame.io/
- joshbuddy 3y agoYeah, I can totally recommend boardgame.io as well. Nicolo is super helpful and friendly. Also check out his other project https://boardgamelab.app/ https://boardgamelab.app/.
- Longwelwind 3y agoYou might be interested by an open-source project I started a few years ago but never really finished: https://github.com/ravens-engine/core 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/ https://longwelwind.net/blog/networking-turn-based-game/ Good luck in your project!
- deleted 3y ago[deleted]
- joshbuddy 3y agoOh 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.
- Longwelwind 3y agoYou 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).
- rosmax_1337 3y agoI 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_-3 3y agoYou 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.
- joshbuddy 3y agoFwiw, 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.
- bananamerica 3y agoI 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.
- joshbuddy 3y agoGood feedback, let me see what I can do about this and thanks
- kevinyew 3y agoBeen 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 3y agoOh 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