For the love of God a Save Option!!!!!!!

For the love of God a Save Option!!!!!!!

Requests for features in the spring code.

Moderator: Moderators

User avatar
cRaNbErRy MuFfInMaN
Posts: 3
Joined: 26 Sep 2006, 05:56

For the love of God a Save Option!!!!!!!

Post by cRaNbErRy MuFfInMaN »

for the love of God a Save Option. That lets you save and recontinue on multiplayer games with friends and even when its only you fighting 1 bot.


I had a huge battle with 4 friend lasted 3 hrs and the thing crashed it sucked to loose all that work.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

Host a replay, when it gets close to the end, type .cheat, then all of you do a .team X to resume control of your team. I think there's a way to jump to, like, 99% done or whatever too.... just don't ask me what it is.
10053r
Posts: 297
Joined: 28 Feb 2005, 19:19

Post by 10053r »

Cadyr: Thanks for the tip! That only shows to highlight just how close we are to a real save feature. I think this is a great request, especially since it offers SO much functionality for what seems like only a little effort.
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Post by submarine »

just wanted to keep that thread alive - although im pretty sure all devs are quite busy atm

@caydr: thx for the advice - but i guess it wont work with ai players.. :(
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

Work?...
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Post by Pxtl »

10053r wrote:Cadyr: Thanks for the tip! That only shows to highlight just how close we are to a real save feature. I think this is a great request, especially since it offers SO much functionality for what seems like only a little effort.
No, it doesn't. The problem is that's pretty much the only way to do any kind of resync/save/scenario/late join right now - there's no way to save that records/loads the _current_ gamestate. Only by playing through the whole history of the game (which, if you've tried it, is freakishly long to do on a slow box) can you actually join a game. This isn't a minor piddling difference, because it involves implementing a 100% accurate serialization system for all present gamestate, whereas the only thing that is recorded to do the "replay" style approach is to record the initial gamestate and all user-initiated changes (the rest of the state can be inferred based the user-changes.... but it takes time).
User avatar
nobody2u
Posts: 123
Joined: 09 Aug 2006, 18:31

Post by nobody2u »

I don't think using a replay like that would work very well. Won't the players would be able to see what their enemies are doing during the replay?
User avatar
Soulless1
Posts: 444
Joined: 07 Mar 2006, 03:29

Post by Soulless1 »

it does require a certain amount of honourable play, but still, atm it's the only thing we've got...
ZellSF
Posts: 1187
Joined: 08 Jul 2006, 19:07

Post by ZellSF »

nobody2u wrote:I don't think using a replay like that would work very well. Won't the players would be able to see what their enemies are doing during the replay?
Just set the teams at the start of the replay and that shouldn't be a problem.
MrNubyagi
Posts: 166
Joined: 11 Nov 2006, 07:29

Post by MrNubyagi »

discriminatingly banned by decimator
Last edited by MrNubyagi on 30 Nov 2006, 05:15, edited 2 times in total.
User avatar
Fanger
Expand & Exterminate Developer
Posts: 1509
Joined: 22 Nov 2005, 22:58

Post by Fanger »

Did you read the above statements.. its NOT that simple..
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

The biggest issue is that the existing save and laod system is not very easy to use, and when you load you end up with lifeless AI enemies. Loading enemy AIs again would help this enormously.
MrNubyagi
Posts: 166
Joined: 11 Nov 2006, 07:29

Post by MrNubyagi »

discriminatingly banned by decimator
Last edited by MrNubyagi on 30 Nov 2006, 05:14, edited 1 time in total.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

mwha?! I'm not aware of a single game that allows saving midgame in multiplayer other than FPS type games and MMO's.

What you're asking is impossible, it would require that spring be able to resync.

And then there's the simple fact that doing that with a replay would take a huge amount of cpu power because it then has to run the game from the very start from that demo, and it will vary immensely from person to person, and at times could take 1-20 minutes for the average PC to fully replay the file at 20x speed multipliers, nm older PC's or long games.

Replays arent replays like normal files, they cant be rewinded etc. When spring runs it saves all the network commands it recieves to a file aka the replay. Then when it plays the file it just feeds those commands back into spring as the game plays, so there's no gamestate data saved just network commands and a startign script.
User avatar
Decimator
Posts: 1118
Joined: 24 Jul 2005, 04:15

Post by Decimator »

