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

Added an option to skip replays entirely when joining MP games #920

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
6 participants
@madmax28
Contributor

madmax28 commented Jan 30, 2017

This adds a new replay mode to the MP lobby options that allows skipping replays entirely when joining games. It works by locking video updates completely while the game catches up.

I kept the old version around that allows viewing a quick version of the replay. It still doesn't address the issues gfgtdf addressed in #919, which should still be dealt with in a future commit:

  • Breaks if [modify_turns] is present in scenario WML
  • Still shows the most recent turn using a regular, slow replay
@gfgtdf

This comment has been minimized.

Show comment
Hide comment
@gfgtdf

gfgtdf Jan 30, 2017

Contributor

I am not sure what 'lock_updates' does exactly. So i wonder

  1. if an (OOS) error is generated while the game is internaly replaying the game, will the error popup still pop up correctly?

  2. If the replaying takes really long, do i have an option to leave the game or does the applicaiont 'freeze' ?

  3. Will wml casued animations/ui things also be skipped? Im takling mostly about [delay] actionwml

Contributor

gfgtdf commented Jan 30, 2017

I am not sure what 'lock_updates' does exactly. So i wonder

  1. if an (OOS) error is generated while the game is internaly replaying the game, will the error popup still pop up correctly?

  2. If the replaying takes really long, do i have an option to leave the game or does the applicaiont 'freeze' ?

  3. Will wml casued animations/ui things also be skipped? Im takling mostly about [delay] actionwml

@CelticMinstrel

This comment has been minimized.

Show comment
Hide comment
@CelticMinstrel

CelticMinstrel Jan 31, 2017

Member

What about [message] dialogs or other scenario-specific popups? Will those appear? If they do appear, will they appear over a blank screen, or will the map of that point in time be drawn behind them?

Member

CelticMinstrel commented Jan 31, 2017

What about [message] dialogs or other scenario-specific popups? Will those appear? If they do appear, will they appear over a blank screen, or will the map of that point in time be drawn behind them?

@gfgtdf

This comment has been minimized.

Show comment
Hide comment
@gfgtdf

gfgtdf Jan 31, 2017

Contributor

I am not sure how it should behave for general messages, i mean some of thoese messages are error message like in a manual version check where it woudl make sense to show them while most of the messages are just dialog etc. that you don't want to see during qick replay, maybe we hodul add some always_show=no(default)/yes attribute ot message and show_dialog

Contributor

gfgtdf commented Jan 31, 2017

I am not sure how it should behave for general messages, i mean some of thoese messages are error message like in a manual version check where it woudl make sense to show them while most of the messages are just dialog etc. that you don't want to see during qick replay, maybe we hodul add some always_show=no(default)/yes attribute ot message and show_dialog

@Vultraz

This comment has been minimized.

Show comment
Hide comment
@Vultraz

Vultraz Aug 3, 2017

Member

We should definitely add something like this, but I think this is the wrong way to go. A no replay option should immediately bring the observer to the current turn, no replaying of gamestate, messages, or anything.

Member

Vultraz commented Aug 3, 2017

We should definitely add something like this, but I think this is the wrong way to go. A no replay option should immediately bring the observer to the current turn, no replaying of gamestate, messages, or anything.

@GregoryLundberg

This comment has been minimized.

Show comment
Hide comment
@GregoryLundberg

GregoryLundberg Aug 3, 2017

Contributor

I'm with @Vultraz on this. It's annoying to decide to check in on a match in progress and have it completed and the players gone before the replay finishes.

This change would make it much easier for people to jump around, which could lead to some abuse, but, in general, would probable make the MP side more social.

Contributor

GregoryLundberg commented Aug 3, 2017

I'm with @Vultraz on this. It's annoying to decide to check in on a match in progress and have it completed and the players gone before the replay finishes.

This change would make it much easier for people to jump around, which could lead to some abuse, but, in general, would probable make the MP side more social.

@gfgtdf

This comment has been minimized.

Show comment
Hide comment
@gfgtdf

gfgtdf Aug 3, 2017

Contributor

We should definitely add something like this, but I think this is the wrong way to go. A no replay option should immediately bring the observer to the current turn, no replaying of gamestate, messages, or anything.

Currently the server doesn't have the gamestate, in order to make it avialable to the server we haev to eigher make:

  1. Send the clients updates to th server.
  2. Make the server execute the gamestate.

(2) Is currently no possible becasue the server doesn't have all the addons data (units etc.). (1) Will notebley increase network traffic also since 'snapshots' contains usually much more data than the initial scenrions wml (think about units stats etc)

