Fatal error during creation of database: Not logged.

Game development with Board Game Arena Studio
User avatar
sourisdudesert
Administrateur
Posts: 4630
Joined: 23 January 2010, 22:02

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

Post 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,
User avatar
tilalilalou
Posts: 78
Joined: 05 August 2011, 08:40

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

Post 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
User avatar
Rudolf
Posts: 566
Joined: 24 December 2011, 23:04

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

Post 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 ?
User avatar
pikiou
Posts: 389
Joined: 03 October 2011, 05:36

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

Post 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.
User avatar
daikinee
Posts: 32
Joined: 19 November 2011, 01:19

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

Post 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
User avatar
pikiou
Posts: 389
Joined: 03 October 2011, 05:36

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

Post by pikiou »

It was implemented and is explained in the states.inc.php documentation at the bottom in the Private infos in args paragraph.
User avatar
daikinee
Posts: 32
Joined: 19 November 2011, 01:19

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

Post by daikinee »

Thanks, i will try it
Post Reply

Return to “Developers”