Loading...
  OR  Zero-K Name:    Password:   

Is it possible (and how) to save multiplayer game for later?

26 posts, 4436 views
Post comment
Filter:    Player:  
Page of 2 (26 records)
sort
Building a base and defenses takes time. It would be fun to be able to first build a base and defenses, then save game, and then try different strategies with my friend.

I might put my server on virtual machine, which can be snapshotted. But then, after reverting, it would drop the connections with clients and AFAIK the game would abort.

Any ideas how to save the game with simpler means? Add-on?
+1 / -1

6 years ago
the game has (to my knowledge, devs may know better) no option to save a game state.

closest thing what you describe would be a mission witht he desired start conditions as point to start.
+0 / -0
I think this is not possible, but you have alternatives:
1) use cheats option and make your base instantly, there is option for this
2) make 'mission' which has all buildings and units at begening of the game. But I don't think this is easy thing to do, I had problems with zero-k mission editor..
3) eventually just speed up game with '+' key and build stuff faster.

+0 / -0
That's what I was afraid of. Too bad. I know that writing the save&load code is not the most rewarding, but after all, I am a programmer, and I even know a bit of lua. Maybe I can help myself (and others)? If there is a dev who can help me get acquinted with the logical structure of the game and how are the game objects organized, I could just do the dirty work and together we may make this feature. I speak English reasonably well.
+0 / -0


6 years ago
You can watch a replay of your game in extremely fast mode and insert yourself in as the players at the end.
+0 / -0
AUrankAdminGoogleFrog - that could just work. But would it work in multiplayer? I would need to turn this replay into served game.
+0 / -0

6 years ago
Try hosting a multiplayer replay on http://weblobby.springrts.com/ . It is a new feature and not yet fully explored.
+1 / -0
6 years ago
Join sisteczko2. option to save the game in multiplayer is extremely useful for me. I do not think such fast as it need to have time to consider further actions and not as quick to push the buttons in real time to time give directions to all the free units. therefore often use a pause. once we are almost half a day of playing in Supreme Commander on huge maps. constantly pauses, sometimes punctuated by rest and food. I like such a long and thoughtful battle and I would be very grateful if you were given the opportunity to make preservation.
+1 / -0
With the new engine release saving games comes a bit closer. The function that creates units can now accept an ID.
+0 / -0
6 years ago
That multiplayer replay thing just gave me an idea. How about a room that hosts some of the best replays? It could help new people learn to play.
+0 / -0
I'm not sure what you'd consider "best replays", but i doubt a beginner could make use of what he sees. Pro games walk along a very fine line of balance between aggression, eco and defence (not to mention the micro-factor).

It works out because if one player focuses to hard on one part, the other player can take advantage of that. But this key element is not what you usually see (or what is obvious to new players). If your enemy goes heavy defence or heavy eco, how do you deal with that? If you try the same approach as in the game you saw, you'd probably fail. And at the beginner level you are very likely to encounter lots of people that focus on a certain aspect of the game.

Commented replays would be much better at pointing out decision making etc., they are one step further than autohosts of good replays.
+0 / -0

6 years ago
You can inject yourself into a replay at any point by typing /cheat /team # (starting at player 0). You can also type /spectator /godmode which will give you control of all sides. The replay will continue to play, including all the actions both players took, while you are capable of issuing new orders, changing the course of events. You can even play against a recording of a players actions this way, but they obviously won't react to the 'new' events you cause.

Multiplayer replays have been around in spring for ages, ZKL just never implemented the functionality (because it's never really used). It should be fairly easy to add a 'host replay in multiplayer' button to battle pages, and a 'resume from saved state' widget could literally contain just a bunch of very quickly executed cheat commands (This will cause the battle to not count for elo etc of course, but then a replay probably wouldn't anyway). The trick would be getting the replay to stop executing orders so you can resume full control from any point.

Oh, and once you hit the point where the replay actually 'ended', the game will end regardless of it's state. However, as long as the server doesn't quit (Which it doesn't, if you're hosting locally, but hosting replays on springie would need a fix for this) you can just drag the 'end battle' screens off to the corner and keep playing.

So basically this has complete resume from replay functionality, it's just a bit fudgey and hacky. All you'd need to do to set this up properly is clean it up a little.
+1 / -0

6 years ago
I've tried to host a ZK replay with TASclient many times, but that never worked.
+0 / -0

6 years ago
Does it work with other games? Do we do something that causes the game not to know what's going on when it's playing a multiplayer replay? Or has the feature 'fallen out' of the engine?
+0 / -0

6 years ago
Yes, other mods did work. Last time i tried must be about a year ago though. I'm not sure how ZK differs from other mods. Maybe parsing the commander definitions causes some problems?
+0 / -0
I'd imagine it's something like that.

So there you guys go, that's your first task, get Zero-K to work with multiplayer replay hosting.
+0 / -0

6 years ago
a snapshot-to-mission-button would work too ;)
+0 / -0

6 years ago
Floris, it works with weblobby.
+1 / -0

6 years ago
then i should try it again.

Do you need to host from your own computer or can springie do it for you as well?
+0 / -0
6 years ago
Continuing replay might be easiest way for save/load but I dont think it is worth it. It might be so impracticable nobody will use it.

Think what kind of games will player want to save/load? Probally not small games that were running for 5 minutes.
Mostly it will be games that were going on for a loooong time and now you do not want to lose hours of playing. Players will not use save/load when it takes dozens minutes.

Better is imo writing all unit positions etc to a file.
zwzsg did that years ago and it worked. (engine changes broke it but that was things unrelated to the actual save/load) Instead of saving to a script.txt it should save to a lua file though.

There were/are some problems:
1) unitIDs could not be kept - since some time they can, CreateUnit() got new parameter: solved.
So now can easier save command queues etc.

2) saving/loading the state of Lua all at once is not possible.* Would have to do it for each thing indivually: too much work. BUT: Most gadgets actually use UnitRules and save/loading that should be a lot easier. (can loop over it)
IMO it would be good enought if at first some things are not saved. (say a burning unit now longer burns after save/load) It could be done step by step...
*I wonder if it was possible to put everything into a table like instead of local x=5 you have local T.x=5
Then one would just have to loop over the keys/values of T?

3) Frame counter starts over at 0. Probally fixeable by something like Spring.GetGameFrame()+frameWhenGameWasEnded

4) unitscripts: variables, running threads etc. Might not matter much though.

5) CEG effects: not possible to read at all.

---
quote:
you can just drag the 'end battle' screens off to the corner and keep playing.
Type /endgraph into chat to hide it.
+1 / -0
Page of 2 (26 records)