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

Additional game/player information to store? #4284

Open
Pentarctagon opened this issue Aug 27, 2019 · 4 comments

Comments

@Pentarctagon
Copy link
Member

commented Aug 27, 2019

Now that Wesnoth 1.14+ is storing some information about games played and the players, as documented in table_definitions.sql, there's also the question of what other information would be useful to store.

This issue then is for discussing that, and for anything agreed upon a task item can be added to this issue.

@gfgtdf

This comment has been minimized.

Copy link
Contributor

commented Aug 27, 2019

for game_player_info we could also store the version used, during that game, similary for users maybe the last game version used.

for game_info, if #4282 goes in we might want to store the game of the the previous scenario of the campaign or have another way to group games from one campaign together.

And finally it'd be really nice to be able to identify reloaded games, meaning when a game was loaded somehow point to the 'old' gameid, but i currently don't know how to do that. In the end we might even support some 'load from server' function where saves can be stored at the server, the cient has a 'resume server game' button that'd allow to load any game stored the the db associated with that user that is not marked as 'ended by victoy/defeat'.

The main problem with a reload form server function i see is that the server only stores replays and not actualy savegames, and having the users replay the whole previous scenario on reloading woudl probably be annyoing.

@soliton-

This comment has been minimized.

Copy link
Member

commented Aug 27, 2019

All good ideas.

The server has some code to identify save games/reloads:

const bool save = multiplayer["savegame"].to_bool();

wesnoth/src/server/game.cpp

Lines 357 to 362 in ff772b1

// Savegames have a snapshot that tells us which side starts.
if(const simple_wml::node* snapshot = level_.root().child("snapshot")) {
turn = lexical_cast_default<int>((*snapshot)["turn_at"], 1);
side = lexical_cast_default<int>((*snapshot)["playing_team"], 0);
LOG_GAME << "Reload from turn: " << turn << ". Current side is: " << side + 1 << ".\n";
}

Not sure there is really a way to figure out the old game id currently. The server would presumably have to send the clients the game id or similar so they can put it in save games and it's available on reload.

@Pentarctagon

This comment has been minimized.

Copy link
Member Author

commented Aug 29, 2019

Two other ideas that came up during the initial PR as well:

  • Also storing add-on version numbers.
  • Storing victory/defeat for sides.
@gfgtdf

This comment has been minimized.

Copy link
Contributor

commented Aug 29, 2019

Also storing add-on version numbers.

Sounds like an easy to implement and useful feature to me.

Storing victory/defeat for sides.

I also really support this one, although i am not sure that it's doable with the I formation that is currently send to the server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.