How can I load saved game?

How can I load saved game?

Discuss your problems with the latest release of the engine here. Problems with games, maps or other utilities belong in their respective forums.

Moderator: Moderators

Post Reply
Burgsch
Posts: 4
Joined: 01 Sep 2016, 11:03

How can I load saved game?

Post 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?
Burgsch
Posts: 4
Joined: 01 Sep 2016, 11:03

Re: Wiki: issues + quick questions/answers

Post 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)
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: How can I load saved game?

Post by Silentwings »

Currently, you can't, Spring doesn't support doing it yet.
Burgsch
Posts: 4
Joined: 01 Sep 2016, 11:03

Re: How can I load saved game?

Post 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).
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: How can I load saved game?

Post 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.
User avatar
MasterBel2
Posts: 347
Joined: 11 Apr 2016, 12:03

Re: How can I load saved game?

Post 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?
Burgsch
Posts: 4
Joined: 01 Sep 2016, 11:03

Re: How can I load saved game?

Post 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.
serapia1995
Posts: 2
Joined: 23 Oct 2016, 22:39

Re: How can I load saved game?

Post 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
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: How can I load saved game?

Post 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.
serapia1995
Posts: 2
Joined: 23 Oct 2016, 22:39

Re: How can I load saved game?

Post 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
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: How can I load saved game?

Post 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.
User avatar
PepeAmpere
Posts: 589
Joined: 03 Jun 2010, 01:28

Re: How can I load saved game?

Post by PepeAmpere »

Silentwings wrote:
loaded everything correctly
Can I ask why this thread was moved to nota project subforum?
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Re: How can I load saved game?

Post 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.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: How can I load saved game?

Post by Forboding Angel »

Multiplayer save games, Z.
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: How can I load saved game?

Post 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.
MechCommand
Posts: 4
Joined: 28 Apr 2020, 03:06

Re: How can I load saved game?

Post 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!
Post Reply

Return to “Help & Bugs”