This is a documentation for Board Game Arena: play board games online !

Studio FAQ: Difference between revisions

From Board Game Arena
Jump to navigation Jump to search
m (Welcome email + support page)
(37 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{Studio_Framework_Navigation}}
This is a place where we will collect and answer frequently asked questions.
This is a place where we will collect and answer frequently asked questions.
== What is the PHP reference version? ==
Your game module should be compatible with PHP 7.4.
Some other version information can be found here https://en.doc.boardgamearena.com/Studio_file_reference#software_versions.


== What should I use to access the files through SFTP? ==
== What should I use to access the files through SFTP? ==
Line 5: Line 12:
There is a lot of tools to do that. Use the one you are the most comfortable with.
There is a lot of tools to do that. Use the one you are the most comfortable with.


On Linux, you can for example use the 'Connect to server' function of the Nautilus file management system, or use sshfs.
On Linux Gnome, you can for example use the 'Connect to server' function of the Nautilus file management system, or use sshfs.


On Windows, there is for example the WinSCP client.
On Windows, there is for example the [http://winscp.net/ WinSCP client].


== I can't access the Studio back-office, I get a 'Not authorized' error message? ==
See [[Tools_and_tips_of_BGA_Studio#File_Sync]] for more details.


You should first connect to the Studio website (with any of your <developer name><number> accounts). As the authentication is shared with the back-office, then you will be able to access it.
== I can't edit the files in my game directory, it looks like they are readonly. What's happening? ==


== I don't know the name to use to commit my game, what name should I use? ==
You can lose access sometimes if you add another developer as read/write or admin.


The game name for committing is the name of the game in lower case and without spaces or special characters (ex: puertorico).
To fix you can re-add yourself as Admin. Never remove youself! Just type your own name in user list and select Admin role (in control panel on studio for a specific game).
It is the same name as the name used for the game folder in your SFTP access.


== It's pretty annoying to log in with multiple users to start a game. Is there some easier way? ==
Maybe there is a maintenance operation underway.


You can use the 'Express start' function. It will automatically make the specified number of players join the game (using the first of your ten player accounts available) and start the game.
If you don't get access back after some time (say one or two hours), please post on dev forum.


During the game, there is a red arrow on the right of each player name, that you can use to open a tab from this player's perspective.
If you are still an admin for your game, re-add yourself as admin - it restores your permissions.
 
You can also end the game in two clicks by clicking the 'End game' button then selecting 'Express game stop' in the popup.


== What is the working language on BGA studio? ==
== What is the working language on BGA studio? ==
Line 38: Line 42:
== How can I provide translation in my language? ==  
== How can I provide translation in my language? ==  


BGA administrators will translate the game in French before the game release.
The community will translate the game in all language after the game release with the collaborative translation interface can be used to translate into other languages.


After the game release, the collaborative translation interface can be used to translate into other languages.
Check [[Translations]] to see how to make your game translatable.


== Is there a special way to declare the strings that must be translated? ==  
== I updated the images in the 'img' folder of my game, but they don't show? ==


Yes. This declaration is made through transparent functions, that depend on the context.
'''Concerning game_box.png, game_icon.png and publisher.png''':
You must use "Reload game box image" function from "Control Panel / Manage Games / Your game" to make your change visible.


In javascript files, you should use _( 'My string to translate' ).
'''Concerning other images''':
Other images used during the game are immediately available without any action.
If the images still don't show after that, please try emptying your browser cache and reloading the page (i.e. press reload holding Ctrl button).


In php files, you should use self::_( 'My string to translate' ) when the string can be translated on the server side (ex: title included in the game layout) and clienttranslate( 'My string to translate' ) when the string must be translated on the client side (ex: message for the game log).
== I added some game options / some game statistics / some game infos but they don't show? ==


== I updated the images in the 'img' folder of my game, but they don't show? ==
When you modify one of these 3 files, you need to use the corresponding update action from "Control Panel / Manage Games / Your Game" in order we can take this information into account.
 
== Should I use images free from copyright? ==


On BGA Studio, there is the gameserver you are developing on, and the main site server that is used to launch the games. The game icon, box and the publisher logo are hosted on the main site server, so they are not immediately available when you modify them on the gameserver. To deploy them on the main site, you have to use the [[Studio back-office]] to do a commit.
If you are developing a game in the public domain, yes (or you can make your own if you feel it's better).  


If the images still don't show after that, please try emptying your browser cache and reloading the page.
If you are developing a game for which we have a licence, we will usually provide art files from the publisher.


== I added some game options / some game statistics, but they don't show? ==
You can also used shared images provided by boardgame arena - logos, some action buttons, card, meeples, decks.


An extra deployment action from the BGA administrators is needed to activate new game options and statistics. Please contact us.
If you looking for an icon for an action (i.e. arrow, zoom, search, gears, etc), BGA has access to Font Awesome. It is awesome. But please check icon set for a version that BGA has installed.


== Is there a quick way to access the database for my current table? ==
== I registered on Studio but did not receive email ==


Yes! While playing a game on studio, you have a "Go to game database" link at the bottom of your game. This link will bring you directly to the database for the current table.
If you did not get email, search for "Welcome on BGA Studio" in your email client (just like that), it sometimes ends up in junk folder.


== What is the best way to debug? ==
If you cannot find it, and you use some weird proprietary email address, it possible that your mail server denies emails from bga.
You can try to register again with the same email, but it likely fail telling you that your account has already been created. But if you have standard email such as gmail, yahoo, outlook use it instead.


On the server side (PHP), you can use one of these:
You can get the welcome email re-sent from the login page using the "Welcome email not received?" link.
* die(var_dump( $variable_to_inspect );
In case of a persistent issue, you can file a support request from the [https://studio.boardgamearena.com/support studio support page].
* throw new BgaUserException(var_dump( $variable_to_inspect );


On the client side (Javascript), we recommand installing Firebug for Firefox (or using the Developer tools with Chrome which has about the same functionalities), then:
* console.log( variable_to_inspect ); will give you the object structure of the variable in the Firebug console, without blocking the execution. It's often a good idea to precede this call with a console.log( '### HERE ###' ); to find more easily the appropriate line in the console log.
* alert( variable_to_inspect ); will popup what you wish and pause the execution until you click ok. This won't be useful for complex structures, only native types will get plainly displayed. But this is sometimes useful just with messages to make sure which way the execution goes.


In general for debugging, think of using the 'Save & restore state' functionality (NB: currently non functional, will be ok with the next studio update). It enables you to save the state of your game just before the issue you are investigating, then come back to that point with one click as many times as needed to understand what is going wrong. You can save up to 3 different states.
[[Category:Studio]]

Revision as of 12:20, 19 September 2022


Game File Reference



Useful Components

Official

  • Deck: a PHP component to manage cards (deck, hands, picking cards, moving cards, shuffle deck, ...).
  • Draggable: a JS component to manage drag'n'drop actions.
  • Counter: a JS component to manage a counter that can increase/decrease (ex: player's score).
  • 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.
  • 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)

  • Wrapper: a JS component to wrap a <div> element around its child, even if these elements are absolute positioned.

Unofficial



Game Development Process



Guides for Common Topics



Miscellaneous Resources

This is a place where we will collect and answer frequently asked questions.

What is the PHP reference version?

Your game module should be compatible with PHP 7.4. Some other version information can be found here https://en.doc.boardgamearena.com/Studio_file_reference#software_versions.

What should I use to access the files through SFTP?

There is a lot of tools to do that. Use the one you are the most comfortable with.

On Linux Gnome, you can for example use the 'Connect to server' function of the Nautilus file management system, or use sshfs.

On Windows, there is for example the WinSCP client.

See Tools_and_tips_of_BGA_Studio#File_Sync for more details.

I can't edit the files in my game directory, it looks like they are readonly. What's happening?

You can lose access sometimes if you add another developer as read/write or admin.

To fix you can re-add yourself as Admin. Never remove youself! Just type your own name in user list and select Admin role (in control panel on studio for a specific game).

Maybe there is a maintenance operation underway.

If you don't get access back after some time (say one or two hours), please post on dev forum.

If you are still an admin for your game, re-add yourself as admin - it restores your permissions.

What is the working language on BGA studio?

Working language is English.

Variables and functions must be named with English words.

Comments must be written in English.

Game interface strings and game logs must be written in English.

How can I provide translation in my language?

The community will translate the game in all language after the game release with the collaborative translation interface can be used to translate into other languages.

Check Translations to see how to make your game translatable.

I updated the images in the 'img' folder of my game, but they don't show?

Concerning game_box.png, game_icon.png and publisher.png: You must use "Reload game box image" function from "Control Panel / Manage Games / Your game" to make your change visible.

Concerning other images: Other images used during the game are immediately available without any action. If the images still don't show after that, please try emptying your browser cache and reloading the page (i.e. press reload holding Ctrl button).

I added some game options / some game statistics / some game infos but they don't show?

When you modify one of these 3 files, you need to use the corresponding update action from "Control Panel / Manage Games / Your Game" in order we can take this information into account.

Should I use images free from copyright?

If you are developing a game in the public domain, yes (or you can make your own if you feel it's better).

If you are developing a game for which we have a licence, we will usually provide art files from the publisher.

You can also used shared images provided by boardgame arena - logos, some action buttons, card, meeples, decks.

If you looking for an icon for an action (i.e. arrow, zoom, search, gears, etc), BGA has access to Font Awesome. It is awesome. But please check icon set for a version that BGA has installed.

I registered on Studio but did not receive email

If you did not get email, search for "Welcome on BGA Studio" in your email client (just like that), it sometimes ends up in junk folder.

If you cannot find it, and you use some weird proprietary email address, it possible that your mail server denies emails from bga. You can try to register again with the same email, but it likely fail telling you that your account has already been created. But if you have standard email such as gmail, yahoo, outlook use it instead.

You can get the welcome email re-sent from the login page using the "Welcome email not received?" link. In case of a persistent issue, you can file a support request from the studio support page.