ID:149300
 
Can I expect to have any substantial increase in lag if I decide to load text strings from savefiles rather than from variables directly from the game?

Also, does it take any longer to load information from a large savefile than it does from a small one?

Also, does it take any longer to load information from a large savefile than it does from a small one?

If your loading the entire thing? No, if your trying to find a specific thing(ie a players sav) Yes.
You have to remeber that its all basic text, so your computer should be able to sift though it realy fast. So it might not matter.
Foomer wrote:
Can I expect to have any substantial increase in lag if I decide to load text strings from savefiles rather than from variables directly from the game?

Also, does it take any longer to load information from a large savefile than it does from a small one?

I think it'll depend a lot on the size of the file. A multi-megabyte file, yes, would take a while to read from. A few hundred K you can probably get away with. The question of whether this will be a substantial difference depends very much on the size of the savefile involved.

I recommend a hybrid approach: Whenever you need a string, check if it's null; if it is, load it from a file and then spawn a line of code to null it out in about 5 minutes. (Or, use a more complex timer datum, so any access to the string will "refresh" it so it's deleted some set time after the last access.) By the hybrid approach, you might not have to load from files too often.

Another suggestion I have is to split up the text files. For instance, you could make a file for rooms 1-100, another for rooms 101-200, and so on. Item types could be grouped by category. Every item should have some easy way of determining which file it belongs to so it can retrieve information as efficiently sa possible.

Lummox JR