Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Nicolo John Davis
    @nicolodavis
    Another approach worth considering is to attach something to ctx that would allow returning an error via a handler.
    ctx.error({ myrichobject })
    flamecoals
    @flamecoals
    true, and that fits more or less how we are doing events
    could even be return ctx.error({ yadayada });
    ctx.error() could always return INVALID_MOVE
    Chris Swithinbank
    @delucis
    Would you be able to bail out of the move function that way? Wouldn’t users need to do something like
    ctx.error();
    return;
    Nicolo John Davis
    @nicolodavis
    Another one is to use the long form move syntax to attach a "validator" to the move.
    I think this came up once before.
    I'll try to dig it up when I'm at a computer.
    Chris Swithinbank
    @delucis
    That’s nicolodavis/boardgame.io#292 I think
    Nicolo John Davis
    @nicolodavis
    @delucis Yes the bail out would not be possible unless we ask them to actually return the value of ctx.error.
    flamecoals
    @flamecoals
    I am not familiar with the long form move syntax, but would the validator be a separate logic? I would like to keep the validation inside the move logic already
    because it "fits" naturally most of the time
    (like in tictactoe checking the cell value)

    That’s nicolodavis/boardgame.io#292 I think

    oh, I see

    Chris Swithinbank
    @delucis
    I think whatever solution could probably be adapted to enable an optional isValid in the long-form syntax later.
    flamecoals
    @flamecoals
    yeah, I think #292 would lead to the same code duplication I see right now
    in the caller and inside the logic
    @delucis that's true, could be optional
    I will read the thread tomorrow, I am falling asleep here already hehehe :P good night folks
    Chris Swithinbank
    @delucis
    :smile:
    Babelattke
    @babelattke
    Hello everybody. I'm new here I would like to see what kind of games has been made with this framework. Thanks!
    Babelattke
    @babelattke
    nevermind. I found them.
    Stephen Shilale
    @sshilal1
    hello, running into an issue with multiplayer. i have STRIP_SECRETS enabled so that only the hand is sent, but the api route 'rename' renames the player.name field, so their names are hid to the other players. is there another way to adjust game state data (like a name) besides the rename route?
    Andres Blanco
    @andresblanco06_gitlab
    hey guys, I am trying to use antd component library to build a card game, at the moment I building the board. but for some reason my card components are not rendering how they should when using boardgame.io
    Rodrigo Teixeira
    @naiteon
    Hello everyone, these quarantine times makes up for boardgame.io games! I'm planning to develop some games for the platform and I'd like to thank you all for this work. As I'm trying to get started, one thing is still not clear to me. I don't wanna use React. Is there a bundle framework agnostic?
    flamecoals
    @flamecoals
    yep, the core is very framework agnostic
    @naiteon brasileiro?
    Rodrigo Teixeira
    @naiteon
    Sim
    flamecoals
    @flamecoals
    ok, needing any help let me know
    some examples of games are here: https://freeboardgames.org
    Rodrigo Teixeira
    @naiteon
    Thank you, yeah I just need to know exactly which files I need to download for a non-npm non-react ecosystem
    I'm old school :D
    flamecoals
    @flamecoals
    oh, non-react I understand, but non-npm is radical :P
    I think you can download the bundle directly from the website
    from the npm website
    Rodrigo Teixeira
    @naiteon
    Really? How did I miss that, i swept the whole website looking for that. Well to be honest boardgame.io is so promising that I gave in and downloaded npm. I'm checking the dist/ folder and though boardgameio.min.js would be it, but i can see some react stuff
    thought*
    Nicolo John Davis
    @nicolodavis
    You can download the bundled NPM files directly from unpkg: https://unpkg.com/browse/boardgame.io@0.39.4/dist/esm/
    client.js should not have anything React related
    Nicolo John Davis
    @nicolodavis
    Hey all, I'm considering moving this group chat to Discord. A few people have voiced concerns over brittle notifications and a poor mobile experience on Gitter.
    Is there anybody that strongly prefers Gitter?
    Chris Swithinbank
    @delucis
    I don’t have any experience of Discord, so can’t really compare. I do like that Gitter is public/open — discoverable for example via the “open chat” link on the docs site — and it seems to integrate well with GitHub issue linking etc, but Discord may have that too? I also appreciate that Gitter is open source, but I agree that the mobile experience is close to unusable.
    Andres Blanco
    @andresblanco06_gitlab
    @nicolodavis I am trying to use antd component library to build a card game, at the moment I building the board. but for some reason my card components are not rendering how they should when using boardgame.io
    Matt Zagrabelny
    @mzagrabe
    OT: Has anyone worked on a Caverna implementation with boardgame.io ?
    Chris Swithinbank
    @delucis
    For anyone who’s interested: the old MongoDB & Firebase database connectors used a simple caching model to limit database calls. I’ve generalised that caching mechanism to work with any boardgame.io database connector and it’s available here: https://github.com/delucis/bgio-storage-cache
    flamecoals
    @flamecoals
    +1 for moving to discord... I am always missing people calling me here because I dont get notifications properly. Also I am already a user of other discord servers so that makes it easier. I understand that it sucks that it isnt open source though :/
    On the plus side, we can have more channels there and etc.
    another option is Matrix, which is a clone of discord but open source
    but I haven't used that seriously so I don't know if I can recommend it... But I Know the Mozilla foundation moved to it