Quote from: Baguettator on Mon 31/01/2022 14:44:55
I don't know if it's a lot, and I should have to calculate for the whole data of my game.
I must admit that 2.5 MB is not a lot today, especially compared to the rest of the game data.
Quote from: Baguettator on Mon 31/01/2022 14:44:55
Having very long script files is also impacting the RAM ?
Yes, script are compiled, and compiled scripts are loaded by the engine fully. The bigger script is, the bigger memory it requires.
Usually script sizes are in kilobytes though, but this may be more if they also include large global arrays of fixed size.
Quote from: Baguettator on Mon 31/01/2022 14:44:55Save data into the custom file, remove it from the variables. When necessary - load it back. There are file commands in ags script:
When you talk about disk cache : what do you mean ? How to use that in AGS ?
https://adventuregamestudio.github.io/ags-manual/File.html
But the disk cache is the last resort, you probably won't need this. Unless you are close to the game completion and found that your script data takes too much memory.
Quote from: Baguettator on Mon 31/01/2022 14:44:55
If I understand you well, instead of having an array like cartes[150] that is initialized at game_start, I should have instead only one 'cartes' instance, and a function like :
I mean rather - have these cartes stored in files, and loaded, as scripting everything in a function will likely require same memory. The point of this solution is to not have all of this data mentioned in script.
But this solution comes with extra problem: you need to save these files prior to using them in game. This means that you also need some kind of a "map editor", either scripted as a AGS game, or separate tool.
Alternatively, you may describe maps in a text format and parse them in script, for instance using IniFile module.
Quote from: Baguettator on Mon 31/01/2022 14:44:55
EDIT : when I run my game, I just had a look at the Task Manager, and it displays 408,5Mo in the Memory Section. Does it mean I'm using 408,5Mo over 3GB ?
That likely means your active process(es) are using 408 Mb total.
I think "Mo" is "Megabytes" in French?
Quote from: Baguettator on Mon 31/01/2022 14:44:55
EDIT 3 : I don't understand what are the custom saves. What's about ? Instead of AGS saves ?
You may save and load your own files from script. This way you can write only data that you need for your game to remember.
How to work with custom files in AGS:
https://adventuregamestudio.github.io/ags-manual/File.html
Again, this is an option, and you may look into this after you deal with other problems.