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 »

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! ;)

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).
  • 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.
  • 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.
  • Wrapper: a JS component to wrap a <div> element around his child, even if these elements are absolute positioned.
  • 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).

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 BGA Studio developer 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


Stock's getSelectedItems returns invalid types

I'm in my games JS file. I have built a function that will react when someone clicks a card. When clicked I am printing to the console my hand and the results of getSelectedItems:

console.log(this.gamedatas.hand);
console.log(this.playerHand.getSelectedItems());

The problem is that they don't match. The card IDs do but not the types. I selected the 8 of Diamonds. So I get this in my hand printout:
{id: "3", type: "4", type_arg: "8", location: "hand", location_arg: "2300762"}

and I get this from the selected items:
{id: "3", type: 45}

So the IDs match with the 3 but why would I get a type of 45 from the getSelectedItems function ? I'm confused as to what this is and the wiki isn't super helpful as it simply says that this function "Return the list of selected items, as an array with the following format" and shows ids and types. This seems super odd.

I need to know what card is being selected by suit and number. Is there a way in the JS file to do this? I can see how I would do it with the deck library used in the game.php file with getCard but how can this be done from the JS file?

Sorry again if this is a very basic thing and I'm simply not catching what should happen.
02/21/2018 Comment on this.

Ok, I'm making progress lol... Where is the trigger for a card to be played in Hearts?

I cannot figure out how the click to a card is actually causing the playCard function to be called. Where in the hearts tutorial (or other games) is the trigger from the click of the card?


My goal:
Right now I'm trying to figure out how to click multiple cards and then click a button to cause them to be played to the table. Many card games allow you to play multiple cards. Think Hand and Foot, Durak, Scum, Phase 10, Rummy or a number of other games. So the goal is to allow the player to select multiple cards and click a button to cause them to be played to the table, discarded or handed to another player. Any help here would be very appreciated. I still have a long way to go to understand states and notifications and such but I'm at least learning and getting something that is working.

As a side note, wouldn't it be nice to have a series of tutorials that show how individual features of the framework work? Maybe one that shows how to build new states and what all has to be changed/added to make a state change work. Or maybe a tutorial on how to adjust points or trigger buttons to pop up when certain criteria are met.
02/21/2018 4 comments

'Null' values for statistics?

For P.I. I'd like to add a statistic for each player "How many rounds before able to solve.", but I'd like it to be taken into account when the player actually solved.

If I initialize it with 0 and then the player does not solve at all, the 0 will move their average down: let's say 5.31 would be the average for all players, then a player who almost never solves (i.e. is really bad) would over time get a "better" average value (e.g. 0.9) than a good player (e.g. 4.8).

Is it possible to set a statistic value to null at the end of a game, so that it is not counted? As a work-around I could set it to some very high value of course (999), but that would also taint the stats. Or maybe set it the the average of all players of that game, so that it drags the player's average to "somewhere in the middle"?
02/16/2018 2 comments


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