This is a documentation for Board Game Arena: play board games online !
Tools and tips of BGA Studio: Razlika med redakcijama
(Created page with "== Starting a game in one click == To start a game: * Create a new table with your game. * If you want to play a game with 3 players, specify that you want a maximum of 3 pla...") |
(→Run from the chat: MoneyToPlayer instead ToCurrentPleyer) |
||
(5 vmesnih redakcij 2 uporabnikov ni prikazanih) | |||
Vrstica 18: | Vrstica 18: | ||
Immediately at the bottom of the game area, the "Go to game database" link is an immediate access to the PhpMyAdmin tool to view/edit the tables of the current game. | Immediately at the bottom of the game area, the "Go to game database" link is an immediate access to the PhpMyAdmin tool to view/edit the tables of the current game. | ||
== Save & restore state == | |||
Using links of this section, you can save the complete current (database) state of your game, then restore it later. | |||
This is particularly useful when you want to develop a part of the game that is difficult to reproduce: you just have to save the situation just before, and then restore it until this part works fine. | |||
We provide you 3 "slots": 1, 2 and 3. This way, you can save 3 different game situations. | |||
Limits: | |||
* the "restore" function does not work anymore when the game is over. | |||
* a saved situation from a given table cannot be restored in another table. | |||
* when you "restore" a situation, the current browser page is refreshed to reflect the updated game situation, but you have to refresh you other tabs/pages manually. | |||
== Input/Output debugging section == | == Input/Output debugging section == | ||
This section shows you: | |||
* The AJAX calls made by your game interface to the game server. AJAX calls (outputs) begins with ">" | |||
* The notifications received by your game interface. Notifications (inputs) begins with "<". | |||
Note: if you click on some notification title, you can resend it immediately to the user interface. | |||
== Run from the chat == | |||
On BGA Studio, you can directly run a PHP method from the chat. | |||
For example, if on your PHP you have this method: | |||
<pre> | |||
function giveMoneyToPlayer($player_id, $amount) | |||
{ | |||
// Do some stuff | |||
} | |||
</pre> | |||
You can call this method directly from the chat like this: "giveMoneyToPlayer(2564,2)". | |||
== Dev Tips == | |||
'''Edit TPL''' <p> | |||
To edit TPL with HTML code highlightings in Gedit under Ubuntu: | |||
find gtksourceview directory in /usr/share, depending on your version (2.0, 3.0,...). | |||
<br> | |||
Here it's 3.0, then type in a terminal window: | |||
<pre> | |||
sudo gedit /usr/share/gtksourceview-3.0/language-specs/html.lang | |||
</pre> | |||
then find 'globs' section, and change: | |||
<pre> | |||
<property name="globs">*.html;*.htm;*.tpl</property> | |||
</pre> |
Trenutna redakcija s časom 22:46, 21. april 2013
Starting a game in one click
To start a game:
- Create a new table with your game.
- If you want to play a game with 3 players, specify that you want a maximum of 3 players at this table.
- Click on "Express Start".
Stopping a game in one click
- Click on the "quit" icon on the top right of the screen.
- Click on "Express Stop".
Switching between users
when running a game on Studio, you can use the little red arrow near each player's name to open a new tab with this player's perspective.
Access to game database
Immediately at the bottom of the game area, the "Go to game database" link is an immediate access to the PhpMyAdmin tool to view/edit the tables of the current game.
Save & restore state
Using links of this section, you can save the complete current (database) state of your game, then restore it later.
This is particularly useful when you want to develop a part of the game that is difficult to reproduce: you just have to save the situation just before, and then restore it until this part works fine.
We provide you 3 "slots": 1, 2 and 3. This way, you can save 3 different game situations.
Limits:
- the "restore" function does not work anymore when the game is over.
- a saved situation from a given table cannot be restored in another table.
- when you "restore" a situation, the current browser page is refreshed to reflect the updated game situation, but you have to refresh you other tabs/pages manually.
Input/Output debugging section
This section shows you:
- The AJAX calls made by your game interface to the game server. AJAX calls (outputs) begins with ">"
- The notifications received by your game interface. Notifications (inputs) begins with "<".
Note: if you click on some notification title, you can resend it immediately to the user interface.
Run from the chat
On BGA Studio, you can directly run a PHP method from the chat.
For example, if on your PHP you have this method:
function giveMoneyToPlayer($player_id, $amount) { // Do some stuff }
You can call this method directly from the chat like this: "giveMoneyToPlayer(2564,2)".
Dev Tips
Edit TPL
To edit TPL with HTML code highlightings in Gedit under Ubuntu:
find gtksourceview directory in /usr/share, depending on your version (2.0, 3.0,...).
Here it's 3.0, then type in a terminal window:
sudo gedit /usr/share/gtksourceview-3.0/language-specs/html.lang
then find 'globs' section, and change:
<property name="globs">*.html;*.htm;*.tpl</property>