Live data from Hacker News

Boardgame.io: an engine for creating turn-based games using JavaScript

github.com

21–30 of 69 posts

Re: Boardgame.io: an engine for creating turn-based games using JavaScript

#21
post #10

Earlier quoted context omitted.

Put the screen on the kitchen table and sit around it, call it CounterTop Surface, have a little imagination man.

You say this like a joke, but that would bring a lot of usability and convenience improvements compared to a physical board game. Just moving stuff out of and back into the box can take a lot of work. It's easy to overlook rules that a computerized game automatically handles for you, though. For example, I'm part of a group that plays Heat ( https://boardgamearena.com/gamepanel?game=heat ) every week. An important pa…

Hey sorry if this is not the place for it but I play heat a lot too and I was looking for a group like this on bgm since the random matches have a lot of people rage quiting etc. can I ask to join this group?

Re: Boardgame.io: an engine for creating turn-based games using JavaScript

#22

This engine uses a Redux-like architecture. You have a State type (containing data like "the position of the black kingside rook") and a stream of in-game actions (like "knight to F3"). Each action is handled by a pure function which converts the current State to a new State. You can either transmit State deltas from the server to the client, or just transmit the actions themselves ( https://longwelwind.net/blog/netw…

My main pain point with any sort of Flux-like state management is transitions [1]. The state of UI is not fully described by the state of the game [2]. If I play a card, the game state can be instantly updated to the next decison-making point, but in reality I want to show steps of the game through animations, some of which are concurrent and some of which are consecutive. That usually ends up in a mess; and I've nev…

In my experience, the way to solve [1] and [2] is to design a game state that can also _fully_ describe the state of the UI, including animation cues.

Re: Boardgame.io: an engine for creating turn-based games using JavaScript

#24
post #14

Earlier quoted context omitted.

The boardgamelab.app looks like a stealth, proprietary project; at least at the moment its T&C[1] says: "under this license you may not (...) use the materials for any commercial purpose, or for any public display (commercial or non-commercial)". Do you have any plans for the business model? [1]: https://boardgamelab.app/terms-and-conditions

What do you mean by stealth? I looked at the website and nothing about it makes it look like it would necessarily be free or open source.

Still needs clearer language IMO.

Re: Boardgame.io: an engine for creating turn-based games using JavaScript

#25

This engine uses a Redux-like architecture. You have a State type (containing data like "the position of the black kingside rook") and a stream of in-game actions (like "knight to F3"). Each action is handled by a pure function which converts the current State to a new State. You can either transmit State deltas from the server to the client, or just transmit the actions themselves ( https://longwelwind.net/blog/netw…

Can you explain more what type of game would need a call stack snapshot? I've never developed a game, but it seems like as long as you store like the initial state and prng you could always get the current state by replaying the full history. All the other logic would be stored outside the state, and only added when "committed". As long as prng is stable and you start from the clean state every time, you'd get the sa…

I think I have a good example from Magic: the Gathering.

There’s a card called “Fact or Fiction”. You reveal the top five cards of your deck. Then your opponent splits the cards into two piles. Then you pick one of the two piles to take into your hand.

You’ll need to store structures representing the choices that are intermediary steps (split cards, pick stack) in your state, which is basically function calls and their params (a call stack). This example could get hairier - Magic also features cards with branching logic “choose 1: do a or b”. I can imagine designing cards with large and convoluted possible execution paths.

You could have the card define a schema for state transitions/params and represent all these choices as JSON encoded POJOs, but as a developer it sounds a lot nicer to just be able to suspend an async function every time a choice is made.

Re: Boardgame.io: an engine for creating turn-based games using JavaScript

#26

This engine uses a Redux-like architecture. You have a State type (containing data like "the position of the black kingside rook") and a stream of in-game actions (like "knight to F3"). Each action is handled by a pure function which converts the current State to a new State. You can either transmit State deltas from the server to the client, or just transmit the actions themselves ( https://longwelwind.net/blog/netw…

Can you explain more what type of game would need a call stack snapshot? I've never developed a game, but it seems like as long as you store like the initial state and prng you could always get the current state by replaying the full history. All the other logic would be stored outside the state, and only added when "committed". As long as prng is stable and you start from the clean state every time, you'd get the sa…

That's the exact approach I'm considering for the new engine I mentioned!

Although that strategy enables you to store and recover the state of a game, it doesn't give you the ability to inspect a snapshot of that state. How can you print the card which has just been played, if that data only exists as an argument in the call stack of a suspended async function? In the same way that you can't inspect the local variables captured by a closure, mainstream languages also provide no way to inspect a suspended stack frame.

This problem interferes with debugging, consistency checks (e.g. hashing the game state to check that two clients are in sync), and unit testing.

Re: Boardgame.io: an engine for creating turn-based games using JavaScript

#27
post #14

Earlier quoted context omitted.

The boardgamelab.app looks like a stealth, proprietary project; at least at the moment its T&C[1] says: "under this license you may not (...) use the materials for any commercial purpose, or for any public display (commercial or non-commercial)". Do you have any plans for the business model? [1]: https://boardgamelab.app/terms-and-conditions

What do you mean by stealth? I looked at the website and nothing about it makes it look like it would necessarily be free or open source.

> What do you mean by stealth?

I meant stealth as in: “or for any public display (commercial or non-commercial)”, see grandparent comment. I edited the grandparent comment now and added a comma between “stealth” and “proprietary”, hope this is clearer.

Re: Boardgame.io: an engine for creating turn-based games using JavaScript

#28

Original creator of boardgame.io here. A pleasant surprise to see this here after many years. More recently, I've been working on https://boardgamelab.app/ , which uses a visual programming language to model game rules while also taking care of the UI layer.

Omg! I've been noodling about making my word game https://WordGlyph.xyz multi player and been dreading that journey but now here it is!

Re: Boardgame.io: an engine for creating turn-based games using JavaScript

#29
post #21

Earlier quoted context omitted.

You say this like a joke, but that would bring a lot of usability and convenience improvements compared to a physical board game. Just moving stuff out of and back into the box can take a lot of work. It's easy to overlook rules that a computerized game automatically handles for you, though. For example, I'm part of a group that plays Heat ( https://boardgamearena.com/gamepanel?game=heat ) every week. An important pa…

Hey sorry if this is not the place for it but I play heat a lot too and I was looking for a group like this on bgm since the random matches have a lot of people rage quiting etc. can I ask to join this group?

Do you play live or turn based games? I never had an issue of people rage quitting, I also tend to set the games to one turn per day which is reasonable for most people.

Re: Boardgame.io: an engine for creating turn-based games using JavaScript

#30

Original creator of boardgame.io here. A pleasant surprise to see this here after many years. More recently, I've been working on https://boardgamelab.app/ , which uses a visual programming language to model game rules while also taking care of the UI layer.

> More recently, I've been working on https://boardgamelab.app/, which uses a visual programming language to model game rules while also taking care of the UI layer.

Suppose there were a technology that could turn the canvas you authored into finished, consistent art; and a way to turn natural language rules into correct code. Would you use it? Why or why not?

Post reply on HN