Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repeal save game data request #2364

Merged
merged 14 commits into from Feb 2, 2019

Conversation

o01eg
Copy link
Contributor

@o01eg o01eg commented Jan 26, 2019

Another step of #2243. Fixes #2275.

Currently the server requests turn orders and save data from the client after get turn orders before from the client which requires the client to be online when server decide to save game.
After this PR server gets turn orders and save data together from the client so it became possible to client to disconnect after sending turn orders.

To compensate lacking server-side request the client sends partial order changes on some event.

Also allows to send UI data if client connected to playing game.

Breaks client-server compatibility!

@o01eg o01eg changed the title Repeal save game data request [WIP] Repeal save game data request Jan 26, 2019
@geoffthemedio geoffthemedio added component:network category:tweak The PR contains insignificant code changes, like code style grooming or value tweaking. labels Jan 26, 2019
client/ClientApp.h Outdated Show resolved Hide resolved
client/ClientApp.cpp Outdated Show resolved Hide resolved
network/Message.h Outdated Show resolved Hide resolved
network/Message.h Outdated Show resolved Hide resolved
server/SaveLoad.cpp Outdated Show resolved Hide resolved
server/ServerApp.cpp Outdated Show resolved Hide resolved
server/ServerApp.cpp Outdated Show resolved Hide resolved
server/ServerApp.cpp Outdated Show resolved Hide resolved
server/ServerFSM.cpp Outdated Show resolved Hide resolved
server/ServerFSM.cpp Outdated Show resolved Hide resolved
server/ServerFSM.cpp Outdated Show resolved Hide resolved
@geoffthemedio
Copy link
Member

Basic idea of including save game data in turn orders messages is reasonable. Dunno about removing the message type entirely, though...

@geoffthemedio geoffthemedio added this to the Next Release milestone Jan 27, 2019
@o01eg o01eg force-pushed the repeal-save-game-data-request branch from 73bf0a1 to d227747 Compare January 27, 2019 11:22
@o01eg
Copy link
Contributor Author

o01eg commented Jan 27, 2019

Rebased. Fixed crash on loading. Fixed grooming remarks.

@o01eg o01eg changed the title [WIP] Repeal save game data request Repeal save game data request Jan 29, 2019
@o01eg
Copy link
Contributor Author

o01eg commented Jan 29, 2019

Tested it in single-player, multiplayer and multiplayer hostless mode. Didn't catch more crashes or error.

network/Message.cpp Outdated Show resolved Hide resolved
network/Message.cpp Outdated Show resolved Hide resolved
network/Message.cpp Outdated Show resolved Hide resolved
@geoffthemedio
Copy link
Member

If I start a single-player game, issue a few orders, save the game, resign, then load that save, none of my issued orders are retained. They should be.

UI/MapWnd.cpp Outdated Show resolved Hide resolved
@geoffthemedio
Copy link
Member

Is it correct and desirable that OrderSet::erase doesn't do "undo" order as OrderSet::RescindOrder b3e58c0 ?

I don't see the relevance of that commit... Not sure what you're asking. Erasing and undoing an order are different things, though...

@o01eg o01eg force-pushed the repeal-save-game-data-request branch from bf9b84b to 31eb793 Compare January 31, 2019 12:33
@o01eg
Copy link
Contributor Author

o01eg commented Jan 31, 2019

Rebased. Started to implement partial orders updates.

@o01eg
Copy link
Contributor Author

o01eg commented Jan 31, 2019

Added sending partial orders when player press "Save" button. Should fix mentioned issue.

@o01eg o01eg changed the title [WIP] Repeal save game data request Repeal save game data request Jan 31, 2019
@o01eg
Copy link
Contributor Author

o01eg commented Jan 31, 2019

Added sending partial orders on closing fleet window, switching planets, closing research and production windows.

@geoffthemedio
Copy link
Member

saving and reloading in single player works.

is this still work in progress?

@o01eg
Copy link
Contributor Author

o01eg commented Feb 2, 2019

No, I suppose it finished. I set sending changes when player "lost focus" on windows I remember. Even if I forgot something it still sends entire turn orders on end turn to prevent desyncs.

@geoffthemedio geoffthemedio merged commit 8a1903a into freeorion:master Feb 2, 2019
@geoffthemedio geoffthemedio added status:merged All relevant commits of this PR were merged into the master development branch. and removed status:work in progress The PR contains some implementation but isn't ready for merging onto the main development branch. labels Feb 2, 2019
@o01eg o01eg deleted the repeal-save-game-data-request branch February 3, 2019 06:31
@Vezzra Vezzra modified the milestones: Next Release, v0.4.9 Sep 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:tweak The PR contains insignificant code changes, like code style grooming or value tweaking. component:network status:merged All relevant commits of this PR were merged into the master development branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Server freezing on saving
3 participants