Better Tutorials

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

Better Tutorials

Postby 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.

vincentt
Posts: 81
Joined: 01 September 2017, 17:25

Re: Better Tutorials

Postby vincentt » 04 March 2019, 20:56

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

User avatar
RicardoRix
Posts: 414
Joined: 29 April 2012, 23:43

Re: Better Tutorials

Postby 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
A-dam
Posts: 57
Joined: 28 September 2013, 18:15

Re: Better Tutorials

Postby 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: 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 :)


Return to “Developers”

Who is online

Users browsing this forum: Bing [Bot] and 2 guests