Headless replay player#1950
Open
MichalLabuda wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new headless
replay-playertool that loads and plays back.rplreplay files without a GUI, reporting live progress and detecting desyncs.New files
extras/replay-player/CMakeLists.txt- build target linking againsts25Mainand Boost; includes DLL gathering on Windows.extras/replay-player/HeadlessReplay.h/.cpp- supporting types and helpers:HeadlessGameState- minimalILocalGameStateimplementation (player 0 / host); forwards LuaSystemChatmessages to stdout.ReplayStatus- tracks game reference, total GF count, wall-clock start time, and last-reported GF for progress display.printConsole()- cross-platform console output: usesWriteConsoleAwith VT100 mode enabled on Windows,boost::nowide::coutelsewhere.printTable()- live-updating stats table using ANSI cursor-up escape codes, refreshed every second. Shows current GF / total GFs, game clock, wall clock, GF/sec, and per-player Country / Buildings / Military / Gold statistics. Defeated players are shown with strikethrough.printInitialInfo()- prints replay metadata (map name, version, type, size, seed, GF range) and a player roster before playback begins.extras/replay-player/main.cpp- main program:--replay/-ror as a positional argument.GameCommand.--verbose/-Vadditionally dumps the full async log.0if no desyncs were found,1otherwise (also1on any load/parse error).<RTTR_X>placeholders and leading~viaRTTRCONFIG.ExpandPath().--help/-h.--version/-vprints title, version, revision, compiler, and OS.