I’ve written a python-based console visualizer with no external dependencies. It looks basically exactly the same as the game-engine’s text-map output but it renders the movements one block at a time in real-time (meaning it moves faster/slower based on the speed) (just a lot easier to watch than replaying the text-maps). A demo of the output:
Source code can be found at this gist. I’ve only tested this on Linux but it uses ANSI terminal escape codes so it should be fairly portable. To use it you just need to run the script inside a match logs folder. Please excuse the horrible code - it’s better if you just look at the pretty animations
It displays two maps, one for each player representing their separate views. You can modify the playback speed and fps by changing the spr and fps variables, respectively (line 34). Let me know if there are issues and I’ll check if I can fix it. I know that it currently skips the first round but this is due to the output of the game-engine starting at round 2’s starting position, but for now I’m just leaving it as is.
I’ve added an option that allows delaying the output between rounds and that freezes the map for the round which makes it easier to see it as the bot sees it (as the bot isn’t seeing a rolling window). The option can be seen in action here:
To enable it set the round_delay variable (line 36) to a non-zero value
Glad you like it I’ve added the option to specify the directory as a command-line argument - if you specify no arguments it assumes the logs are in the current directory, otherwise it uses the first argument you pass it as the log directory. Updated code on the same gist
Hi All, I’ve done a rewrite of the visualizer and updated it for the second phase. It now shows much more info and player commands/states and positions are properly synced with the current round number. The round delay option also works better now, and lifting the “fog of war” (displaying blocks beyond what the car can see) has now been made a toggle-able option.