Skip to content

Fast match viewer with rewinding support for Russian AI Cup championship

License

Notifications You must be signed in to change notification settings

LaFut/rewind-viewer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rewind viewer

MIT License C++ standard OpenGL RAIC

Fast Russain AI Cup championship match viewer with rewinding support written in OpenGL

Design

Viewer has several advantages in comparison of local-runner with drawing plugin:

  • All figures is 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

Obvious drawbacks:

  • Viewer running as standalone application, it know 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 need to store all drawing primitives for rewinding support

Note: Currently viewer reached 1.0 version and still in active development. You may find updated files and more primitives support (maybe potential fields, etc.) during championship.

Build

Build status

Clone repository with submodules:

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

Unix, MacOS:

mkdir build && cd build
cmake --CMAKE_BUILD_TYPE=Release ..
cmake --build .

Windows:

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.

⚠️ Note: Viewer should be launched from same folder, where resources is located. So you need to manualy copy resources to build folder, or copy executable to project root directory.

Strategy integration

You need special client to be able send messages in 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.

Then run viewer before strategy and it should start draw frames

License

Project sources distibuted under MIT license, thirdparties 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 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

Resources:

About

Fast match viewer with rewinding support for Russian AI Cup championship

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 81.0%
  • C 4.7%
  • CMake 3.5%
  • Java 3.3%
  • Swift 3.3%
  • GLSL 2.0%
  • Other 2.2%