All right, back with more questions. I managed to save and load information using database, then loading/saving information via JSON and parsing necessary parts to arrays.
For offline games, is there any way to store information in XML or any other file to player own computer and use that for saving/loading information?
I assume we can use instance variables to check if object should spawn or not, but there is alot more information we need to be able to handle such as player own information (health, mana, skill points, money, items currently in use, skills selected etc.), inventory, map progress, dungeon progress, game total progress, karma (relationship between other NPCs) and more. Hoping that player will not clear their cookies and lose all game data is bit akward.