Replay: deterministic record & playback (#4)
Add deterministic record/playback for a run. Recording captures `(seed, config hash, ordered tick-tagged commands)` and re-simulates on playback — no state snapshots. `DotaFactory.exe --replay <file>` re-plays a recorded run view-only with manual speed/pause. Reviewed-on: #4 Co-authored-by: Malte Langkabel <malte.langkabel@gmail.com> Co-committed-by: Malte Langkabel <malte.langkabel@gmail.com>
This commit was merged in pull request #4.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -17,6 +18,7 @@
|
||||
#include "Tick.h"
|
||||
#include "VisualsConfig.h"
|
||||
|
||||
struct ParsedReplay;
|
||||
class Simulation;
|
||||
class GameWorldView;
|
||||
class HeaderBar;
|
||||
@@ -37,7 +39,8 @@ class MainWindow : public QWidget,
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MainWindow(Simulation* sim, const std::string& configDir, QWidget* parent = nullptr);
|
||||
MainWindow(Simulation* sim, const std::string& configDir,
|
||||
std::shared_ptr<ParsedReplay> replay = nullptr, QWidget* parent = nullptr);
|
||||
~MainWindow() override;
|
||||
|
||||
protected:
|
||||
@@ -65,4 +68,5 @@ private:
|
||||
QWidget* m_sidePanel;
|
||||
|
||||
std::vector<ShipLayoutBlueprint> m_layoutBlueprints;
|
||||
std::shared_ptr<ParsedReplay> m_replay; // non-null => view-only playback
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user