• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Which is the fastest/lightest way to make the game Multilanguage

  • Thread starter Sorry_For_Dumb_Questions
  • Start date
S

Sorry_For_Dumb_Questions

Guest
1) Global 2D Array and store all text in it. (150+ value)
2) INI file.

I think 1 is bad for CPU but i don't know, whats your opinion?
 
150 values? That's nothing to worry about.

I would do both. Store the values in a text file of which using an ini file is one possible solution. At the start of the game, load all the values into a global 2D array.

Then you have the best of both worlds. A file format that can be easily updated, and the speed of having the values stored in memory when the game is running.
 

FrostyCat

Redemption Seeker
I wouldn't want either option. I'd use JSON to store my localization data, and take advantage of constant-time lookups that a map could offer.
 
S

Sorry_For_Dumb_Questions

Guest
I wouldn't want either option. I'd use JSON to store my localization data, and take advantage of constant-time lookups that a map could offer.
How can use JSON for this?
Can you give example please?
 
S

Sorry_For_Dumb_Questions

Guest
150 values? That's nothing to worry about.

I would do both. Store the values in a text file of which using an ini file is one possible solution. At the start of the game, load all the values into a global 2D array.

Then you have the best of both worlds. A file format that can be easily updated, and the speed of having the values stored in memory when the game is running.
When i say INI, i thought like this;

var text1;
ini open "file.ini";
text1 = ini read ( english, "text_key" , "defaulttext");
ini close;

Opening and closing ini files for each text quary maybe forcing the CPU?
 
When i say INI, i thought like this;

var text1;
ini open "file.ini";
text1 = ini read ( english, "text_key" , "defaulttext");
ini close;

Opening and closing ini files for each text quary maybe forcing the CPU?
@FrostyCat is right, JSON data loaded into a ds_map is a good solution.

Yes, opening and closing an ini file is time consuming if you were doing this in something like a Step Event that runs every frame. That's why loading everything at the start of the game into a ds_map will be optimal.

There are plenty of example posts of loading and saving data to and from a map using JSON on this forum.

I haven't watched this particular tutorial, but here is one example that perfectly matches:

https://forum.yoyogames.com/index.p...ltilingual-via-auto-loading-json-files.57659/

I just used the search box on the forum to search for "json map loading" and this was one of the first results.
 
S

Sorry_For_Dumb_Questions

Guest
@FrostyCat is right, JSON data loaded into a ds_map is a good solution.

Yes, opening and closing an ini file is time consuming if you were doing this in something like a Step Event that runs every frame. That's why loading everything at the start of the game into a ds_map will be optimal.

There are plenty of example posts of loading and saving data to and from a map using JSON on this forum.

I haven't watched this particular tutorial, but here is one example that perfectly matches:

https://forum.yoyogames.com/index.p...ltilingual-via-auto-loading-json-files.57659/

I just used the search box on the forum to search for "json map loading" and this was one of the first results.
Sorry and thank you
 
Top