Where should I store the words of a party game?

Game development with Board Game Arena Studio
Post Reply
GmTk
Posts: 5
Joined: 25 December 2023, 18:45

Where should I store the words of a party game?

Post 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?
User avatar
Tisaac
Posts: 2736
Joined: 26 August 2014, 21:28

Re: Where should I store the words of a party game?

Post 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
GmTk
Posts: 5
Joined: 25 December 2023, 18:45

Re: Where should I store the words of a party game?

Post 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' (...) ] ] ;
User avatar
Tisaac
Posts: 2736
Joined: 26 August 2014, 21:28

Re: Where should I store the words of a party game?

Post by Tisaac »

That could work, yeah
User avatar
LeSteffen
Posts: 76
Joined: 13 July 2020, 15:32

Re: Where should I store the words of a party game?

Post 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.
Post Reply

Return to “Developers”