Page 1 of 1
Where should I store the words of a party game?
Posted: 26 December 2023, 01:32
by GmTk
Hello
For a party game, with several hundreds of words to be guessed,
Where should I store the words?
In the database
Or?
In material.inc.php - static data
How should I store different words depending of the language players choose?
Re: Where should I store the words of a party game?
Posted: 26 December 2023, 10:13
by Tisaac
GmTk wrote: ↑26 December 2023, 01:32
Hello
For a party game, with several hundreds of words to be guessed,
Where should I store the words?
In the database
Or?
In material.inc.php - static data
How should I store different words depending of the language players choose?
If it's static, there is not point storing them in the DB.
For the language dependency, please check the "language dependent" section in documentation :
https://en.doc.boardgamearena.com/Main_ ... _games_API
Re: Where should I store the words of a party game?
Posted: 26 December 2023, 13:57
by GmTk
Tisaac wrote: ↑26 December 2023, 10:13
GmTk wrote: ↑26 December 2023, 01:32
Hello
For a party game, with several hundreds of words to be guessed,
Where should I store the words?
In the database
Or?
In material.inc.php - static data
How should I store different words depending of the language players choose?
If it's static, there is not point storing them in the DB.
For the language dependency, please check the "language dependent" section in documentation :
https://en.doc.boardgamearena.com/Main_ ... _games_API
OK.
So, in material.inc.php, I should write something like that?
Code: Select all
$this->words =[ 'en_US' => [ 'us_word1', 'us_word2' (...) ]
, 'fr_FR' => [ 'fr_word1', 'fr_word2' (...) ] ] ;
Re: Where should I store the words of a party game?
Posted: 26 December 2023, 14:50
by Tisaac
That could work, yeah
Re: Where should I store the words of a party game?
Posted: 27 December 2023, 11:49
by LeSteffen
I used to store stuff like this in the material.inc.php.
Now I simply throw it in the js file saying to myself that it'll be cached by browsers while everything coming from the server would not.
There's potentially less loading times as well as less server load.