Saving profiles.

Started by KodiakBehr, Wed 05/11/2014 00:35:46

Previous topic - Next topic

KodiakBehr

I have a conceptual question -- I'm working on a game where I want individual players to be able to create their own profiles, if they're on a shared computer.  Saved games would therefore specific to that profile, and no other.  Persistent data in a .dat file would also be specific to that profile, and no other.  How would you go about doing this?

monkey0506

I believe that doing something like:

Code: ags
function game_start()
{
  Game.SetSaveGameDirectory("$MYDOCS$/YourGameName");
}


Should be sufficient for the save files, but IIRC the File operations all work exclusively on the game installation directory and don't support the $MYDOCS$ or $SAVEGAMEDIR$ tags, but yet disallow any paths that are not subdirectories. I'm not sure if any of the currently exposed methods would allow you to get a full path, but if you could get a full path to the $MYDOCS$ directory then you could try and parse the current user and store that in a .dat file in the game installation directory.

KodiakBehr

Damn.  That's what I was afraid of.

Thanks anyway for the feedback.

SMF spam blocked by CleanTalk