Fast match viewer with rewinding support for Russian AI Cup championship series
- Users starred: 47
- Users forked: 18
- Users watching: 47
- Updated at: 2020-02-17 00:36:41
Fast Russain AI Cup championship match viewer with rewinding support written in OpenGL
The viewer has several advantages in comparison of local-runner with drawing plugin:
- All figures are drawn using your video adapter, so no more problems with slow drawing
- Rewinding - ability to navigate between game tick
- In Pause navigation - zoom and navigate in any game state
- Handy mouse navigation
- Viewer running as standalone application, it knows nothing about local runner or your strategy, so you need manually send all data (like buildings, units etc.) 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
Source code with changelog for significant releases can be found in github releases page.
Prebuilt windows binaries for other version, such as bugfixes can be found here. It is required to have x86 C++ Redistributable for Visual Studio 2015 installed to run prebuild windows binaries.
Clone repository with submodules:
git clone --recursive https://github.com/kswaldemar/rewind-viewer.git
mkdir build && cd build cmake --CMAKE_BUILD_TYPE=Release .. cmake --build .
mkdir build && cd build cmake .. cmake --build . --config Release
Note: Compiler with c++14 support needed. That means Visual Studio 2015 or higher on Windows.
resources is located.
So you need to manually copy
resources to build folder, or copy executable to project root directory.
You need a special client to be able to send messages to the viewer. See example C++ client for information about JSON based message protocol and implement one for your language of choice. Also, see client examples for official local runner.
- Start the viewer.
- Start localrunner, preferably in render_to_screen=false mode.
- Start your strategy of choice.
- To be able to drew things in the viewer you will need to create a client, send data to the client in your strategy, and close the frame with client command.
- There is no need to close the viewer after the strategy is done, just start from step 2. Old drawn data will be cleaned after new connection.
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 crossplatform context handling
- ImGui for UI widgets inside application
- nlohmann json for json operating
- csimplesocket for network interaction
- stb_image for images processing
- loguru for logging support