Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    kamr
    @kamr
    rather than somehow just changing the game type of the current room
    Corentin Dancette
    @cdancette
    @delucis here's a codesandbox that reproduces the behaviour
    To reproduce: Click on the button "enter stage". This sends the current player in a specific stage. Then, click on the button "Invalid move". This shouldn't do anything, but it removes the current player from its stage (as seen in ctx.activePlayers , that goes to null)
    Oops, it seems that it actually has the desired behaviour
    Corentin Dancette
    @cdancette
    I'm not sure what happened in my app then, I certainly made a mistake somewhere, sorry !
    1 reply
    It works perfectly now :)
    1 reply
    Corentin Dancette
    @cdancette
    I have another question, about the "undo" action. I tried to add a button, but any time I press it, the server outputs "ERROR: playerID=[0] cannot undo / redo right now"
    same for the other player
    is there something to configure to make it work?
    Chris Swithinbank
    @delucis
    Ah, that’s probably due to this bug: nicolodavis/boardgame.io#565
    7 replies
    The logic accepting/rejecting undo actions is not very good with stages active at the moment.
    Corentin Dancette
    @cdancette
    Ah, yes, i'm using a lot of stages
    Thanks, maybe i'll implement my own undo if it's really needed!
    About stages, in the documentation, it says that they're mostly useful for non active players, but I'm using them a lot for active players, is this a bad practice ?
    I use them to restrict the range of actions that the current player can do
    Chris Swithinbank
    @delucis
    That sounds like a good use, sure! They’re helpful for both scenarios.
    (Also, rather than implementing a whole undo system, you may like to look at the underlying code linked in that issue — there could be some very small changes we could make to fix the undo system using stages.)
    Corentin Dancette
    @cdancette
    Okay, neat :)
    I really like boardgame.io btw, so thanks a lot @nicolodavis, @delucis and other contributors for your work ! It makes it so much faster to code a multiplayer game! I enjoy particularely not having to deal with networking and state synchronization..
    Chris Swithinbank
    @delucis
    Nice to hear!
    Corentin Dancette
    @cdancette
    Hey! Is it possible to undo from the game, or is it only possible from the client ? Documentation mentions only the client this.props.undo()
    3 replies
    Davi Araki
    @DaviAraki
    I'm trying to run stages between phases, but i'm encountering 2 problems, first: i can't see which stage is as i can see the phase in ctx.phase. Second: the moves on the stage are not overriding anything
    17 replies
    Mohre
    @Mohre
    Hi. It wrote a custom player-view and need to mutate G in it.
    how can I apply immer to my custom player-view to let me change G instead of creating new one using spread syntax?
    2 replies
    Mohre
    @Mohre
    Is it possible to assign a client two different playerID?
    It is useful when a 4 player game played with 2 players each take 2 seats.
    2 replies
    aflorj
    @aflorj
    Hey, guys! I am making a card game and want to pause rendering at one point in each round.
    9 replies
    Günther
    @gunthergun
    Hey there, I am having trouble with understanding the PluginPlayer Code. I copied from the documentation what you are supposed to be using however, in my visual layer I cannot acces any values. G.player or G.players both are undefined. ctx.player is also undefined. The debug window also does not show any values from this plugin. However the setup runs at the start of the game for each player ? So what am I doing wrong ? Is there another way to access the player values that were setup at the start ?
    1 reply
    ThanosDodd
    @ThanosDodd
    Hello beautiful people. First-time user here. I'm creating a 2-player game whose movements are decided by 2 dice. Can I place the stages (and moves) of a particular phase within that phase or must I place stages separately inside turn: {} in the game constant?
    4 replies
    Alexander Craggs
    @popey456963
    Hey! Found boardgameio/boardgame.io#49 which points to simultaneous turns being possible using phases. Coudl anyone explain that somehow?
    ThanosDodd
    @ThanosDodd
    Hello! I'm making a 2-player game where each player's pieces move in opposite directions. I've solved this issue by changing the direction variable at the end of a turn but I'm a bit confused as to how to render the game in multiplayer mode. I want the board to look like their opponent's, but flipped (there is no issue with flipping the pieces as they are circular, the board is also symmetrical)
    1 reply
    Corentin Dancette
    @cdancette
    Hi! Is it possible to choose the playerID while using the default lobby implementation ?
    1 reply
    ThanosDodd
    @ThanosDodd
    Hello! Is a dice roll a 'move'? Meaning should it go in the game constant or the board.js?
    4 replies
    Alexander Craggs
    @popey456963
    Can stages have an 'onEnd'? For instance, we have a stage that applies to 'everyone' in a turn, letting them take one action. Once everyone has taken their turn, we want to run some other code.
    Oliver Ni
    @oliver-ni
    This library is awesome. Thanks for the hard work!
    1 reply
    ThanosDodd
    @ThanosDodd
    Indeed! Can I return the next phase within 'endIf' with a condition like so?
    endIf: (G, ctx) => { if () { return { next: 'option1'} } else { return { next: 'option2'} }},
    1 reply
    Alexander Craggs
    @popey456963
    My game always has two players, no matter what I do. How can I increase the number of players?
    10 replies
    ThanosDodd
    @ThanosDodd
    Hello! I'm looking to repeat a turn based on how many of the dice have been used. Can I call endTurn method like so at the end of the turn? next: { turnCheck(G, ctx) { if (G.dice.length > 0) { return "selectPiece" } else { return ctx.endTurn() } } }
    kngoh
    @kngoh
    Hi gang, I'm having an issues when I
    import { Local } from 'boardgame.io/multiplayer';
    Results in: Uncaught ReferenceError: regeneratorRuntime is not defined
    5 replies
    Alexander Craggs
    @popey456963
    @delucis any ideas on TypeError: JSONTree is not a constructor when I'm running tests? Specifically coming up on the line of import JSONTree from 'svelte-json-tree-auto';.
    3 replies
    Adrian Gaudebert
    @adngdb
    Hey folks! Is it possible to configure a phase so that it doesn't increase ctx.turn? I have a mulligan phase where players can choose cards in their hands, but I rely on the turn number at the start of my game for some special decisions. It's easy to solve, just look if ctx.turn is 2 instead of 1, but that smells very prone to bugs to me, so I wonder if there's a better way.
    3 replies
    Ahmed Mokhtar
    @xMokAx
    what is the best way to show the log in the client ?
    I'm thinking about looping over the log array and show the moves i want to move is this the best way to do it !?
    1 reply
    Randen Kelly
    @aowie1
    https://boardgame.io/documentation/#/secret-state
    says to import Game via
    import { Game, PlayerView } from 'boardgame.io/core';
    But Game isn't available in core
    8 replies
    Kumar Ayush
    @cheekujodhpur
    Hello folks, sorry for the silly question, but I am getting a Module Parse failed error
    Error in ./~/boardgame.io/dist/cjs/react.js Module parse failed: /home/cheeku/Projects/lama-client/node_modules/boardgame.io/dist/cjs/react.js Unexpected token (109:24)
    I've initialised my directory with create-react-app, then npm install boardgame.io, and then simply import { Client } from 'boardgame.io/react';
    This appears to be something trivial that I've missed, but having spent 2 hours over this, I must ask for help
    9 replies
    Mohre
    @Mohre
    How can we pass setupData to game setup function?
    I use Client from boardgame.io/react
    5 replies
    Gastón Ezequiel Durand Vadas
    @gdurandvadas
    Hello! Is it possible to end the game for specific players while the others continue playing?
    7 replies
    Adrian Gaudebert
    @adngdb
    hey @nicolodavis, I'm facing a new bug with v0.40.0-alpha, but the release is old, and @delucis added a bunch of changes to that branch since then. Would it be possible to make a new release of that branch, so that I could check if my bug persists with the latest changes?
    2 replies
    Chris Swithinbank
    @delucis

    @/all

    v0.40.0 has just been released. You can see a summary of the features and bugfixes in the changelog and details about breaking changes on GitHub.

    Thanks to everyone who contributed in putting this latest release together! :tada:

    2 replies
    Mohre
    @Mohre
    I make a minimal Splendor game hosted at bestboards.ir . I will be happy if you share your opinions with me.
    2 replies