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:
@@ -27,6 +27,7 @@ SET(HDRS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ArenaInspectRequestedEvent.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/BeamFiredEvent.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/DebugDrawToggledEvent.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CommandRequestedEvent.h
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
||||
|
||||
23
src/lib/eventsystem/event/CommandRequestedEvent.h
Normal file
23
src/lib/eventsystem/event/CommandRequestedEvent.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "Event.h"
|
||||
|
||||
struct Command;
|
||||
|
||||
// UI fan-in for the command path: widgets emit this with a built command, and a
|
||||
// single subscriber (GameWorldView) enqueues it onto the CommandManager. This
|
||||
// keeps widgets decoupled (consistent with the rest of the UI), while the
|
||||
// sim-mutating command itself is routed through the dedicated CommandManager
|
||||
// queue rather than the EventManager bus (see docs/replay_design.md).
|
||||
class CommandRequestedEvent : public Event
|
||||
{
|
||||
public:
|
||||
explicit CommandRequestedEvent(std::shared_ptr<const Command> command)
|
||||
: command(std::move(command))
|
||||
{
|
||||
}
|
||||
|
||||
const std::shared_ptr<const Command> command;
|
||||
};
|
||||
Reference in New Issue
Block a user