Coder Social home page Coder Social logo

lafut / rewind-viewer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kswaldemar/rewind-viewer

0.0 2.0 0.0 1.7 MB

Fast match viewer with rewinding support for Russian AI Cup championship

License: MIT License

CMake 3.48% C++ 81.00% Java 3.33% Python 1.66% Swift 3.27% GLSL 2.03% Objective-C 0.55% C 4.68%

rewind-viewer's Introduction

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:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.