Page 2 of 2

Re: Fatal error during creation of database: Not logged.

Posted: 03 May 2013, 07:00
by sourisdudesert
Hello,

Pikiou is right: getAllDatas infos are private and cannot be sniffed by other players. So it's safe. NotifyPlayer, obviously, is safe too.

I realized more than 20 games and never feel the need of something else... I understand that sending private info in game state argument can be useful at some point, but this is difficult to implement. In fact, game state argument is linked with game state infos, and game state infos is public. Game state argument exists to simplify the data structure of the games, because without arguments you would have to create a lot of database structures that are used only for specific game states.

So my advice is: notifyPlayer do the job :)

Cheers,

Re: Fatal error during creation of database: Not logged.

Posted: 04 May 2013, 14:02
by tilalilalou
I agree with that, getAllData and notifyPlayer are enough.
I used "getAllData" for my specific problem, and it work just fine. The reason why I first tried to use state arguments was because I had private arguments specific to my second step which is a one-shot step : I wanted to enhance code separation by removing from getAllData these very specific data.

Tilalilalou

Re: Fatal error during creation of database: Not logged.

Posted: 07 May 2013, 21:38
by Rudolf
Hello Souris,
are you sure that there is no way that end user is able to edit his own copy of game.js, going in fonction setup and get data of players from gamedatas.players?
(for example adding code to display)
if some data are in player table but not shown by the game.js code? or some other data in gamedatas ?

Re: Fatal error during creation of database: Not logged.

Posted: 08 May 2013, 01:21
by pikiou
I think the private data Greg was talking about is the data of the current player. Sending private data of other players is unsafe indeed.

getAllDatas is called for each execution of the setup function. So at game start it's called as many times as there are players, each time with a different current player id. And you can return general data plus that current player private data.

Re: Fatal error during creation of database: Not logged.

Posted: 14 May 2015, 21:17
by daikinee
pikiou wrote:A private state arguments method would be a blessing!
I am working on something to emulate it and simplify the framework.
Is this something that has been implemented and can you give us an explanation how you dit it?

Thanks

Re: Fatal error during creation of database: Not logged.

Posted: 15 May 2015, 01:59
by pikiou
It was implemented and is explained in the states.inc.php documentation at the bottom in the Private infos in args paragraph.

Re: Fatal error during creation of database: Not logged.

Posted: 15 May 2015, 16:08
by daikinee
Thanks, i will try it