starcraft and alpha centauri
MrNubyagi
Posts: 166
Joined: 11 Nov 2006, 07:29

Post by MrNubyagi »

discriminatingly banned by decimator
Last edited by MrNubyagi on 30 Nov 2006, 05:14, edited 1 time in total.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

Why discuss this, strongly doubt it will ever make it into spring unless one of the remaining devs feels like it or you provide the code (changes, bugfree) for it.

Quick solution: play shorter games. :P
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

MrNubyagi wrote:Since all messages are time stamped why can't you start from any particular point in the demo? Initialize the game as it initializeses when starting a demo, copy last known package time in a variable, do thetime = lastknowntime - 30 seconds or so and feed the engine al packages whos time is thetime as if the demo had started. Start paused so it would be sure everyone syncs.
Because the messages at any point in time do not describe the game state. They can be seen as deltas, only when knowing frame N and the delta frame N one can calculate frame N + 1. Since frame N is never stored, you solution is impossible.
If i don't know exactly doesn't mean it can't be done, but even more so its very doable. I didn't participate at this from the start so i don't know where to jump in and on what to document. More of it i don't have any experience in networking stuff.
So dont say its doable..., or make a patch yourself.
Replays are scrollable if programmed to be. Rise of Nations has scrollable replays and its not the only rts with this feature.
Yes, this has several disadvantages tho, like much (as in really much) bigger replay files, because they need to include "keyframes" describing the gamestate at regular intervals. Probably means a size increase of 10-20x.
Ussually in a TBS save games wil be found plenty. But most RTS game have a save game feature when playing with AI. All its needed is a timestamp that can be worked relative to the engine to create a savegame even for multi. I believe saving is made of the objects dump. I encountered something called serialization so far that resembles what a save game shoudl do.
All Spring needs is serialization i believe, or, an enhanceddemo system that would work as a savegame system.
You forget things like handling network connection initialization, making sure everyone loads the right savegame, etc. etc. Also adding in serialization isn't easy if you got to reverse engineer parts of the engine to figure out what it is actually supposed to do.
Now the way to scroll is to read the timestamps. Its clear that the engine reads the demo and during play it writes to it. Therefore there are allready functions that take the timestamp as a parameter or there is some member data or whatever that works with time stamps. Either work a way to separate in a new file the stuff from timestamp x on or work on the actual demo file.
You need keyframes too.
The buildings and units exist in the demo.Do they exist as a result of saved commands in the demo or are they cotained in the demo file as well? Can they be saved with F8?
There don't exist any buildings or units in the demo. There only exists a set of initial conditions, like Map=blah, Mod=foo, StartMetal=400, etc., and a set of user commands.
Now i also undertand that the objects allready in game might not appear in the demo. Well the save function should come in this saving every once in a while. Then sync the time of the save with the timestamps and recreate the game at that point. I don't know what it takes to make it work tough as i don't know the system but i am certain it can be made possible.
Yes, everything is possible given sufficient time, which is exactly the problem.
bwansy
Posts: 385
Joined: 02 May 2006, 05:21

Post by bwansy »

:roll: I am very confused, mostly because I don't really know how the engine works.
What exactly is preventing Spring to have, apart from the replay recorder, a seperate function which when called at any moment, reads all the status of all units and weapon shots (perhaps in addition to other particles that are not purely for visual effect) at that particular instant, and then write them into a single file, aka a SAVE option? Is that because of the complexity of Spring engine, that simply a save file cannot reccreate what's really happening when being loaded? Or is it because such a save file would be way too large? Or is it just because there are not enough people who want it?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

infact we already have code that does that courtesy of jelmer and his creg class.

To save a game press f8.

To load a game, start spring.exe and select load test.sdf

Any AIs in use wont be reloaded, and its not possible to continue a network game from this.

But if AIs where given something along the lines of

void Save(const char* savefile);
void load(const char* savefile);

Added to IGlobalAI and IGroupAI, and then where reloaded when a savegame was loaded, then that would be saving and loading sorted, and all we'd need is a way to specify which savegames are loaded and what filenames to save them too.

All the hardwork has already been done by jelmer It just needs a little extra work to finish it off. Namely an ingame save/load dialog, a way to specify a savegame in the commandline, and AI save/load support.

Network game saves that can be reloaded and continued as a network game later on are simply out of the question however.
Post Reply

Return to “Feature Requests”