Better Tutorials

Game development with Board Game Arena Studio
Post Reply
User avatar
Posts: 5
Joined: 29 June 2011, 03:57

Better Tutorials

Post by bamf226 » 04 March 2019, 05:43

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.

Posts: 91
Joined: 01 September 2017, 17:25

Re: Better Tutorials

Post by vincentt » 04 March 2019, 20:56


About the tutorials at least they exist :)
To know various functions and how they work, I work from here : anchor BGA Studio documentation

Then you can still ask quesitons here, we will help you of course :)


User avatar
Posts: 485
Joined: 29 April 2012, 23:43

Re: Better Tutorials

Post by RicardoRix » 16 March 2019, 23:11

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 ?

User avatar
Posts: 60
Joined: 28 September 2013, 18:15

Re: Better Tutorials

Post by A-dam » 17 March 2019, 08:57

RicardoRix wrote: Is it not possible to use words/strings rather than 1 and 2 ?
You can define your own constants as indicated here: ... for_States

Anyway, those are not magic numbers, it just idicates numerical ID of the state, nothing magical in it :)

Post Reply

Return to “Developers”