User Tag List

Results 1 to 3 of 3

Thread: Allow Setting the .sav FIlename in ag.cfg?

  1. #1
    The Timelord
    QDB Manager
    ZC Developer

    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,396
    Mentioned
    112 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,760
    Level
    21
    vBActivity - Bars
    Lv. Percent
    68.7%

    Allow Setting the .sav FIlename in ag.cfg?

    I have considered adding a string to ag.cfg for the save file filename, and doing something like this (pseudocode):

    Code:
    char savefile[255];
    if ( GetSaveFIlename() != NULL ) { //store the filename from ag.cfg and use that. }
    else { //set the savefile to zc.sav }
    
    //Reference savefile instead of hardcoded zc.sav.
    That would make it easier say, to have the launcher set the save file, and to keep multiple save files around. It would also make some standalone stuff easier in the future.

    I was also going to add a field in ZLaunch for the executable names, so that the user can set the filenames used by Zelda.exe, ZQuest.exe, ROmView.exe, or whatever; and similarly for Linux, and store them in ag.cfg. THus, you could easily rename zelda-w.exe to zelda.exe without ZLaunch breaking. Likewise, if you wanted to make a standalone player, and a customised ZLaumch, all you would need to do is rename the window title element, and change the icons and othe text elements, and you could leave the paths stuff alone, (e.g. if you want to make a standalone game using the ZC engine).

  2. #2
    Administrator DarkDragon's Avatar
    Join Date
    Oct 2001
    Posts
    6,228
    Mentioned
    70 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    11,025
    Level
    31
    vBActivity - Bars
    Lv. Percent
    8.16%
    I don't see anything wrong with this (other than that you should use a std::string or other dynamic buffer, *not* a hard-coded buffer that will crash ZC when someone happens to place it nested deep in the file system), but what's the need for changing the save name?

  3. #3
    The Timelord
    QDB Manager
    ZC Developer

    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,396
    Mentioned
    112 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,760
    Level
    21
    vBActivity - Bars
    Lv. Percent
    68.7%
    Quote Originally Posted by DarkDragon View Post
    I don't see anything wrong with this (other than that you should use a std::string or other dynamic buffer, *not* a hard-coded buffer that will crash ZC when someone happens to place it nested deep in the file system), but what's the need for changing the save name?

    True, on the srd::string point, for dynamic allocation. I was not going to allow it to be in another path though. Just a filename in the same path as ZC, so nesting it/buying it is not something that should be a problem, as it would always need to be relative to the ZC binary.

    As to why: Users frequently request that ZLaunch or whatever can use multiple save files. The way that the other launcher that Matthew made worked, was that it renamed save files and moved them around on the filesystem, which I think is a horrible idea. Apart from allowing a programme to muck about with filesystem data, this would need multiple implementations for each OS. I would much rather allow a user to choose a save file in the launcher, than to give the launcher the ability to manipulate files (other than its config file), if for no better reason than that copying the file and moving it around, could lead to damage, which would not occur by choosing a named save file (as this is read-only, not r/w/e).

    Further, moving files around, might not work on some OSes these days, based on user permissions. This again, makes multiple files, and selecting their names, a better choice.

    Last, for standalone projects, being able to name the save file to 'gamename.sav' would probably be useful, although this is a minority case of impact. For example, if someone wanted to make a custom adventure game, and hide the engine, then they ,ight want to rename the savename. I was planning to do something similar for the assets, which will come into play for module systems, later; so that stuff such as zelda.dat is specified from the config file, rather than hardcoded; making it easier to change out the datafiles for us, too.

Thread Information

Users Browsing this Thread

There are currently 2 users browsing this thread. (0 members and 2 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Armageddon Games is a game development group founded in 1997. We are extremely passionate about our work and our inspirations are mostly drawn from games of the 8-bit and 16-bit era.
Social