Skip to content

Fast match viewer with rewinding support for Russian AI Cup championship series

License

Notifications You must be signed in to change notification settings

mortido/rewind-viewer

 
 

Repository files navigation

Rewind viewer [mortido remix]

MIT License C   standard OpenGL GitHub Releases

Remix of great tool for visualization via TCP. Original Rewind Viewer writen by Vladimir Kiselev (aka kswaldemar) is located here.

Overview

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

Binaries

There is no binaries for now. You should build rewind-viewer yourself.

Build

Clone repository with submodules:

git clone --recursive https://github.com/mortido/rewind-viewer.git
cd rewind-viewer

Linux:

Linux Build status

# 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:

Macos Build status

mkdir build
cmake -S . -B build -D CMAKE_BUILD_TYPE=Release
cmake --build build --target rewind-viewer -j

Windows:

Windows Build status

mkdir build
cmake -S . -B build
cmake --build build --target rewind-viewer -j --config Release

Note: Compiler with c 17 support needed.

Usage

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.

Create client four your language

  • 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

License

Project sources distributed under MIT license, third parties distributed under their own licences

Credits

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:

About

Fast match viewer with rewinding support for Russian AI Cup championship series

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 70.8%
  • Java 9.6%
  • Rust 8.2%
  • C# 4.8%
  • TypeScript 4.0%
  • C 0.8%
  • Other 1.8%