Page 2 of 2

Re: [Sandbox] Feedback and questions

Posted: 03 May 2020, 10:05
by laedit
Still no responses/remarks on my first post?

I added some responses I found for questions #1 and #6.

Regarding question #2 on adding buttons in the action status bar, I use clickable labels for now but they are visible to everyone.

So I tried to used the setProperties method like this:

Code: Select all

var props = [];
bga.getElementsArray({ tag: 'LABEL' }).forEach(labelId => props[labelId] = { visible: 'player' + bga.getActivePlayerColor() });
bga.setProperties(props);
During postSetup state and when switching to the next player (after call of nextPlayer() and nextState('nextPlayer').
It works well for the first player, but after that it doesn't change dynamically, players have to refresh the browser page.

Do I need to do it differently?

Re: [Sandbox] Feedback and questions

Posted: 03 May 2020, 10:21
by Een
Sorry, sandbox has been available for a long time now while generating almost no interest from developers on the studio.

While we are happy to see it get some interest with the current surge in activity on the studio in general (thanks for your feedback!), with everything else we don't currently have the resources to properly support sandbox development. We plan to stop advertising it on the studio home page for now (while keeping it available for developers willing to poke into it), until we have the possibility to decide about the future of this tool.

Some more info:
- studio sandbox announcement: viewtopic.php?f=12&t=12704&p=43069
- answering some questions about the state of the tool: viewtopic.php?f=12&t=14748

Re: [Sandbox] Feedback and questions

Posted: 03 May 2020, 17:37
by laedit
Thanks for the response!

I will continue to poke around then and hoping that this tool will continue to exists :)

Re: [Sandbox] Feedback and questions

Posted: 04 June 2020, 17:15
by laedit
So I finally made a "playable" version: https://studio.boardgamearena.com/gamep ... llesabords
Video sample: https://ghcdn.rawgit.org/laedit/bga-pir ... ample.webm

:!: Warning, all assets are only scanned for now and there is only one card per type, because I want to fix some things before asking for the license, in order to not give false hope to players.

And I have realized (a little bit late, yes) that this game is maybe too complex to be created in sandbox: I had to determine the next player manually because I had to check some player related data in the start of his turn, but the bga.nextPlayer() appears to do something only after the js code is fully executed, meaning returned to the client-side, and I cannot depend on a player action to check.

But the main blocking point for me is the lack of action button (I know, the sandbox is not like the main PHP framework and that is ok) so I have "replaced" it by clickable label, but if there is anyone who have an idea to replace them by a more UX friendly approach I am listening! :D
Since this game is like Can't Stop I haven't found a better way for the player to signal that he wants to stop his turn.

Anyway, for the code part, the source code in typescript is published on github here.
And I have (tried to) typed the bga api: https://github.com/laedit/bga-piratenka ... lobal.d.ts