Page 1 of 1

How can I load saved game?

Posted: 01 Sep 2016, 11:05
by Burgsch
Hey, I saved game by using /save X command.
When I type /load X game does not load...

How can I do that?

Re: Wiki: issues + quick questions/answers

Posted: 01 Sep 2016, 11:06
by Burgsch
I read this: https://springrts.com/wiki/Lua_SaveLoad but cannot find how to LOAD saved game? It only says about using /save to save game but not load it back later?

Moved from another thread - please don't double post! (Silentwings)

Re: How can I load saved game?

Posted: 01 Sep 2016, 13:20
by Silentwings
Currently, you can't, Spring doesn't support doing it yet.

Re: How can I load saved game?

Posted: 01 Sep 2016, 14:24
by Burgsch
Thank you, but I do remember long time ago such feature which I used to load\save. It worked if I remember correctly.
I do not play multiplayer as it is useless form of playing (build fast, kill, end game in 30 min).
I prefer enormously long battles which I remember from Total Annihilation, often one mission for 10 hours.

Is there way to achieve such state? I mean some kind of "hibernation" of the Spring? My desktop PC is rarely being shut down, only when performance of Windows is beginning to slow, so this would be some kind of poor workaround of this lack of feature (which I do not understand why).

Re: How can I load saved game?

Posted: 01 Sep 2016, 16:35
by Silentwings
There isn't.

The save/load feature does not exist because Spring calculates the game state incrementally and the unsynced part of the "state" may be different for different players -> implementing save/load is non-trivial.

Re: How can I load saved game?

Posted: 02 Sep 2016, 01:06
by MasterBel2
I could suggest pausing the game and leaving spring idling in the background, or if you're playing against AIs you might be interested in this method: viewtopic.php?f=11&t=35359
I don't know how reliable this will be though. If this could somehow be deliberately implemented as a method for saving games maybe?

Re: How can I load saved game?

Posted: 02 Sep 2016, 12:25
by Burgsch
Silentwings wrote:There isn't.

The save/load feature does not exist because Spring calculates the game state incrementally and the unsynced part of the "state" may be different for different players -> implementing save/load is non-trivial.
Different players you mean multiplayer or single? I meant Save\Load purely for single player.


@MasterBel2 - I think that would be the best option so far. I must only do it right, I mean set process of the spring to idle by process manager.
I hope it does not take full resources when being idle.
I have 16 GB of RAM but only 1 GB VRAM.


Soon gonna do tests. If it pass (is playable after recurring from hibernation) then the worst enemy is random crashes may occur.

Re: How can I load saved game?

Posted: 23 Oct 2016, 22:42
by serapia1995
Please let us know if you have figured it out, I find it unacceptable that we can't get a basic saving function on RTS single player games

Re: How can I load saved game?

Posted: 24 Oct 2016, 00:13
by Forboding Angel
serapia1995 wrote:Please let us know if you have figured it out, I find it unacceptable that we can't get a basic saving function on RTS single player games
Pull requests welcome!

This engine has always been focused more upon multiplayer. Singleplayer is just kind of a side thing.

Also to note, TA didn't have saving functions either. Saving a game state is not a simple thing. You have units in the middle of orders, projectiles in the air, deformations in terrain and a zillion other things, much of which gets calculated on the fly. When silent wings says it's non-trivial, he's understating it quite a bit.

Re: How can I load saved game?

Posted: 24 Oct 2016, 13:28
by serapia1995
So I associated .ssf files with Spring main executable Spring.exe, it loaded everything correctly but the textures keep flashing darker & brighter; why are you saying it's not technically feasible to save? ( there even is a "Save" button in-game), talking about Balanced Annihilation

I welcome your experiences and comments

Re: How can I load saved game?

Posted: 24 Oct 2016, 16:09
by Silentwings
loaded everything correctly
No - your reloaded game will not be fully identical to the game saved, although it may be very similar. For this reason the partial save/load functionality that does exist is not suitable for online play and cannot be relied on for singleplayer missions, etc, either. This may change in future. Of course if what already exists suffices for your own needs, feel free to use it.
the textures keep flashing darker & brighter
No idea, sorry. But what you are using here does not come with an assertion that it works.

Re: How can I load saved game?

Posted: 24 Aug 2017, 22:09
by PepeAmpere
Silentwings wrote:
loaded everything correctly
Can I ask why this thread was moved to nota project subforum?

Re: How can I load saved game?

Posted: 25 Aug 2017, 01:29
by zwzsg
And why was this rezzed?

But while we're at it:


Forboding Angel wrote:Also to note, TA didn't have saving functions either.
This is blatantly false:
Image Image


Forboding Angel wrote:Saving a game state is not a simple thing. You have units in the middle of orders, projectiles in the air, deformations in terrain and a zillion other things, much of which gets calculated on the fly. When silent wings says it's non-trivial, he's understating it quite a bit.
This is a fallacy. You do not need to save the state exactly, including mid-air projective. A close-enough will do fine.

The Lua API is complete enough to save and restore unit position, health, order queue, etc.. which is all that matters. Last time I tried, there was some trouble for unit under construction in factory, but unless it's a Krogoth, losing build progress isn't that game breaking. And now we have builderID which may help with that. Losing projectile is no big deal either, unless you happen to save while a nuke is flying. Terrain deformation save/load is a bit costly in term of filesize and load time, but is easy to implement. Then there's the Lua gadget states, which might work of the bat or be time consuming to fix depending on how the gadgets are.


Silentwings wrote:Currently, you can't, Spring doesn't support doing it yet.
The engine may not, but it's implementable by games. For example Argh had implemented savegame in his Spring game. And so I have. And that was back in 2009 - 2010.


Forboding Angel wrote:This engine has always been focused more upon multiplayer. Singleplayer is just kind of a side thing.
That's the real reasons: Most Spring game makers don't care about savegames. Even when the code exist and is integrated in their game, they wouldn't care enough to use it.

Re: How can I load saved game?

Posted: 25 Aug 2017, 08:20
by Forboding Angel
Multiplayer save games, Z.

Re: How can I load saved game?

Posted: 25 Aug 2017, 08:39
by Silentwings
Can I ask why this thread was moved to nota project subforum?
It wasn't. The OP created it here.

Please don't necro dead threads.

Re: How can I load saved game?

Posted: 28 Apr 2020, 08:31
by MechCommand
You can load saved games by going to your local spring installation. You go to a folder called saves and then you drag it over your spring.exe.
8)

GL HF!