save Singleplayer Session

save Singleplayer Session

Discuss everything related to running Spring on your chosen distribution of Linux.

Moderator: Moderators

Post Reply
kaiserbert
Posts: 50
Joined: 21 Jul 2006, 22:11

save Singleplayer Session

Post by kaiserbert »

Hi,

how can i save and load a singleplayer session?

bye Bert
malric
Posts: 521
Joined: 30 Dec 2005, 22:22

Post by malric »

If you mean how can you save a game, the answer is : you can't yet. And I do not know if there is someone working on this...

If you do not mean that please explain what do you mean by 'session'
kaiserbert
Posts: 50
Joined: 21 Jul 2006, 22:11

Post by kaiserbert »

yes thats what i wanna know.
Where is the Problem?
Does the Windows Version support this yet?

bye Bert
malric
Posts: 521
Joined: 30 Dec 2005, 22:22

Post by malric »

No, the windows version doesn't support it either.

The save/load isn't implemented yet. There replays of the games are available, but in these replays just the commands for the units are saved (so you have to run the entire simulation to reach again a certain point - not very practical).
Xerxes-17
Posts: 4
Joined: 24 Jan 2007, 10:00

Post by Xerxes-17 »

actually, yes you can.

Use the Spring Test.exe, and one of the F* keys will save the game I believe. After that do the same thing, but look for the "load test" command in the menu of the STest and you'll load up from that point.
malric
Posts: 521
Joined: 30 Dec 2005, 22:22

Post by malric »

You mean it is in the latest version. The first post was on 9th of january. Was save/load available then ?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

press f8.

But its unreliable.

For one you can only have 1 savegame file. And its a bit pointless as the saved game is a single player game when loaded and none of the AIs are re-initialized so the enemy units just sit there.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

You can have as many as you want, you just have to rename Test.ssf to something else or it will get overwritten next time you save.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

dirty hacks ftw!
kaiserbert
Posts: 50
Joined: 21 Jul 2006, 22:11

Post by kaiserbert »

Maybe somebody can do a patch to the Code,

Code: Select all

string buttonpressed;
fstream SaveFile,GameFile;
string NameofSaveFile;

if(buttonpressed==F8)//Save Game
    {
    cout<<"Which File Name?"<<endl;
    cin>>NameofSaveFile;
    GameFile.open("Test.ssf",ios::in);
    SaveFile.open(NameofSaveFile.c_str(), ios::in|ios::out);
    char c;
    while(GameFile.get(c))
        {
        SaveFile.put(c);
        }
    GameFile.close();
    SaveFile.close();
    }
else if(buttonpressed==F5)//load Game
    {
    cout<<"Which File Name?"<<endl;
    cin>>NameofSaveFile;
    GameFile.open("Test.ssf",ios::in|ios::out);
    SaveFile.open(NameofSaveFile.c_str(), ios::in);
    char c;
    while(SaveFile.get(c))
        {
        GameFile.put(c);
        }
    GameFile.close();
    SaveFile.close();
    }
bye bert
Post Reply

Return to “Linux”