Getting Started with Development - Need Help with Correctly Setting Player Number

Game development with Board Game Arena Studio
Post Reply
User avatar
JoeProgram
Posts: 5
Joined: 14 April 2021, 22:19

Getting Started with Development - Need Help with Correctly Setting Player Number

Post by JoeProgram »

Hello,

I'm a long-time developer going through the Reversi Tutorial, and learning my way around PHP and the BGA development environment.

I've been recreating the Reversi Tutorial from a blank project, which defaulted to 4 players. Now that I've got my database setup, I'm trying to switch it to 2 players only. I'm having trouble - some parts of the interface seem to recognize it, while others don't.

1. I've got players set to an array of 2 in gameinfos.inc.php (Picture: https://drive.google.com/file/d/1OShoxJ ... sp=sharing)
2. The game description page correctly shows 2 players (Picture: https://drive.google.com/file/d/1kMZCRR ... sp=sharing)
3. But when creating a table, there are spots for 4 players (Picture: https://drive.google.com/file/d/13JfQhe ... sp=sharing)
4. And when I express start the game, I get errors about number of players (Picture: https://drive.google.com/file/d/1lP1BmD ... sp=sharing)

I've probably just misconfigured something somewhere. Would love any advice on what to investigate.

Thanks so much!

Joe
User avatar
Tisaac
Posts: 2736
Joined: 26 August 2014, 21:28

Re: Getting Started with Development - Need Help with Correctly Setting Player Number

Post by Tisaac »

You are probably locked in a dead state because the framework try to create the table with the same configuration as your last game played.
Solution is simple : put back 2-4 in your gameinfo, create new table (which will be 4 players) and go down 2 players then launch the game. Then you can quit and change gameinfos to 2 players again.
User avatar
JoeProgram
Posts: 5
Joined: 14 April 2021, 22:19

Re: Getting Started with Development - Need Help with Correctly Setting Player Number

Post by JoeProgram »

Thanks for the advice - it was spot on.

For future reference for people who run into the same situation:

1. I set the players array back to 'players' => array (2,3,4) and pressed the reload gameinfos button
2. I started a new game
3. On the table page, I bumped the number of players from 4 down to 2
4. Started and stopped the game
5. Went back into gameinfos.inc.php and set it back to 'players' => array (2) and pressed the reload gameinfos button.
Post Reply

Return to “Developers”