Remix of great tool for visualization via TCP. Original Rewind Viewer writen by Vladimir Kiselev (aka kswaldemar) is located here.
Key differences with original rewind viewer:
- Binary protocol - for faster communication and more primitives per frame;
- Slaves client connections - can draw but can't finish frame;
- Camera views;
- More primitives and API methods;
- YAML configuration;
- UI updates;
- Updated 3rd party libs;
- Even more OpenGL optimizations
- Mouse and keyboard events
- Bugfixes.
Original features:
- All figures are drawn using your video adapter, so no more problems with slow drawing
- Rewinding - ability to navigate between game ticks
- In Pause navigation - zoom and navigate in any game state
- Handy mouse navigation
Drawbacks:
- Viewer running as standalone application, it knows nothing about your strategy, so you need manually send all data and you can draw only data visible by your strategy
- In theory, high memory usage, because it needs to store all drawing primitives for rewinding support
There is no binaries for now. You should build rewind-viewer yourself.
Clone repository with submodules:
git clone --recursive https://github.com/mortido/rewind-viewer.git
cd rewind-viewer
Linux:
# Install dependencies
sudo apt-get update && sudo apt-get install -y libglu1-mesa-dev libxrandr-dev libxinerama-dev libxcursor-dev libwayland-dev libxkbcommon-dev libxi-dev libgtk-3-dev
mkdir build
cmake -S . -B build -D CMAKE_BUILD_TYPE=Release
cmake --build build --target rewind-viewer -j
MacOS:
mkdir build
cmake -S . -B build -D CMAKE_BUILD_TYPE=Release
cmake --build build --target rewind-viewer -j
Windows:
mkdir build
cmake -S . -B build
cmake --build build --target rewind-viewer -j --config Release
Note: Compiler with c++17 support needed.
Run Rewind Viewer before starting you code. It will reset itself on new connection, so no restarts required.
See clients for more information regardless specific language usage.
- Generate flatbuffers messages for your language. See Makefile for more info. You will need FlatBuffers compiler (flatc) to be installed.
# Example of message generation for c++
make cpp_client
- Use message protocol and existent clients as guidelines
Project sources distributed under MIT license, third parties distributed under their own licences
Project created with help of many great libraries:
- glad for loading OpenGL functions
- glm math library for OpenGL
- glfw for creating window and cross-platform context handling
- ImGui for UI widgets inside application
- clsocket for network interaction
- flatbuffers for binary messages
- stb_image for images processing
- loguru for logging support
- rapidyaml for yaml configuration file
- rapidjson for json messages
Resources:
- fontawesome icon font, embedded inside text in many UI elements
- Application icon by Laura Reen