Contributor

gfgtdf commented Aug 3, 2017

We should definitely add something like this, but I think this is the wrong way to go. A no replay option should immediately bring the observer to the current turn, no replaying of gamestate, messages, or anything.

Currently the server doesn't have the gamestate, in order to make it avialable to the server we haev to eigher make:

  1. Send the clients updates to th server.
  2. Make the server execute the gamestate.

(2) Is currently no possible becasue the server doesn't have all the addons data (units etc.). (1) Will notebley increase network traffic also since 'snapshots' contains usually much more data than the initial scenrions wml (think about units stats etc)

@Vultraz

This comment has been minimized.

Show comment
Hide comment
@Vultraz

Vultraz Aug 3, 2017

Member

Sounds doable. Does the server need to constantly be sent gamestate updates or could it be done on request?

Member

Vultraz commented Aug 3, 2017

Sounds doable. Does the server need to constantly be sent gamestate updates or could it be done on request?

@CelticMinstrel

This comment has been minimized.

Show comment
Hide comment
@CelticMinstrel

CelticMinstrel Aug 3, 2017

Member

Not for 1.14 though. It would be a big undertaking, I think.

Member

CelticMinstrel commented Aug 3, 2017

Not for 1.14 though. It would be a big undertaking, I think.

@gfgtdf

This comment has been minimized.

Show comment
Hide comment
@gfgtdf

gfgtdf Aug 3, 2017

Contributor

The problem with the server sending requested is that the client doesnt always have gamestates that match the replay on the server, this is beacasue of undoable moves (the host might undo themresulting ion a gamestate missmtach in that case). What we coudl do though is make the host regulareley send the gamestate to the server (let's say every 50 moves) so that the joining cleint never need to replay that much.

Contributor

gfgtdf commented Aug 3, 2017

The problem with the server sending requested is that the client doesnt always have gamestates that match the replay on the server, this is beacasue of undoable moves (the host might undo themresulting ion a gamestate missmtach in that case). What we coudl do though is make the host regulareley send the gamestate to the server (let's say every 50 moves) so that the joining cleint never need to replay that much.

@madmax28

This comment has been minimized.

Show comment
Hide comment
@madmax28

madmax28 Aug 3, 2017

Contributor

Without knowing much about the Wesnoth internals, the very least that should be possible is to calculate the current game state without rendering after every move (perhaps through a separate set of routines, instead of the "hacky" solution i tried here).

A no replay option should immediately bring the observer to the current turn, no replaying of gamestate, messages, or anything.

While this would be ideal, note that doing the calculations can be neglected in terms of time/load. The PR as it is already brings you to the current turn instantly, so I think changes to the server and communication architecture can be avoided if that's preferable.

Also, it should possible for the client to seamlessly browse through passed turns. For example, to allow the user to check how the game looked a couple of turns back, or even replay the previous turns.

Contributor

madmax28 commented Aug 3, 2017

Without knowing much about the Wesnoth internals, the very least that should be possible is to calculate the current game state without rendering after every move (perhaps through a separate set of routines, instead of the "hacky" solution i tried here).

A no replay option should immediately bring the observer to the current turn, no replaying of gamestate, messages, or anything.

While this would be ideal, note that doing the calculations can be neglected in terms of time/load. The PR as it is already brings you to the current turn instantly, so I think changes to the server and communication architecture can be avoided if that's preferable.

Also, it should possible for the client to seamlessly browse through passed turns. For example, to allow the user to check how the game looked a couple of turns back, or even replay the previous turns.

@gfgtdf

This comment has been minimized.

Show comment
Hide comment
@gfgtdf

gfgtdf Aug 3, 2017

Contributor

What we coudl do though is make the host regulareley send the gamestate to the server (let's say every 50 moves) so that the joining cleint never need to replay that much.

Ther is alreadya featurerequest for exactly that: #1486

Contributor

gfgtdf commented Aug 3, 2017

What we coudl do though is make the host regulareley send the gamestate to the server (let's say every 50 moves) so that the joining cleint never need to replay that much.

Ther is alreadya featurerequest for exactly that: #1486

@GregoryLundberg GregoryLundberg added this to the 1.14.1 milestone Feb 14, 2018

@soliton-

This comment has been minimized.

Show comment
Hide comment
@soliton-

soliton- Mar 24, 2018

Member

Is this still useful?

Member

soliton- commented Mar 24, 2018

Is this still useful?

@madmax28 madmax28 closed this Aug 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment