If you see this message, it means that your browser failed to load this file.

You should try the following : check your connection, disable ad-blocker, clear your browser cache, try in private mode, try from another browser/computer/connection.

Home »
BGA Studio
(for web developers)

• You are a web developer fluent in server side (PHP, SQL) and client side (HTML, Javascript) languages

So this presentation looks easy and fun to you.

• You want full access to the BGA development stack to develop complex games (but we still advise you to start with something simple for your first game!)

Check the documentation and tutorials to get started!

BGA Sandbox
(for everyone)

• You want to set your game material on a virtual table with an easy to use "Powerpoint for Board Games" tool, and play with it immediately

Start the Sandbox and build your interface now!

• You have some development experience allowing you to use a simple scripting language to implement the rules

Check the documentation for scripting the rules!

What is BGA Studio?

Getting started

4 slideshare presentations to get ready to use BGA Studio in 30 minutes:

Reference Documentation

This page comes from BGA wiki, and has been written by BGA players community. Feel free to edit it!

What is Board Game Arena Studio?

Board Game Arena Studio is a platform to build online board game adaptations using the Board Game Arena platform.

It is open to any gamer with software development skills :)

BGA Studio website: http://en.studio.boardgamearena.com

Original announcement on BGA forum: http://forum.boardgamearena.com/viewtopic.php?f=10&t=1973

Discover BGA Studio in 5 presentations

Why, how, what... to start discovering BGA Studio, we prepared 5 "powerpoint" presentations for you:

How to join the BGA developer team?

Please see this page: How to join BGA developer team?

Great, I'm in! ... How should I start?

If you didn't already, check the presentations at the top of this page to get the basics.

Then, you should checkout the First steps with BGA Studio to make sure that runs fine.

After that, we strongly advise you to take one of these game creation tutorials:

Then start editing files and see what happens! ;)

Once you done with tutorials, you can start a real game (or join existing project)

If you have any questions, please check out the Studio FAQ first, then if you didn't find the answer you were looking for, please post your question on the development forum.

BGA Studio documentation

BGA Studio Framework reference

This part of the documentation focuses on the development framework itself: functions and methods available to build your game.

File structure of a BGA game

Game logic (Server side)

Game interface (Client side)

Other components

BGA Studio game components reference

Game components are useful tools you can use in your game adaptations.

  • Deck: a PHP component to manage cards (deck, hands, picking cards, moving cards, shuffle deck, ...).
  • Counter: a JS component to manage a counter that can increase/decrease (ex: player's score).
  • Scrollmap: a JS component to manage a scrollable game area (useful when the game area can be infinite. Examples: Saboteur or Takenoko games).
  • Stock: a JS component to manage and display a set of game elements displayed at a position.
  • Zone: a JS component to manage a zone of the board where several game elements can come and leave, but should be well displayed together (See for example: token's places at Can't Stop).

Undocumented component (if somebody knows please help with docs)

  • Draggable: a JS component to manage drag'n'drop actions.
  • ExpandableSection: a JS component to manage a rectangular block of HTML than can be displayed/hidden.
  • Wrapper: a JS component to wrap a <div> element around its child, even if these elements are absolute positioned.

BGA Studio user guide

This part of the documentation is a user guide for the BGA Studio online development environment.


Please remember me

Join the BGA Studio developers team

To start developing on BGA Studio and get access to development environment, you need to create an account below.

Personal infos provided in this form is NOT shown to anyone but BGA Studio admin, and is NOT used for any other purpose that BGA Studio organization.

(Must be valid. We may remove accounts from developers we can't contact.)

(3 to 20 characters. No space, no number, no special characters)

(The exact username you are using on BGA)

Important: we need your REAL name to attribute your work on the Studio & to send you stuff by Post when needed.

Important: we need your REAL name to attribute your work on the Studio & to send you stuff by Post when needed.

Please enter the security code you see

I agree to Terms&conditions for developers of BGA Studio.


Game options displaycondition

Hi everybody,

I am dealing with a 4-player game game which can be played either in teams or individually.
If there are teams, I want to display another option to choose how teams are created based on the position of players in the table.
So, I think that's a job for 'displaycondition'. Here what I'm

Code: Select all

$game_options = array(
    100 => array(
        'name' => totranslate('Game type'),
        'values' => array(
            1 => array('name' => totranslate('Teams'), 'tmdisplay' => totranslate('Team game')),
            2 => array('name' => totranslate('Free-for-all'), 'tmdisplay' => totranslate('Free-for-all game')),
    101 => array(
        'name' => totranslate('Team settings'),
        'values' => array(
            1 => array('name' => totranslate('Random')),
            2 => array('name' => totranslate('1st/2nd vs 3rd/4th')),
            3 => array('name' => totranslate('1st/3rd vs 2nd/4th')),
            4 => array('name' => totranslate('1st/4th vs 2nd/3rd')),
        'displaycondition' => (
                 'type' => 'otheroption',
                 'id' => 100, // Only if game type...
                 'value' => 1 // Is set on "Teams"

Unfortunately, the second option "Teams" does not disappear when I select the "Free-for-all" value on the first option...

So I think I miswrote that; what am I missing?

Thanks a lot!

11/11/2018 1 comment

activeNextPlayer() includes eliminated players

I suspect https://en.boardgamearena.com/#!bug?id=11368 is a BGA framework bug. It appears $this->activeNextPlayer() does not check for player elimination. In game https://en.boardgamearena.com/#!gamerev ... e=45466119 player adamjthompson00 is eliminated @ move 8. The system sets him to be the active player @ end of move 17, which triggers the bug. Why was he made active again?

If a player is eliminated, the framework should never make him active under any circumstance. All of these functions need to ignore eliminated players:
  • $this->activeNextPlayer()
  • $this->activePrevPlayer()
  • $this->gamestate->changeActivePlayer( $player_id )
  • $this->gamestate->setAllPlayersMultiactive()
  • $this->gamestate->setAllPlayersNonMultiactive( $next_state )
  • $this->gamestate->setPlayersMultiactive( $players, $next_state, $bExclusive = false )
  • $this->gamestate->setPlayerNonMultiactive( $player_id, $next_state )
11/09/2018 2 comments

Error while commiting


I have the message below when commiting.
I don't have more than 20 images files and my misc folder does not do more than 1Mo anymore after I removed some images.
What can I do please ?

Code: Select all

Wrote /tmp/monsterlandsnolatall-commitlog.txt

$ /var/tournoi/release/release-current/scripts/studio/retrievestudiogame.sh monsterlandsnolatall 1.studio.boardgamearena.com 2>&1

HAL says: retrieving monsterlandsnolatall from 1.studio.boardgamearena.com...
receiving incremental file list

sent 68 bytes received 1,476 bytes 3,088.00 bytes/sec
total size is 7,407,856 speedup is 4,797.83
HAL says: marking for deletion images removed from the source...
svn: E195006: Use --force to override this restriction (local modifications may be lost)
svn: E195006: '/var/tournoi/games/monsterlandsnolatall/img/magic_dice.png' has local modifications -- commit or revert them first
HAL says: done.

$ /var/tournoi/release/release-current/scripts/studio/commitgame.sh monsterlandsnolatall no 2>&1

HAL says: committing monsterlandsnolatall...
HAL says: just a regular commit, Dave.
Updating '/var/tournoi/games/monsterlandsnolatall':
At revision 30349.
********* WARNING **********
** HAL says: more than 20 image files. Did you think about using CSS sprites, Dave?
********* /WARNING *********
svn: warning: W155010: '/var/tournoi/games/monsterlandsnolatall/img/strips' not found
svn: E200009: Could not add all targets because some targets don't exist
svn: E200009: Illegal target for the requested operation
********** ERROR ***********
** HAL says: more than 1 Mo in misc folder. Aborting. Please check your misc folder, Dave.
********** /ERROR **********

$ /var/tournoi/release/release-current/scripts/studio/overwritestudiogame.sh monsterlandsnolatall 1.studio.boardgamearena.com 2>&1

HAL says: overwriting monsterlandsnolatall on 1.studio.boardgamearena.com...
HAL says: done.
11/04/2018 5 comments

Application loading ... ...
THANK YOU : You are one of our most loyal players!
Get the best from Board Game Arena for only €2 / month.