I didn't know what to write as topic name...
I want to implement a mission/task system into my game. Let's say 50 missions/task that the player must complete in order to receive exp or money or whatever.
Player will have to kill n number of enemies, explode things, collect n numer of items, etc.
With that said, I've been cracking my head trying to define if I should use JSON, XML, CSV (Rex's Plugin)... As I don't really know how they work. I've used ajax before on webpages but, only to save info to a database, and that was using JQuery, so I'm don't really get what is going on with the examples provided in the tutorials.
I'm leaning towards CSV, making a table where I have Text info for the mission, reward, task to complete, etc
So here's how I think I could do it:
Load the csv file as a String using ajax.
Do all Construct stuff to present the first mission to player... player kills 50 monsters and completes that mission.
Set the "completed" row in the csv string to 1 and continue to the following mission using another variable which stores current mission.
Now, this is where everything gets messy.
How do I save all that? I can use webstorage but, won't my info be overwritten by the On start ---> Load from csv file?
I don't know if what I'm writing makes sense. I can load, modify and set new values to the json string loaded from my csv project file. But how to save that info, so when the game is loaded again, player can check missions that are already completed?
I want it to be offline as I don't like that the game needs access to internet to be "fully played", and I don't know if I can alter my project file during runtime to save the new info. Can I alter a JSON, XML or CSV file during runtime?
Sorry for my english, hope you guys can help me or share some light on the subject.