I've been writing my game's saved files using standard ftprintf as shown below...
But I noticed that when I call this for like a thousand times (because there's too much data to save), it saves too long (like 20-30 secs) especially when on a storage card.
Questions:
(1) Are there other ways of saving faster (when you need to save a lot of data)?
(2) Is there a way to assemble all the contents into a larger variable first and then call _ftprintf only once to save the data to file after all the contents have been assembled?
Thanks in advance!
- Code:
_ftprintf(fp,TEXT("%i:"), iVal1);
_ftprintf(fp,TEXT("%s:"), sData1);
_ftprintf(fp,TEXT("%i:"), iVal2);
But I noticed that when I call this for like a thousand times (because there's too much data to save), it saves too long (like 20-30 secs) especially when on a storage card.
Questions:
(1) Are there other ways of saving faster (when you need to save a lot of data)?
(2) Is there a way to assemble all the contents into a larger variable first and then call _ftprintf only once to save the data to file after all the contents have been assembled?
Thanks in advance!