<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://en.doc.boardgamearena.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=P1ngouiin</id>
	<title>Board Game Arena - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://en.doc.boardgamearena.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=P1ngouiin"/>
	<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/Special:Contributions/P1ngouiin"/>
	<updated>2026-09-20T00:08:48Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.0</generator>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Setting_up_BGA_Development_environment_using_VSCode&amp;diff=22305</id>
		<title>Setting up BGA Development environment using VSCode</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Setting_up_BGA_Development_environment_using_VSCode&amp;diff=22305"/>
		<updated>2024-08-26T13:25:36Z</updated>

		<summary type="html">&lt;p&gt;P1ngouiin: Update SFTP port&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Microsoft Visual Studio Code is light weight IDE/Editor. All desktops.&lt;br /&gt;
&lt;br /&gt;
== Downloads ==&lt;br /&gt;
&lt;br /&gt;
* Download and install vscode from https://code.visualstudio.com&lt;br /&gt;
* Download and install php (8.2) command line interface (for local tests and debugging)&lt;br /&gt;
&lt;br /&gt;
== Extensions ==&lt;br /&gt;
Use [https://marketplace.visualstudio.com/items?itemName=NevinFoster.bga-extension-pack&amp;amp;ssr=false#overview BGA Extension Pack] to download all of the recommended extensions with one click.&lt;br /&gt;
* PHP Intelephense - https://marketplace.visualstudio.com/items?itemName=bmewburn.vscode-intelephense-client&lt;br /&gt;
* Or PHP IntelliSense - https://marketplace.visualstudio.com/items?itemName=zobo.php-intellisense&lt;br /&gt;
* PHP Debug - https://marketplace.visualstudio.com/items?itemName=xdebug.php-debug&lt;br /&gt;
* SQLTools - https://marketplace.visualstudio.com/items?itemName=mtxr.sqltools&lt;br /&gt;
* Prettier - code formatter - https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode&lt;br /&gt;
* SFTP (by Natizyskunk) -  https://marketplace.visualstudio.com/items?itemName=Natizyskunk.sftp&lt;br /&gt;
&lt;br /&gt;
== Intellisense - Navigation/Auto-complete ==&lt;br /&gt;
&lt;br /&gt;
=== JavaScript Intellisense ===&lt;br /&gt;
&lt;br /&gt;
* Because of dojo style class/method declarations most IDE won&#039;t be able to index main JavaScript file properly (i.e. go to definition of function and such). If you manage to get it working in VS code, let us know how.&lt;br /&gt;
&lt;br /&gt;
* There is a way to re-structure code to avoid using this style, but this is not for beginners. Do not use this on your first game! https://en.doc.boardgamearena.com/BGA_Studio_Cookbook#Avoiding_code_in_dojo_declare_style&lt;br /&gt;
** There is also a complete example of a &amp;quot;dojo-less&amp;quot; project, it also includes a (incomplete) typescript definition file (.d.ts) for auto-completion of js BGA interfaces https://github.com/elaskavaia/bga-dojoless&lt;br /&gt;
&lt;br /&gt;
* Another way to improve auto-complete and such is to use Typescript and SCSS, this is not for the beginners.&lt;br /&gt;
** Original wiki: https://en.doc.boardgamearena.com/Using_Typescript_and_Scss&lt;br /&gt;
** There is also 3rd party software that automates typescript template above: [[BGA Type Safe Template]]. It claims to offers a much cleaner initial file, clearer workflow, and nearly complete type and autofill support for whatever you may need.&lt;br /&gt;
&lt;br /&gt;
===PHP Intellisense===&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t do anything PHP will complain about undefined symbols from BGA framework (as well as from the material file).&lt;br /&gt;
To solve the warning about framework issues, you need a stubs for the BGA APIs:&lt;br /&gt;
&lt;br /&gt;
*git clone git@github.com:elaskavaia/bga-sharedcode.git (you can also get and unzip it from the GitHub page) &lt;br /&gt;
** if that doesn&#039;t work, try git clone &amp;lt;nowiki&amp;gt;https://github.com/elaskavaia/bga-sharedcode.git&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
**you can do this in a terminal from VS Code - Terminal menu -&amp;gt; New Terminal&lt;br /&gt;
*add reference (include path) to bga-sharedcode/misc using settings of PHP extension, see example below&lt;br /&gt;
&lt;br /&gt;
If you&#039;re using the Intelephense plugin, add this to global user settings (modify the path obviously)&lt;br /&gt;
&lt;br /&gt;
    &amp;quot;intelephense.environment.includePaths&amp;quot;: [&lt;br /&gt;
        &amp;quot;/home/victoria/git/bga-sharedcode/misc/&amp;quot;&lt;br /&gt;
    ],&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To solve the warning about the material file class members&lt;br /&gt;
&lt;br /&gt;
Option 1)&lt;br /&gt;
If you don&#039;t have too many class members you can define them, for example if I have $this-&amp;gt;token_types = [...] in the material file I can define them in in the class of game.php&lt;br /&gt;
&lt;br /&gt;
    private $token_types;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Option 2) &lt;br /&gt;
