by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    zhale
    @ZhaleTaheri_gitlab
    this.props.G is not update after action
    zhale
    @ZhaleTaheri_gitlab
    Can anyone help me?
    1 reply
    Mohre
    @Mohre
    what is automatic: true in game logs?
    3 replies
    Mohre
    @Mohre
    In my game every player do a move in each turn. but in some rare situations the player should do an extra move for that turn. what it the best practice for implementing this game with boardgame.io?
    7 replies
    Camille Roux
    @camilleroux
    Hi ! I'd like to have some tips to know how to structure my game. I'm working on a game with the followings rules :
    • Each "turn", all the players program X action. They can do that at the same time.
    • When all the player programmed their actions, they are executed in the following order : Action 1 Player 1, Action 1 Player 2... Action 2 Player 1, Action 2 Player 2
      Have you got some tips to do that simply with this framework ?
    3 replies
    Ruslan Hydra
    @HydraOrc
    I try to write a mongodb multiplayer storage based on existing postgresql storage. The game inits on client side, calls a fetch function of my db class, but then there is no such game created yet and it runs into errors. How do I write a functionality so my storage creates and inits a new game automatically in this case in a correct way? Maybe call game setup function somehow?
    5 replies
    Ruslan Hydra
    @HydraOrc
    Does disableUndo work right now? I can not find it in the source and passing it still adds _undo to my database
    4 replies
    Mohre
    @Mohre
    Why lobby-view has inline style?
    <div id="lobby-view" style={{ padding: 50 }}>
    1 reply
    bignuts
    @bignuts
    I can't get my head around Stages, in my game usually a player can either take an action during his stage or pass to the other player, when both player decide to pass and not take any more action the turn end. So a small example would be, Player0 start the turn, he plays a unit and pass, Player1 plays two spell to take out Player0 unit and pass back to Player0, Player0 now is passing , Player1 play unit and pass, Player0 is passaing again and so il Player1, the turn end. So basically during a turn the players can take action back and forth until both passes. Rigth now i just end turn when a player is done taking action, and in G i have the actual turn counter, i know there are stages for this, but really can't make it working. Any help is appreciated. Thanks!
    3 replies
    Sheldon Chen
    @SheldonSChen
    This message was deleted
    Benny George Kenkireth
    @bgkiitg
    I am a newbie . I am at sea trying to design the UI for the player-related data. I can access the general data from G. The trouble I face is how to figure out the ID of the player. Thanks in advance.
    2 replies
    Emily Kolar
    @sheminusminus
    Hey! Cool framework. Two questions for anyone who might know:
    1) Can I configure to assign a player’s ID serverside? 2) How does one trigger a move that can only run on the server?
    7 replies
    Emily Kolar
    @sheminusminus
    (I understand I can set someMove.client to false, just not how to trigger that move from some clientside player action)
    zhale
    @ZhaleTaheri_gitlab
    Hi, I have another problem
    I do not want change current player with change phase
    5 replies
    does anyone have a solution?
    Solomon
    @nightfire445
    Hello! I've been taking a deep dive into the lobby component and the underlying koa api. One of the use cases for my project is to use the player name from the lobby inside the game that they join. My peek through the source seems to indicate that this is not possible since the join route appears to store the meta data with koa not with the game client, but I wanted to get confirmation that I'm not barking up the wrong tree with my assessment. Thank you in advance!
    2 replies
    Andrey
    @fxuniverse

    Hey folks. Huge props to @nicolodavis for a great framework.
    Wanted to share an adaptation for the classic Sequence game I made using it: https://sequence.cards
    It's in open beta, please feel free to test and share feedback on how I can make the game better.
    Also utilized - Angular 10, Angular Material, NgRx, Firebase for db.
    I plan to open source it, after cleaning up private keys and such.

    @nightfire445 to your question about using names in the lobby and later in the game - I bypassed the Koa app and just used Firebase directly, subscribing to the players array real-time

    5 replies
    Sushil Kumar Dhayal
    @skdhayal
    Hi, I have 8 players in multiplayer game mode. How do i allow each player with dynamic moveLimit ? Please help me.
    2 replies
    zhale
    @ZhaleTaheri_gitlab
    I want each phase to run with a delay time
    1 reply
    Zeb Ford-Reitz
    @zford-reitz
    Here comes yet another Heroku question: does anyone have a recipe for deploying both lobby and game when using React with Typescript? I tried ts-node to at least get it working, but those attempts also failed.
    1 reply
    Ram Agrawal
    @ramagr07
    Hey folks! Is there any way to get a client to join the game in spectate mode?
    1 reply
    Ruslan Hydra
    @HydraOrc
    Hey, guys, is there any way to fire a gameover event on the server side? Or do I have to check the database with some frequency for this?
    3 replies
    Sheldon Chen
    @SheldonSChen
    Hi, so I have two separate move functions with some lines in common that mutate G, and so I tried separating the common lines into a helper function, but I got UnhandledPromiseRejectionWarning: Unhandled promise rejection. Does anyone know how I can do this, or if it's even possible?
    1 reply
    David Friedman
    @Derongan
    Hello, I have a few questions
    1. Is there a way to set an initial stage like there is for phases? Or is it intended that the moves defined outside of turns are the "initial" stage?
    2. Do stages support an onEnd or any other triggers? It seems like it would be nice to be able to have multiple moves in a stage do the same cleanup automagically
    3. Is there any concept of temporary state for a phase? Say the furst move in a turn effects later moves in the same turn, but shouldn't affect the final state. Is the correct way to handle this just to clean up yourself using an onEnd trigger on the turn?
    5 replies
    Art Tosborvorn
    @artt
    Is there a way to delay the stage? Let's say a player rolls a dice and the token lands on some square... which happens to have some sort of modifier to it, so the token gets bumped elsewhere. Is there a way to have the two events separate by some delays? I tried setTimeout but seems like once the "move" function has returned, there's no way to refer to the Game object. Thanks!
    2 replies
    Nicolo John Davis
    @nicolodavis
    @HydraOrc I think I may have accidentally deleted your comment asking about bot objectives while trying to respond to it!
    To answer your question, there aren't any examples at the moment. I haven't looked at the bot API for a while now, and it's definitely not in the final state that I'd like it to be.
    1 reply
    zhale
    @ZhaleTaheri_gitlab
    Hi, I have a problem that ctx is not updated when the phase changes
    David Friedman
    @Derongan
    Is there a simple way to end a turn once a stage ends?
    1 reply
    I tried endIf once activePlayers was null, but it seems that endIf runs before the stage is changed
    Chris Swithinbank
    @delucis
    @Derongan endIf can work, but activePlayers is null when endIf is called at the start of the turn (not sure if there’s a good reason for this), so you need to also check if any moves were made:
    endIf: (G, ctx) => ctx.numMoves > 0 && ctx.activePlayers === null,
    Joao Lucas de Carvalho Arruda
    @jlcarruda

    Hello, I'm new using the boardgame.io and I have a strange error that happens when I try to use React with the Client.

    import React from 'react'
    import { Client } from 'boardgame.io/react'
    import { BrowserRouter, Switch, Route } from 'react-router-dom'
    
    import { GameJA } from '../game'
    import { Game } from '../pages'
    
    const GameClient = Client({
      game: GameJA,
      board: Game
    })
    
    export const Routes = () => (
      <BrowserRouter>
        <Switch>
          <Route
            path="/"
            exact
            component={GameClient}
          />
        </Switch>
      </BrowserRouter>
    )

    When I use the GameClient as the component prop for the Route, I get this error:
    Error: Function called outside component initialization

    Does anyone know why? D:

    2 replies
    Ruslan Hydra
    @HydraOrc
    Guys, how do you ensure that you do not run into race conditions when you allow both players to do moves simultaniously at the same turn or also if one player issues a couple moves at the same time (ERROR: invalid stateID, was=[11], expected=[13])?
    4 replies
    kamr
    @kamr
    image.png
    any ideas why my Lobby isn't working? the FE doesn't seem to hit the backend at all
    1 reply
    David Friedman
    @Derongan
    INVALID_MOVE is nice and all, but is there a way to return a reason with it that could be surfaced to the client?
    1 reply
    Art Tosborvorn
    @artt

    I created a clone of Camel Up (graphics is still a work in progress). Let's say the basic move is rolling a dice. The token gets advanced by the number on the dice. If the token lands on a tile with a modifying property, say, +1, then the token would get bumped by one. Let's say the roll is 3, the token gets moved to tile #3, and let's say the tile has +1 mod, the token would end up on tile #4. What I have right now is something like:

    moves: {
      roll: (..) => {
        roll()
        resolveMove()
      }
    }

    where resolveMove is the function determining if the token will need to be moved (if it lands on the tile with a modifying property, that is). So the client gets only the board state after everything is done, and only knows that the token got moved from tile #0 to tile #4.

    I'd like to create an animation in between, so that the client would see a roll of 3, see the token gets moved to tile #3, then (after a delay) gets bumped to tile #4.

    My question is, how should this be done?

    One way is to have the server send out multiple state changes (so the move would be roll (return token at #3) -> delay -> resolveMove (return token at #4).

    Another way is to provide the client with resolveMove logic, so the client could figure out the animation by itself.

    My intuition is that the latter way should work better. Just wanna confirm that. Thanks a lot!

    1 reply
    kamr
    @kamr
    image.png
    9 replies
    sorry @adngdb - I don't seem to be able to paste an image in a thread
    kamr
    @kamr
    image.png
    Corentin Dancette
    @cdancette
    Hi! I'm having an issue with boardgame.io. I noticed that when I return an INVALID_MOVE, for the current player which is in a specific phase, it ends the phase instead of doing nothing
    2 replies
    Is this an expected behaviour ? From reading the doc it seems that returning INVALID_MOVE should not change the state G or ctx
    Adrian Gaudebert
    @adngdb
    Hey @delucis, is https://github.com/delucis/bgio-effects in a usable state?
    3 replies
    kamr
    @kamr
    is there a way to change the "game" of a room? e.g. if I have 2 players in a room playing tic-tac-toe and I want them to be able to switch to chess?
    I guess I would need to create a new "chess" room, and have both players leave the current room and join the new one?
    1 reply
    rather than somehow just changing the game type of the current room
    Corentin Dancette
    @cdancette
    @delucis here's a codesandbox that reproduces the behaviour