Page 1 of 1

Implementing Team Selection and Dealing Specific Decks in Board Game Arena

Posted: 13 December 2023, 04:54
by leocheung0725
Hello fellow BGA Studio developers,

I’m currently developing a two-player board game on Board Game Arena and have encountered a design challenge. The game features two completely distinct decks, each associated with a specific team. Players must choose a team at the beginning of the game, which will determine the deck they'll play with.

What is the best practice for allowing players to choose their team at the start of the game? Is there a standard UI component or method in BGA Studio that facilitates this?

Thank you in advance for your help!

Re: Implementing Team Selection and Dealing Specific Decks in Board Game Arena

Posted: 13 December 2023, 17:54
by GTSchemer
Since the game is 2-player, the "team" is just the same as choosing a "faction", right?

In that case, it would be the same as any game that allows players to choose a faction or board. For example, there is an Ark Nova option that lets all players choose their boards as the game begins. You would use a dedicated state for it.

Re: Implementing Team Selection and Dealing Specific Decks in Board Game Arena

Posted: 14 December 2023, 11:16
by leocheung0725
Thank you for your response. It seems a good idea, but i am a new developer and i can't access the code of ark nova, is it any method let me have a reference.

Re: Implementing Team Selection and Dealing Specific Decks in Board Game Arena

Posted: 14 December 2023, 12:16
by RicardoRix
There is no magic, you have to do everything yourself. Create a new game state, call it 'chooseDeck' or something, after the selection is made by each player, then you can move state onto playing the game. It will be a good little exercise to do yourself if you've just first started BGA coding. You have to add the buttons (JS), handle the events (JS ajax call -> .action.php -> game.php) there you can handle it all in the php backend game.
You can read the docs, and look at the tutorials on BGA Studio.