TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Card game where players write their own cards that get parsed into code

114 点作者 alnis大约 2 年前
Wordbots is a long-running side project I&#x27;ve been working on on-and-off for the past ~7 years that I finally feel comfortable enough with to share with the HN community.<p>It&#x27;s an online tactical card game (inspired by games like Hearthstone and Magic: the Gathering), where players write their own cards in natural language, that gets parsed down to JavaScript. The English-to-JavaScript translation is handled by a semantic parser operating on a hand-crafted CCG grammar – kind of an “old-school” approach in this age of LLMs but one that performs quite well on the very constrained language of Wordbots cards.<p>The resulting game gets pretty wacky as players can create all sorts of cards, though there are some game formats that try to produce more balanced gameplay as well (e.g. one format in which both players shuffle their decks together, and various draft formats).<p>If you&#x27;re curious about how it all works, I made a write-up about it here: <a href="https:&#x2F;&#x2F;app.wordbots.io&#x2F;how-it-works" rel="nofollow">https:&#x2F;&#x2F;app.wordbots.io&#x2F;how-it-works</a><p>And if you want to chat about Wordbots beyond this thread, please don&#x27;t hesitate to join our discord at <a href="https:&#x2F;&#x2F;discord.wordbots.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;discord.wordbots.io&#x2F;</a> . I&#x27;d love to hear any and all feedback.<p>-Alex

10 条评论

lcnPylGDnU4H9OF大约 2 年前
I don&#x27;t like competing so my first thought was to make a card which says, &quot;You win the game.&quot; Is that possible, ostensibly with great cost, or is there some restriction on the effects? I believe MTG card effects often directly translate to a certain &quot;mana&quot; cost so it can be determined (in most cases) if a card is &quot;overpowered&quot; for its cost. Does this have some mechanism which ties effect to cost?<p>(I also appreciate the &quot;old-school&quot; approach in this case; I suspect it actually makes it easier to determine that the intended card is invalid.)<p>Edit: I tried, and I guess it is able to understand that. Nothing which seems to tie that to a cost, though. That makes sense as you&#x27;d effectively have to define a game system while this is crowdsourcing that to the community. I imagine the intention for play (if there really is one) is to have players agree on a set of cards to use.
评论 #35879796 未加载
Tourniquet将近 2 年前
Hi, My son has taken a shine to this after I sent him the link (he&#x27;s up to 100 cards now...). Online, drafting, and the most important bit - user created content (he&#x27;d have been as happy with a traditional editor for the cards rules, but has had fun trying to convince the parser to do his bidding).<p>The Discord link is timing out for me. Hopefully you don&#x27;t mind a brain dump here.<p>He had one feature request - the ability to restrict the number of Rare&#x2F;Uncommon cards to be included in a deck built off of a given set (if that makes any sense).<p>Also, we hit a few bugs. One time we had a major state desync - on one player one team was entirely wiped out with a given card play, whereas on the other it had no&#x2F;limited effect. From that point, the games diverged in their entirety - including the log. It was only because we were sat next to each other we even knew.<p>Some form of hashing of the engine state and comparisons every play could ensure that at least a desync identified (which would hopefully lead to a fix).<p>Another time, the &#x27;End Turn&#x27; button was unresponsive for one player, and we instead had to force a draw.<p>He had an issue with a card he created that read &quot;when you draw a card, ...&quot;, which was triggering when the opponent drew too.<p>The final thing is more of an irritation, which is the &#x27;Activation&#x27; overlay can make it hard to move&#x2F;attack to the hex immediately to the right.<p>Otherwise, great game and it&#x27;s obviously a labour of love. Jist hope for a bit more interest and player activity.
评论 #35953809 未加载
mdaniel大约 2 年前
That looks neat, thanks for sharing. Speaking of sharing, it seems your repos are missing a license file (and the source files themselves don&#x27;t have a licensing block that would also serve the same purpose).<p>I would also recommend linking to <a href="https:&#x2F;&#x2F;github.com&#x2F;wordbots&#x2F;wordbots-core&#x2F;blob&#x2F;v0.20.0-beta&#x2F;docs&#x2F;How%20It%20Works.md">https:&#x2F;&#x2F;github.com&#x2F;wordbots&#x2F;wordbots-core&#x2F;blob&#x2F;v0.20.0-beta&#x2F;...</a> since the app.wordbots.io version seems to boot up some horrific amount of javascript or something, because the gears just sit there for about 15 seconds before the content finally shows up<p>Separately, do you know if the vocabulary for wordbots would tolerate the vocabulary for M:TG? IOW, is it possible to &quot;port-over&quot; some of the cards?
评论 #35879689 未加载
评论 #35879717 未加载
mdaniel大约 2 年前
Also, while not related to Wordbots, Alex has a cool JS sandbox-escape-y game <a href="https:&#x2F;&#x2F;alexnisnevich.github.io&#x2F;untrusted&#x2F;" rel="nofollow">https:&#x2F;&#x2F;alexnisnevich.github.io&#x2F;untrusted&#x2F;</a> (<a href="https:&#x2F;&#x2F;github.com&#x2F;AlexNisnevich&#x2F;untrusted#license">https:&#x2F;&#x2F;github.com&#x2F;AlexNisnevich&#x2F;untrusted#license</a> CC-BY-NC-SA 3.0) that I thought was fun and you might, too
zomglings大约 2 年前
I like the game itself - it feels well balanced when you are playing single-player mode with built-in cards only.<p>But creating your own cards is an INCREDIBLY frustrating experience. This is a robot I tried to create (sumbot):<p>&quot;This robot&#x27;s attack, speed, and health are the sum of the attacks, speeds, and healths respectively of all other robots in play.&quot;<p>It didn&#x27;t understand the words: &quot;are&quot;, &quot;sum&quot;, &quot;speeds&quot;, &quot;healths&quot;, &quot;respectively&quot;.<p>Very restrictive dictionary and grammar. It pissed me off at a deep level and I probably will step away from this game.<p>Maybe integrate with an LLM (such as GPT4) to accept card descriptions?<p>It seems I can set an arbitrary cost for my cards? How do you balance the game when it involves custom cards?<p>One strategy would be to give each player a deck consisting of their cards <i>and</i> the opponents cards. So if someone made a really imbalanced card, they would have a 50-50 chance of having it used on them.
评论 #35881186 未加载
评论 #35881198 未加载
评论 #35881169 未加载
评论 #35881517 未加载
whynotkeithberg大约 2 年前
Incredibly cool! It&#x27;s not normally my type of game but I am going to try this out for sure.
htaler大约 2 年前
I love the idea, and I&#x27;m going to try it out!
digging大约 2 年前
Weird bug I noticed (and I might have missed a better place to report it): The parser got stuck on the word &quot;praction&quot; in the phrase &quot;When this robot deals damage to another robot, prevent all damage that would be dealt to this robot.&quot;<p>&quot;Praction&quot; comes after the comma in that phrase, apparently?
评论 #35882284 未加载
habitue大约 2 年前
This is really cool, and actually I think LLMs would be a great fit: they can generate your constrained language from more freeform language input by the user. Might make it easier to get into, and you&#x27;ve done the hard work already by specifying a language for the card rules
MisterTea大约 2 年前
Neat idea. Unfortunately it knows nothing about infinite squirrels.
评论 #35881493 未加载