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

matching saving and playback #36

Open
tjhance opened this issue Jul 22, 2012 · 2 comments
Open

matching saving and playback #36

tjhance opened this issue Jul 22, 2012 · 2 comments
Assignees
Labels
Milestone

Comments

@tjhance
Copy link
Collaborator

tjhance commented Jul 22, 2012

The server should log everything it does; all the packets it processes, all the values of "dt" that it uses, the srand seed. Then we can give the server an option to replay an old game rather than play a new one, so incoming connections will get to observe, but not play.

This could be really helpful for debugging and bug reproducing.

@tjhance
Copy link
Collaborator Author

tjhance commented Jul 22, 2012

By the way, making the playback will involve a bit reworking of the Game/Server.cpp relationship. At the moment, Game thinks of each play as having an associationed SocketConnection*, but for the playback, the Game will need to view each player in a more abstract way.

@tjhance
Copy link
Collaborator Author

tjhance commented Jul 23, 2012

Okay, I went ahead and did this. It's basically a huge hack right now. It just saves all the actions it does to logs/log, and then PlaybackServer (which you can make with `make playback') will read that file and you can connect with your favorite client to watch (but not do anything). It's not very robust, especially not to changes in the code, and it relies on the fact that the server makes no calls to rand() outside of Game.

I think it would be nice to someday have a fleshed out replay watching system. For now, I think this will be useful for debugging.

@ghost ghost assigned tjhance Aug 19, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant