loading

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!

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

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're 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.

Login


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.


Register


new table in DB

Hi i've added a new table in DB & I have this message :
Désolé, une erreur inattendue s'est produite...
Error while processing Database request (2.boardgamearena.com 02/06 10:34:20)

i've added this in DB MODEL

CODE: Select all

CREATE TABLE `moves` (
  `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `x` mediumint(9) NOT NULL,
  `y` mediumint(9) NOT NULL,
   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

and this in GAME.PHP

CODE: Select all

       if( $from_version <= 2006020000 )
        {
            $sql = "CREATE TABLE IF NOT EXISTS DBPREFIX_moves (
                id smallint(5) unsigned NOT NULL AUTO_INCREMENT,
                x mediumint(9) NOT NULL,
  `             y mediumint(9) NOT NULL,
                PRIMARY KEY (id)
                ) ENGINE=InnoDB DEFAULT CHARSET=latin1";
            self::applyDbUpgradeToAllDB( $sql );
		}
Did I write anything wrong ?
06/02/2020 5 comments

Try to lock interface while it is already locked !

When going through a replay of my game (Downforce), I regularly get error messages in the javascript console and the interface blocks untill I click on the "next move". The error message is: Try to lock interface while it is already locked !

It happens at distinct places like move like move #137 of table https://boardgamearena.com/table?table=92381834

My guess: the onEnteringState method of my class does ajax calls while the interface is still locked from a previous one. Any idea on this? It looks like a studio bug, but maybe I am doing something wrong.

The full error stack:

CODE: Select all

Try to lock interface while it is already locked ! 3 ly_studio.js:2:652013
During notification gameStateChange
this.notifqueue[i] is undefined
ajaxcall@https://x.boardgamearena.net/data/themereleases/200527-1725/js/modules/layer/ly_studio.js:2:638508
onEnteringState@https://x.boardgamearena.net/data/themereleases/current/games/downforce/200528-0049/downforce.js:1:5434
ntf_gameStateChange@https://x.boardgamearena.net/data/themereleases/200527-1725/js/modules/layer/ly_studio.js:2:725390
hitch/<@https://x.boardgamearena.net/data/themereleases/200527-1725/js/dojoroot/dojo/dojo.js:8:33825
_269@https://x.boardgamearena.net/data/themereleases/200527-1725/js/dojoroot/dojo/dojo.js:8:60682
dojo/on/</on.emit@https://x.boardgamearena.net/data/themereleases/200527-1725/js/dojoroot/dojo/dojo.js:8:54866
dojo/on/</on.emit@https://x.boardgamearena.net/data/themereleases/200527-1725/js/dojoroot/dojo/dojo.js:8:55648
emit@https://x.boardgamearena.net/data/themereleases/200527-1725/js/dojoroot/dojo/dojo.js:8:59320
publish@https://x.boardgamearena.net/data/themereleases/200527-1725/js/dojoroot/dojo/dojo.js:8:58881
publish@https://x.boardgamearena.net/data/themereleases/200527-1725/js/dojoroot/dojo/dojo.js:8:51062
dispatchNotification@https://x.boardgamearena.net/data/themereleases/200527-1725/js/modules/layer/ly_studio.js:2:554583
dispatchNotifications@https://x.boardgamearena.net/data/themereleases/200527-1725/js/modules/layer/ly_studio.js:2:548746
onNotification@https://x.boardgamearena.net/data/themereleases/200527-1725/js/modules/layer/ly_studio.js:2:544763
sendNextArchive@https://x.boardgamearena.net/data/themereleases/200527-1725/js/modules/layer/ly_studio.js:2:662559
onEndDisplayLastArchive@https://x.boardgamearena.net/data/themereleases/200527-1725/js/modules/layer/ly_studio.js:2:668064
ntf_end_archivewaitingdelay@https://x.boardgamearena.net/data/themereleases/200527-1725/js/modules/layer/ly_studio.js:2:727726
hitch/<@https://x.boardgamearena.net/data/themereleases/200527-1725/js/dojoroot/dojo/dojo.js:8:33825
_269@https://x.boardgamearena.net/data/themereleases/200527-1725/js/dojoroot/dojo/dojo.js:8:60682
dojo/on/</on.emit@https://x.boardgamearena.net/data/themereleases/200527-1725/js/dojoroot/dojo/dojo.js:8:54866
dojo/on/</on.emit@https://x.boardgamearena.net/data/themereleases/200527-1725/js/dojoroot/dojo/dojo.js:8:55648
emit@https://x.boardgamearena.net/data/themereleases/200527-1725/js/dojoroot/dojo/dojo.js:8:59320
publish@https://x.boardgamearena.net/data/themereleases/200527-1725/js/dojoroot/dojo/dojo.js:8:58881
publish@https://x.boardgamearena.net/data/themereleases/200527-1725/js/dojoroot/dojo/dojo.js:8:51062
dispatchNotification@https://x.boardgamearena.net/data/themereleases/200527-1725/js/modules/layer/ly_studio.js:2:554583
dispatchNotifications@https://x.boardgamearena.net/data/themereleases/200527-1725/js/modules/layer/ly_studio.js:2:548746
onSynchronousNotificationEnd@https://x.boardgamearena.net/data/themereleases/200527-1725/js/modules/layer/ly_studio.js:2:564111
hitch/<@https://x.boardgamearena.net/data/themereleases/200527-1725/js/dojoroot/dojo/dojo.js:8:33825
_269@https://x.boardgamearena.net/data/themereleases/200527-1725/js/dojoroot/dojo/dojo.js:8:60682
dojo/on/</on.emit@https://x.boardgamearena.net/data/themereleases/200527-1725/js/dojoroot/dojo/dojo.js:8:54866
dojo/on/</on.emit@https://x.boardgamearena.net/data/themereleases/200527-1725/js/dojoroot/dojo/dojo.js:8:55648
emit@https://x.boardgamearena.net/data/themereleases/200527-1725/js/dojoroot/dojo/dojo.js:8:59320
publish@https://x.boardgamearena.net/data/themereleases/200527-1725/js/dojoroot/dojo/dojo.js:8:58881
publish@https://x.boardgamearena.net/data/themereleases/200527-1725/js/dojoroot/dojo/dojo.js:8:51062
endnotif@https://x.boardgamearena.net/data/themereleases/200527-1725/js/modules/layer/ly_studio.js:2:451633
@https://x.boardgamearena.net/data/themereleases/200527-1725/js/modules/layer/ly_studio.js:2:1

Excerpt of my method:

CODE: Select all

onEnteringState: function( stateName, args )
{
    switch( stateName )
    {
	// [...]
	case 'moveCar':
	// [...]
	if ( movements . color == 'Joker' )
	{
	    this.ajaxcall( this.gameUrl + "chooseJokerColor.html", { lock: true }, this, function( result ) { } );
	    return;
	}
	// [...]
    }
}
06/02/2020 2 comments

Temporary Disable Communication

Hello Everyone!

This might be documented elsewhere but I was unable to find it so I'm going to ask here.

Is there a way to temporarily disable the table chat during a specific game state? If so, how?

Please let me know!
06/01/2020 Comment on this


Application loading... ...
THANK YOU : You are one of our most loyal players!
Get the best from Board Game Arena for only €2 / month.
1
2
3
4
5
6
7
8
9
10
11
12