• 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!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Discussion [Resolved] Included Files Protection

M

Mr Nazarick

Guest
Hello,

In my projects, I use two files of the type "json" which serve me, for one to store interface texts in different languages, for the other dialogues in different languages too.

Until then nothing is very hard and everything works perfectly. My question is about his two files which are therefore the category 'Included Files'.

When I "build" the game, either in zip or executable format, automatically both files are copied and therefore available to the curious. The problem arises that, if a player were to delete by mistake or stupidly change one of the files it will logically put a real bazaar in the game.

So, is there a way to integrate both of its files directly into the executable file and so they are protected and inaccessible ? Or maybe another way to protect them from any changes (?deletion?) ?

In advance I thank you for any help you can bring me.

Regards,
Mr Nazarick
 

xDGameStudios

GameMaker Staff
GameMaker Dev.
Hello,

In my projects, I use two files of the type "json" which serve me, for one to store interface texts in different languages, for the other dialogues in different languages too.

Until then nothing is very hard and everything works perfectly. My question is about his two files which are therefore the category 'Included Files'.

When I "build" the game, either in zip or executable format, automatically both files are copied and therefore available to the curious. The problem arises that, if a player were to delete by mistake or stupidly change one of the files it will logically put a real bazaar in the game.

So, is there a way to integrate both of its files directly into the executable file and so they are protected and inaccessible ? Or maybe another way to protect them from any changes (?deletion?) ?

In advance I thank you for any help you can bring me.

Regards,
Mr Nazarick
Create a script called for example: my_language_data()

then make the script like this:

Code:
return json_decode(@'
[paste the contents of your json file here]
');
this function will now return the ds_maps and ds_lists already created ;)
it's not really what you wanted but it works the way you want.
 
M

Mr Nazarick

Guest
Create a script called for example: my_language_data()

then make the script like this:

Code:
return json_decode(@'
[paste the contents of your json file here]
');
this function will now return the ds_maps and ds_lists already created ;)
it's not really what you wanted but it works the way you want.
Hi xDGameStudios,

Good idea indeed. So I can work on local files and for the final build (or other build that could be made available to the players) I would only have to use this principle (which check at the moment works perfectly)

Thank you for this quick and very helpful answer.

Regards,
Mr Nazarick
 
Top