This project currently implements a visualization for LaserTag with an aim to provide a more generic solution for grid-based simulations in the future.
There are three parts to MGV.
- It communicates with a MARS-Simulation through a WebSocket-Connection,
- loads a map through a CSV file
- and renders them in a nice fashion, by mapping both simulation-data and map to sprites.
To use this project in tandem with a MARS-Simulation, go to GitHub Releases and download a zip file for your respective OS. After unzipping you should find an executable inside and run it.
Note
On macOS there are some additional permissions required to. You can run the following command in a terminal:
TODOIf you have nix installed:
nix run github:MARS-Group-HAW/mars-grid-visualizerYou'll need git and the dotnet toolchain.
Clone the git repo:
git clone https://github.com/MARS-Group-HAW/mars-grid-visualizeror if you have ssh setup
git clone git@github.com:MARS-Group-HAW/mars-grid-visualizer.gitGo into the new director:
cd mars-grid-visualizerand run MGV with:
dotnet build && godot-mono .Currently there are some known limitations that could be tackled in the future.
- following the course of the simulation isn't easy as there are no animations and many actions aren't visible
- right now the only working simulation is LaserTag and even there, not all map sizes are supported
srccontains all other source files.Program.csis the main entry point of the program.Agent.csmodels LaserTag agentsMap.cshandles reading and modelling the maps used by LaserTag that are specified.
Note
When changing settings in the Godot editor they are written to text files like main.tscn for example. Please don't forget to commit those changes as well.
- private variables and methods are lower case and use no underscore at the beginning to set Godot built-ins more apart
- public properties/methods are upper case
- files use PascalCase
To run and develop the project locally you'll need to install the Godot version that supports C#. It can be downloaded through godotengine.org/download/ or your respective package manager.
After installing Godot open the project in it and click the run button in the upper right corner.
For editing the C# scripts an external editor like rider is recommended since the code editor built into Godot, does not provide code completion for C#.