Page 1 of 1
Better Tutorials
Posted: 04 March 2019, 05:43
by bamf226
Are there other tutorials out there that describe the toolset better? I went through the hearts tutorial and made it work, but all I did was copy code. There was little understanding in what I was pasting in despite being someone who teaches programming in several languages. From what I understand, we are using a toolset by example without documentation and the tutorial doesn't explain well what the code is doing. I feel it is more similar to IKEA directions than teaching how things work.
Re: Better Tutorials
Posted: 04 March 2019, 20:56
by vincentt
Hi,
About the tutorials at least they exist

To know various functions and how they work, I work from here :
http://en.doc.boardgamearena.com/Studio anchor BGA Studio documentation
Then you can still ask quesitons here, we will help you of course
Vincent
Re: Better Tutorials
Posted: 16 March 2019, 23:11
by RicardoRix
Why are there so many magic numbers?
this for example:
Code: Select all
$machinestates = array(
// The initial state. Please do not modify.
1 => array(
"name" => "gameSetup",
"description" => clienttranslate("Game setup"),
"type" => "manager",
"action" => "stGameSetup",
"transitions" => array( "" => 2 )
),
// Note: ID=2 => your first state
2 => array(
"name" => "playerTurn",
"description" => clienttranslate('${actplayer} must play a card or pass'),
"descriptionmyturn" => clienttranslate('${you} must play a card or pass'),
"type" => "activeplayer",
"possibleactions" => array( "playCard", "pass" ),
"transitions" => array( "playCard" => 2, "pass" => 2 )
),
Is it not possible to use words/strings rather than 1 and 2 ?
Re: Better Tutorials
Posted: 17 March 2019, 08:57
by A-dam
RicardoRix wrote:
Is it not possible to use words/strings rather than 1 and 2 ?
You can define your own constants as indicated here:
http://en.doc.boardgamearena.com/Your_g ... for_States
Anyway, those are not magic numbers, it just idicates numerical ID of the state, nothing magical in it
