I'm working on a Phoenix Wright type game and I need a saving system. I'm not very familiar with Lua and I'm not an expert programmer. Phoenix Wright is kind of like a visual novel with interaction if I were to put it simply. I fictionally want to bookmark a person's place in the story. There really isn't any "health" to save in most sections of the game. All that need saved is evidence and suspects.
how should i go about creating save data?
How to make save files that can be overwritten
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: How to make save files that can be overwritten
You serialize your data into a string, and dump that string into a file. Loading is the same process in reverse. There are serialization libraries that take Lua tables at the input when saving, and produce Lua tables at the output when loading.
Headline question is about files that one cannot overwrite: you set its attribute as read-only. You can do this by executing appropriate shell command, which varies by OS. You may not have permissions to change file attributes, and even then the attributes can be reverted. If you just want to save separate files - simply give them separate filenames.
Headline question is about files that one cannot overwrite: you set its attribute as read-only. You can do this by executing appropriate shell command, which varies by OS. You may not have permissions to change file attributes, and even then the attributes can be reverted. If you just want to save separate files - simply give them separate filenames.
Who is online
Users browsing this forum: No registered users and 3 guests