the most missing thing: execution environment

Game development with Board Game Arena Studio
Post Reply
User avatar
ddyer
Posts: 64
Joined: 01 April 2011, 19:55

the most missing thing: execution environment

Post by ddyer »

The most missing element in the development documentation is something resembling a description
of the runtime environment, at the level of useful objects and functions.

I suppose it's actually environments, because the javascript side is a separate
beast from the php side.

For examples, in game.view.php,

function "buildpage" has argument "viewargs" which is not used. So what is it?

"self::" is bound so some useful object, but what exactly and what useful functions are available from it?

$this also seems to be a useful object, so likewise what is $this and what apis are available from it?
User avatar
sourisdudesert
Administrateur
Posts: 4630
Joined: 23 January 2010, 22:02

Re: the most missing thing: execution environment

Post by sourisdudesert »

Hello ddyer,

In fact we try to write a "practical oriented" documentation. That can explain why, from time to time, some elements are not explained: they are not used and/or not useful for developing a game.

For example, "viewargs" reflects the arguments in the URL when loading the game. In the context of a game, these arguments are always the same, so you don't have to use "viewargs".

"self::" is bound to "$this" object. In the context of a game, you can use either "self::myMethod()" or "$this->myMethod()" and this won't make any difference. In both case, "$this" object represent your game object, the one defined in your ".game.php" file. So methods and variables available are the one you defined into it, plus the one defined there:
http://en.doc.boardgamearena.com/Main_g ... e.game.php

Hope it helps :)
Post Reply

Return to “Developers”