&lt;br /&gt;
Put this line in the settings.json if you using Intelliphense extension to ignore them:&lt;br /&gt;
&lt;br /&gt;
   &amp;quot;intelephense.diagnostics.undefinedProperties&amp;quot;: false&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Unit testing===&lt;br /&gt;
&lt;br /&gt;
If using phpunit, install it via composer somewhere in home directory, i.e.&lt;br /&gt;
   cd /home/victoria/php-composer&lt;br /&gt;
   composer require --dev phpunit/phpunit ^9&lt;br /&gt;
&lt;br /&gt;
Then add this path (e.x.  /home/victoria/php-composer) to include paths as above&lt;br /&gt;
&lt;br /&gt;
See more about unit testing in [[Testing by developer]]&lt;br /&gt;
&lt;br /&gt;
== File Sync==&lt;br /&gt;
You can set up your sync using other methods, not related to vscode (such as rsync), if you want to do that see [[Tools_and_tips_of_BGA_Studio#File_Sync]] otherwise see below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You might rely on your IDE to sync the files with the SFTP server. Each time you &amp;quot;save&amp;quot; a file with your modifications, the IDE will also submit it to the sFTP server. These are instructions for VS Code&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Install this extension&#039;&#039;&#039; https://marketplace.visualstudio.com/items?itemName=Natizyskunk.sftp (File-&amp;gt;Preferences-&amp;gt;Extensions ... type SFTP and make sure its by Natizyskunk)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Open VSCode on an empty folder&#039;&#039;&#039; that will be the local root of your project.&lt;br /&gt;
&lt;br /&gt;
*Execute Ctrl+Shift+P on Windows/Linux or Cmd+Shift+P on Mac to open the command palette, and the type/run : &#039;&#039;&#039;&amp;quot;SFTP: config&amp;quot;&#039;&#039;&#039; - the edit will open with json config &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Update the json&#039;&#039;&#039; as below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;BGA&amp;quot;,&lt;br /&gt;
    &amp;quot;host&amp;quot;: &amp;quot;1.studio.boardgamearena.com&amp;quot;,&lt;br /&gt;
    &amp;quot;protocol&amp;quot;: &amp;quot;sftp&amp;quot;,&lt;br /&gt;
    &amp;quot;port&amp;quot;: 2022,&lt;br /&gt;
    &amp;quot;username&amp;quot;: &amp;quot;&amp;lt;your SFTP username&amp;gt;&amp;quot;,&lt;br /&gt;
    &amp;quot;password&amp;quot;: &amp;quot;&amp;lt;your SFTP password&amp;gt;&amp;quot;,&lt;br /&gt;
    &amp;quot;remotePath&amp;quot;: &amp;quot;/&amp;lt;your project name&amp;gt;/&amp;quot;,&lt;br /&gt;
    &amp;quot;uploadOnSave&amp;quot;: true,&lt;br /&gt;
    &amp;quot;ignore&amp;quot;: [&lt;br /&gt;
        &amp;quot;.vscode&amp;quot;,&lt;br /&gt;
        &amp;quot;.git&amp;quot;,&lt;br /&gt;
        &amp;quot;.DS_Store&amp;quot;&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;syncOption&amp;quot;: {&lt;br /&gt;
        &amp;quot;skipCreate&amp;quot;: false, # syncs new files&lt;br /&gt;
        &amp;quot;delete&amp;quot;: true # syncs deleted files&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===One time only - first sync ===&lt;br /&gt;
&lt;br /&gt;
- Execute Ctrl+Shift+P on Windows/Linux or Cmd+Shift+P on Mac to open the command palette, and the type/run : &#039;&#039;&#039;&amp;quot;SFTP: Download Project&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This will download all the files locally. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Daily use===&lt;br /&gt;
&lt;br /&gt;
You don&#039;t have to do anything else! Each time you modify/save a file in VSCode, it will upload it to the SFTP Server.&lt;br /&gt;
&lt;br /&gt;
To force upload to a server, execute Ctrl+Shift+P -&amp;gt; &#039;&#039;&#039;&amp;quot;SFTP: Sync Local -&amp;gt; Remote&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Note: the SFTP sync may fail with a permissions error when create or delete nested folders. To fix this, execute `chmod -R 755 &amp;lt;your directory name&amp;gt;` in your terminal, then force sync to remote.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Split settings for version control===&lt;br /&gt;
If you want to commit this file to version control, use private key (upload ssh key https://studio.boardgamearena.com/controlpanel) instead and move user/password settings into vscode user settings&lt;br /&gt;
&lt;br /&gt;
I.e. in user setting add this (have to edit settings.js manually, google for location its os specific)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;quot;remotefs.remote&amp;quot;: {&lt;br /&gt;
        &amp;quot;bgadev&amp;quot;: {&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;BGA&amp;quot;,&lt;br /&gt;
            &amp;quot;host&amp;quot;: &amp;quot;1.studio.boardgamearena.com&amp;quot;,&lt;br /&gt;
            &amp;quot;protocol&amp;quot;: &amp;quot;sftp&amp;quot;,&lt;br /&gt;
            &amp;quot;port&amp;quot;: 2022,&lt;br /&gt;
            &amp;quot;username&amp;quot;: &amp;quot;&amp;lt;yourdevusername&amp;gt;&amp;quot;,&lt;br /&gt;
            &amp;quot;privateKeyPath&amp;quot;: &amp;quot;~/.ssh/id_rsa&amp;quot;,&lt;br /&gt;
        },&lt;br /&gt;
      }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
in project folder sftp.json (replace &amp;lt;yourproject&amp;gt; with project name)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;remote&amp;quot;: &amp;quot;bgadev&amp;quot;,&lt;br /&gt;
    &amp;quot;remotePath&amp;quot;: &amp;quot;/&amp;lt;yourproject&amp;gt;/&amp;quot;,&lt;br /&gt;
    &amp;quot;uploadOnSave&amp;quot;: true,&lt;br /&gt;
    &amp;quot;ignore&amp;quot;: [&lt;br /&gt;
        &amp;quot;.git&amp;quot;&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;syncOption&amp;quot;: {&lt;br /&gt;
        &amp;quot;skipCreate&amp;quot;: false, &lt;br /&gt;
        &amp;quot;delete&amp;quot;: true &lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;watcher&amp;quot;: {&lt;br /&gt;
        &amp;quot;files&amp;quot;: &amp;quot;**/*.{js,css}&amp;quot;,&lt;br /&gt;
        &amp;quot;autoUpload&amp;quot;: true,&lt;br /&gt;
        &amp;quot;autoDelete&amp;quot;: true&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: you don&#039;t need watcher section if you don&#039;t use code generators, but its needed if you use typescript, scss or similar code generator tools.&lt;br /&gt;
&lt;br /&gt;
==Code Formatter==&lt;br /&gt;
I think Prettier has better format, you can install Prettier plugin to do the formatting, for PHP add the following in package.json&lt;br /&gt;
&lt;br /&gt;
  &amp;quot;devDependencies&amp;quot;: {&lt;br /&gt;
    &amp;quot;@prettier/plugin-php&amp;quot;: &amp;quot;^0.19.1&amp;quot;,&lt;br /&gt;
    &amp;quot;prettier&amp;quot;: &amp;quot;^2.7.1&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;prettier&amp;quot;: {&lt;br /&gt;
    &amp;quot;braceStyle&amp;quot;: &amp;quot;1tbs&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
== Code generators==&lt;br /&gt;
If you want to run code generators for example for typescript or scss you can install this extension:&lt;br /&gt;
*https://marketplace.visualstudio.com/items?itemName=emeraldwalk.RunOnSave&lt;br /&gt;
&lt;br /&gt;
In settings.json add these (example only):&lt;br /&gt;
    &amp;quot;emeraldwalk.runonsave&amp;quot;: {&lt;br /&gt;
        &amp;quot;commands&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;match&amp;quot;: &amp;quot;.*\\.ts$&amp;quot;,&lt;br /&gt;
                &amp;quot;isAsync&amp;quot;: true,&lt;br /&gt;
                &amp;quot;cmd&amp;quot;: &amp;quot;npm run build:ts&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;match&amp;quot;: &amp;quot;.*\\.scss$&amp;quot;,&lt;br /&gt;
                &amp;quot;isAsync&amp;quot;: true,&lt;br /&gt;
                &amp;quot;cmd&amp;quot;: &amp;quot;npm run build:scss&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
        ]&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
In this example &amp;lt;code&amp;gt;build:ts&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;build:scss&amp;lt;/code&amp;gt; are scripts configured via package.json&lt;br /&gt;
&lt;br /&gt;
Another example - you can run php script that will generate material.inc.php from misc/xxx_material.csv&lt;br /&gt;
      {&lt;br /&gt;
        &amp;quot;match&amp;quot;: &amp;quot;misc/.*material\\.csv$&amp;quot;,&lt;br /&gt;
        &amp;quot;isAsync&amp;quot;: true,&lt;br /&gt;
        &amp;quot;cmd&amp;quot;: &amp;quot;php7.4 ${env.HOME}/git/bga-sharedcode/misc/genmat.php ${file}&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
== User templates==&lt;br /&gt;
&lt;br /&gt;
You can define user template to avoid writing boilerplate code, here is example of php template for states&lt;br /&gt;
(it is placed in global location php.json - you can open it from the gui File-&amp;gt;Preferences-&amp;gt;Configure User Snippets and type php&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;Single player state&amp;quot;: {&lt;br /&gt;
    &amp;quot;prefix&amp;quot;: [&amp;quot;state&amp;quot;, &amp;quot;playerstate&amp;quot;],&lt;br /&gt;
&lt;br /&gt;
    &amp;quot;body&amp;quot;: [&lt;br /&gt;
      &amp;quot;$LINE_COMMENT playerTurn${1:something}&amp;quot;,&lt;br /&gt;
      &amp;quot;${1/(.*)/STATE_PLAYER_TURN_${1:/upcase}/} =&amp;gt; [&amp;quot;,&lt;br /&gt;
      &amp;quot;&#039;name&#039; =&amp;gt; &#039;playerTurn${1:something}&#039;,&amp;quot;,&lt;br /&gt;
      &amp;quot;&#039;description&#039; =&amp;gt; clienttranslate(&#039;\\${actplayer} must ${1:something}&#039;),&amp;quot;,&lt;br /&gt;
      &amp;quot;&#039;descriptionmyturn&#039; =&amp;gt; clienttranslate(&#039;\\${you} must ${1:something}&#039;),&amp;quot;,&lt;br /&gt;
      &amp;quot;&#039;type&#039; =&amp;gt; &#039;activeplayer&#039;,&amp;quot;,&lt;br /&gt;
      &amp;quot;&#039;args&#039;=&amp;gt;&#039;arg_playerTurn${1:something}&#039;,&amp;quot;,&lt;br /&gt;
      &amp;quot;&#039;action&#039;=&amp;gt;&#039;st_playerTurn${1:something}&#039;,&amp;quot;,&lt;br /&gt;
      &amp;quot;&#039;possibleactions&#039; =&amp;gt; [ &#039;playCard&#039;, &#039;pass&#039; ],&amp;quot;,&lt;br /&gt;
      &amp;quot;&#039;transitions&#039; =&amp;gt; [&amp;quot;,&lt;br /&gt;
      &amp;quot;&#039;next&#039; =&amp;gt; STATE_GAME_TURN_NEXT_PLAYER,&amp;quot;,&lt;br /&gt;
      &amp;quot;&#039;loopback&#039; =&amp;gt; ${1/(.*)/STATE_PLAYER_TURN_${1:/upcase}/} ]&amp;quot;,&lt;br /&gt;
      &amp;quot;],&amp;quot;&lt;br /&gt;
    ],&lt;br /&gt;
&lt;br /&gt;
    &amp;quot;description&amp;quot;: &amp;quot;Create single player state defition, use tab to fill template parameters&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
  &amp;quot;Multiple player state&amp;quot;: {&lt;br /&gt;
    &amp;quot;prefix&amp;quot;: [&amp;quot;mstate&amp;quot;, &amp;quot;multiplayerstate&amp;quot;],&lt;br /&gt;
&lt;br /&gt;
    &amp;quot;body&amp;quot;: [&lt;br /&gt;
      &amp;quot;$LINE_COMMENT mplayerTurn${1:something}&amp;quot;,&lt;br /&gt;
      &amp;quot;${1/(.*)/STATE_MPLAYER_TURN_${1:/upcase}/} =&amp;gt; [&amp;quot;,&lt;br /&gt;
      &amp;quot;&#039;name&#039; =&amp;gt; &#039;mplayerTurn${1:something}&#039;,&amp;quot;,&lt;br /&gt;
      &amp;quot;&#039;description&#039; =&amp;gt; clienttranslate(&#039;Other players must ${1:something}&#039;),&amp;quot;,&lt;br /&gt;
      &amp;quot;&#039;descriptionmyturn&#039; =&amp;gt; clienttranslate(&#039;\\${you} must ${1:something}&#039;),&amp;quot;,&lt;br /&gt;
      &amp;quot;&#039;type&#039; =&amp;gt; &#039;multipleactiveplayer&#039;,&amp;quot;,&lt;br /&gt;
      &amp;quot;&#039;args&#039;=&amp;gt;&#039;arg_mplayerTurn${1:something}&#039;,&amp;quot;,&lt;br /&gt;
      &amp;quot;&#039;action&#039;=&amp;gt;&#039;stMakeEveryoneActive&#039;,&amp;quot;,&lt;br /&gt;
      &amp;quot;&#039;possibleactions&#039; =&amp;gt; [ &#039;playCard&#039;, &#039;pass&#039; ],&amp;quot;,&lt;br /&gt;
      &amp;quot;&#039;transitions&#039; =&amp;gt; [&amp;quot;,&lt;br /&gt;
      &amp;quot;&#039;next&#039; =&amp;gt; STATE_GAME_TURN_NEXT_MPLAYER,&amp;quot;,&lt;br /&gt;
      &amp;quot;&#039;loopback&#039; =&amp;gt; ${1/(.*)/STATE_MPLAYER_TURN_${1:/upcase}/} ]&amp;quot;,&lt;br /&gt;
      &amp;quot;],&amp;quot;&lt;br /&gt;
    ],&lt;br /&gt;
&lt;br /&gt;
    &amp;quot;description&amp;quot;: &amp;quot;Create multi player state defition, use tab to fill template parameters&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;Action in action.php&amp;quot;: {&lt;br /&gt;
    &amp;quot;prefix&amp;quot;: [&amp;quot;action&amp;quot;],&lt;br /&gt;
    &amp;quot;body&amp;quot;: [&lt;br /&gt;
      &amp;quot;public function ${1:actionName}() {&amp;quot;,&lt;br /&gt;
      &amp;quot;\tself::setAjaxMode();&amp;quot;,&lt;br /&gt;
      &amp;quot;\t\\$${2:arg} = self::getArg(&#039;${2:arg}&#039;, AT_posint, false, 0);&amp;quot;,&lt;br /&gt;
      &amp;quot;\t\\$this-&amp;gt;game-&amp;gt;action_${1:actionName}(\\$${2:arg});&amp;quot;,&lt;br /&gt;
      &amp;quot;\tself::ajaxResponse();&amp;quot;,&lt;br /&gt;
      &amp;quot;}&amp;quot;&lt;br /&gt;
    ]&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;Player loop in game.php&amp;quot;: {&lt;br /&gt;
    &amp;quot;prefix&amp;quot;: [&amp;quot;players&amp;quot;],&lt;br /&gt;
    &amp;quot;body&amp;quot;: [&lt;br /&gt;
      &amp;quot;\\$players = \\$this-&amp;gt;loadPlayersBasicInfos();&amp;quot;,&lt;br /&gt;
      &amp;quot;foreach (\\$players as \\$player_id =&amp;gt; \\$player_info) {&amp;quot;,&lt;br /&gt;
      &amp;quot;${1}&amp;quot;,&lt;br /&gt;
      &amp;quot;}&amp;quot;&lt;br /&gt;
    ]&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Studio]]&lt;/div&gt;</summary>
		<author><name>P1ngouiin</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Studio&amp;diff=22100</id>
		<title>Studio</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Studio&amp;diff=22100"/>
		<updated>2024-08-09T10:04:19Z</updated>

		<summary type="html">&lt;p&gt;P1ngouiin: /* Software Versions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Studio_Framework_Navigation}}&lt;br /&gt;
&lt;br /&gt;
[[File:Bga_studio_small.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note: Please DO NOT translate Studio Documentation, so that there can be one place where you can find the latest information available.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== What is Board Game Arena Studio? ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Board Game Arena Studio&#039;&#039;&#039; is a platform to build online board game adaptations using the Board Game Arena platform.&lt;br /&gt;
&lt;br /&gt;
It is open to any gamer with software development skills :)&lt;br /&gt;
&lt;br /&gt;
BGA Studio website: https://studio.boardgamearena.com&lt;br /&gt;
&lt;br /&gt;
Original announcement on BGA forum: https://forum.boardgamearena.com/viewtopic.php?f=10&amp;amp;t=1973&lt;br /&gt;
&lt;br /&gt;
== Discover BGA Studio in 5 presentations ==&lt;br /&gt;
&lt;br /&gt;
Why, how, what... to start discovering BGA Studio, we prepared 5 &amp;quot;powerpoint&amp;quot; presentations for you:&lt;br /&gt;
&lt;br /&gt;
* [http://www.slideshare.net/boardgamearena/5-reasons-why-you-should-use-bga-studio-for-your-online-board-game 5 reasons why you should use BGA Studio for your online board game] (or [http://en.doc.boardgamearena.com/images/5/58/1-why-developing.pdf ‎Download as PDF])&lt;br /&gt;
* [http://www.slideshare.net/boardgamearena/the-8-steps-to-create-a-board-game-on-board-game-arena The 8 steps to create a board game on Board Game Arena] (or [http://en.doc.boardgamearena.com/images/1/1e/2-8-steps-to-realize.pdf Download as PDF])&lt;br /&gt;
* [http://www.slideshare.net/boardgamearena/the-bga-framework-at-a-glance The BGA Framework at a glance] (or [http://en.doc.boardgamearena.com/images/7/79/3-thebgaframework.pdf Download as PDF])&lt;br /&gt;
* [http://www.slideshare.net/boardgamearena/bga-studio-focus-on-bga-game-state-machine Focus on BGA game state machine] (or [http://en.doc.boardgamearena.com/images/9/98/4-gamestates.pdf Download as PDF])&lt;br /&gt;
* [http://www.slideshare.net/boardgamearena/bga-studio-guidelines BGA developers guidelines] (or [http://en.doc.boardgamearena.com/images/7/76/5-guidelines.pdf ‎Download as PDF])&lt;br /&gt;
&lt;br /&gt;
== How to join the BGA developer team? ==&lt;br /&gt;
&lt;br /&gt;
Please see this page: [[How to join BGA developer team?]]&lt;br /&gt;
&lt;br /&gt;
== Great, I&#039;m in! ... How should I start? ==&lt;br /&gt;
&lt;br /&gt;
If you didn&#039;t already, check the presentations at the top of this page to get the basics.&lt;br /&gt;
&lt;br /&gt;
Then, you should checkout the [[First steps with BGA Studio]] to make sure that runs fine.&lt;br /&gt;
&lt;br /&gt;
After that, we strongly advise you to take one of these game creation tutorials:&lt;br /&gt;
* [[Tutorial reversi]] - an abstract strategy game played on an 8×8 uncheckered board for 2 players&lt;br /&gt;
* [[Tutorial gomoku]] - an abstract strategy game tic-tac-toe style for 2 players&lt;br /&gt;
* [[Tutorial hearts]] - a card game for 4 players&lt;br /&gt;
&lt;br /&gt;
Then start editing files and see what happens! ;)&lt;br /&gt;
&lt;br /&gt;
Once you&#039;re done with tutorials, you can start a real game (or join existing project)&lt;br /&gt;
* [[Create a game in BGA Studio: Complete Walkthrough]] &lt;br /&gt;
&lt;br /&gt;
If you have any questions, please check out the [[Studio FAQ]] or [[Contact BGA Studio]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To search wiki pages on studio enter this text in search bar: &lt;br /&gt;
  &amp;quot;Category:Studio&amp;quot; white rabbit &lt;br /&gt;
That is if you want to search for white rabbit&lt;br /&gt;
&lt;br /&gt;
== BGA Studio documentation ==&lt;br /&gt;
&lt;br /&gt;
=== BGA Studio Framework reference ===&lt;br /&gt;
&lt;br /&gt;
This part of the documentation focuses on the development framework itself: functions and methods available to build your game.&lt;br /&gt;
&lt;br /&gt;
[[Studio file reference|File structure of a BGA game]]&lt;br /&gt;
&lt;br /&gt;
==== Game logic (Server side) ====&lt;br /&gt;
&lt;br /&gt;
* [[Main game logic: yourgamename.game.php]]&lt;br /&gt;
* [[Your game state machine: states.inc.php]]&lt;br /&gt;
* [[Game database model: dbmodel.sql]]&lt;br /&gt;
* [[Players actions: yourgamename.action.php]]&lt;br /&gt;
* [[Game material description: material.inc.php]]&lt;br /&gt;
* [[Game statistics: stats.inc.php]]&lt;br /&gt;
&lt;br /&gt;
==== Game interface (Client side) ====&lt;br /&gt;
&lt;br /&gt;
* [[Game interface logic: yourgamename.js]]&lt;br /&gt;
* [[Game art: img directory]]&lt;br /&gt;
* [[Game interface stylesheet: yourgamename.css]]&lt;br /&gt;
* [[Game layout: view and template: yourgamename.view.php and yourgamename_yourgamename.tpl]]&lt;br /&gt;
* [[Your game mobile version]]&lt;br /&gt;
&lt;br /&gt;
==== Other components ====&lt;br /&gt;
&lt;br /&gt;
* [[Translations]] (how to make your game translatable)&lt;br /&gt;
* [[Options_and_preferences:_gameoptions.json,_gamepreferences.json|Game Options and Preferences]]&lt;br /&gt;
* [[Game meta-information: gameinfos.inc.php]]&lt;br /&gt;
* [[Game replay]]&lt;br /&gt;
* [[3D]]&lt;br /&gt;
&lt;br /&gt;
=== BGA Studio game components reference ===&lt;br /&gt;
&lt;br /&gt;
Game components are useful tools you can use in your game adaptations.&lt;br /&gt;
&lt;br /&gt;
JS:&lt;br /&gt;
&lt;br /&gt;
* [[Counter]]: a JS component to manage a counter that can increase/decrease (ex: player&#039;s score).&lt;br /&gt;
* [[Scrollmap]]: a JS component to manage a scrollable game area (useful when the game area can be infinite. Examples:  Saboteur or Takenoko games).&lt;br /&gt;
* [[Stock]]: a JS component to manage and display a set of game elements displayed at a position.&lt;br /&gt;
* [[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&#039;s places at Can&#039;t Stop).&lt;br /&gt;
* [[Draggable]]: a JS component to manage drag&#039;n&#039;drop actions.&lt;br /&gt;
* [[ExpandableSection]]: a JS component to manage a rectangular block of HTML than can be displayed/hidden.&lt;br /&gt;
* [[Anti-Stock]]:Code snippets in ValinaJS/HTML5 to do what stock does (that is if you cannot beat Stock into submission)&lt;br /&gt;
&lt;br /&gt;
PHP:&lt;br /&gt;
* [[Deck]]: a PHP component to manage cards (deck, hands, picking cards, moving cards, shuffle deck, ...).&lt;br /&gt;
&lt;br /&gt;
Reference for classes in game class hierarchy&lt;br /&gt;
&lt;br /&gt;
* [[Table]]: a PHP class that you inherit from for the game php&lt;br /&gt;
&lt;br /&gt;
=== BGA Studio user guide ===&lt;br /&gt;
&lt;br /&gt;
This part of the documentation is a user guide for the BGA Studio online development environment.&lt;br /&gt;
&lt;br /&gt;
Lifecycle&lt;br /&gt;
&lt;br /&gt;
* [[BGA game Lifecycle]]&lt;br /&gt;
* [[Create a game in BGA Studio: Complete Walkthrough]]&lt;br /&gt;
* [[Pre-release checklist]] - Go throught this list if you think you done development&lt;br /&gt;
* [[Post-release phase]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Tools and Advice&lt;br /&gt;
* [[BGA Studio Guidelines]]&lt;br /&gt;
* [[Tutorials checklist]]&lt;br /&gt;
* [[I wish I knew this when I started]] - one liners on most common missed features, mistakes, etc with further doc references&lt;br /&gt;
* [[Tools and tips of BGA Studio]] - Tips and instructions on setting up development environment&lt;br /&gt;
** [[Setting up BGA Development environment using VSCode]]&lt;br /&gt;
** [[Practical debugging]] - Tips focused on debugging&lt;br /&gt;
** [[Testing by developer]]&lt;br /&gt;
** [[Studio logs]] - Instructions for log access&lt;br /&gt;
** [[Troubleshooting]] - Most common &amp;quot;I am really stuck&amp;quot; situations&lt;br /&gt;
* [[BGA Studio Cookbook]] - Tips and instructions on using API&#039;s, libraries and frameworks&lt;br /&gt;
** [[Using Vue]] - work-in-progress guide on using the modern framework Vue.js to create a game&lt;br /&gt;
** [[Using Typescript and Scss]] - How to auto-build Typescript and SCSS files to make your code cleaner&lt;br /&gt;
** [[BGA Type Safe Template]] - Setting up a fully typed project using typescript and more!&lt;br /&gt;
** [[Bots and Artificial Intelligence]] - How to add AI/Bots to the game&lt;br /&gt;
* [[Studio FAQ]]&lt;br /&gt;
&lt;br /&gt;
Sharing&lt;br /&gt;
* [[Common board game elements image resources]] - Dice, meeples, cubes, etc&lt;br /&gt;
* [[BGA Code Sharing]] - Shared resources, projects on git hub, common code, other links&lt;br /&gt;
&lt;br /&gt;
== Software Versions ==&lt;br /&gt;
&lt;br /&gt;
Versions currently used by BGA framework:&lt;br /&gt;
&lt;br /&gt;
* Dojo Toolkit 1.15&lt;br /&gt;
* PHP: 8.2&lt;br /&gt;
* SQL: MySQL 5.7&lt;br /&gt;
* JS/CSS/HTML: limited by what minimization tools support [[Game_interface_logic:_yourgamename.js#Javascript_minimization_.28after_July_2020.29]]&lt;br /&gt;
* Font Awesome: 4.7 https://fontawesome.com/v4.7/icons/ (available as &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;i class=&amp;quot;fa fa-clock&amp;quot; /&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;)&lt;br /&gt;
* Font Awesome: 6.4.0 https://fontawesome.com/v6/search?o=r&amp;amp;m=free (available as &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;i class=&amp;quot;fa6 fa6-clock&amp;quot; /&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
=== PHP Extensions Used ===&lt;br /&gt;
&lt;br /&gt;
The following PHP extensions are - as of May 8th, 2022 - in use in BGA Studio and available:&lt;br /&gt;
&lt;br /&gt;
date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, session, standard, sodium, apache2handler, mysqlnd, PDO, xml, apcu, bz2, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, igbinary, json, exif, msgpack, mysqli, pdo_mysql, apc, posix, readline, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, v8js, xmlreader, xmlwriter, xsl, zip, Phar, memcached, Zend OPcache&lt;br /&gt;
&lt;br /&gt;
== Other resources ==&lt;br /&gt;
&lt;br /&gt;
[http://forum.boardgamearena.com/viewforum.php?f=12 Development forum]&lt;br /&gt;
&lt;br /&gt;
[https://studio.boardgamearena.com/bugs Bug tracking system FOR STUDIO issues and APIs]&lt;br /&gt;
&lt;br /&gt;
DISCORD chat server/room invite link https://discord.gg/YxEUacY if it does not work check this topic https://forum.boardgamearena.com/viewtopic.php?f=12&amp;amp;t=17403&amp;amp;hilit=discord&lt;br /&gt;
&lt;br /&gt;
Developer BLOGS https://bga-devs.github.io/blog/&lt;br /&gt;
&lt;br /&gt;
[[Contact BGA Studio]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Studio]]&lt;/div&gt;</summary>
		<author><name>P1ngouiin</name></author>
	</entry>
</feed>