Playground like testing tool

Because of this post from @Demorf I am currently recreating some of the features from the playground.

The parts that I have already done are the visualizing part of gamestates (using the Matchviewer I created) and the part of letting the game engine calculateing the turn results using the same websocket the original playground uses.
The missing parts are the user interaction, the data handling and new additional visualizations.

Some of the Ideas I have in mind for this tool are:

  • being able to setup a starting situation (including information spawns of the opponent)
  • then being able to test multiple attacks/defences against the same situation without any additional setup time for the opponent
  • hiding the 4 second waiting time (that the playground currently has) while the user can setup the attack he wants to test
  • compare multiple attack/defence results in a table
  • instead of always having to create a situation from scratch, I want to integrate an option to the match viewer, that clones the current turn actions to this new testing tool.

I am currently not planning on making it possible to play multiple turns after each other since this is a feature that works perfectly fine with the playground.

To clarify things a bit, there will probably be two modes:

  • setup mode:
    ** you can change everything here (like sandbox and even more)
    ** e.g. remove anything instantly, place stuff down, change resources, change damage of towers, change lives of players, change which actions the opponent will take later when being in testing mode
  • testing mode:
    ** for each test you start with the predefined setup
    ** only thing to do would be setting up attacks/defences
    ** being able to somehow review older tests that have been done (not sure how? maybe like in normal replay, but instead of having turn after turn you would have test after test of the same turn)
    ** table that compares test result stats like bits spent, cores spend, scores scored, damage recieved, …

With this you could either do Minigames as @Demorf suggested or if your algo did some bad things you can try out what would have been better by hand.

Since I haven’t started yet with creating the new user interface for these features I am insterested if you have some other Ideas, concerns or feedback on my ideas.


Sounds great.
I would suggest configuring “setup” and “play” modes to using standard replay-state-string, and spawn-string.
Then at some point, a more friendly interface can be build, for creating and reusing this strings.

1 Like

There are some updates on this testing tool:

  • I decided for now that the simulator will be integrated into the match viewer directly. It’s not ready to share yet but it’s getting closer. The idea is that it will be possible to simulate multiple variations for one turn and all these additional frames will be inserted into the main replay file. With some additional visuals you will be able to distinguish between the original replay and the simulations.

  • The setup mode I talked about above is not the main thing I’m focusing on right now. Especially since even without it, you could basically do everything I described above by modifying a replay file with a text editor.

  • it’s now possible to upload replay files to the match viewer by using drag and drop

Update: Added Simulations

The testing mode I mentioned earlies works now. It is integrated into the MatchViewer in a way that doesn’t disturb any existing features, but allows for quick testing of variations of single turns.

  1. To do a Simulation with the updated MatchViewer go to the first frame of the turn you want to simulate on.
  2. One of the new features is that on every first frame of a turn there is this blue overlay of the spawn events from the next frame.
  3. Everything that’s blue can be edited and then you can click on Simulate. (currently selected unittype gets removed first if multiple on same location)


  • Placing Firewalls and Pings should be self explanatory (select the type and click on the board)
  • Removing things can be done by holding SHIFT and clicking on the spot on the board.
  • (You cannot edit anything useful during a turn, I should propably hide/disable the controls between turns)

Technical details:

  • the first simulation on a turn takes longer (about 5 seconds)
  • following simulations on the same turn should be much faster
  • I didn’t implement any resource check, so it’s possible to overspend when editing
    • in this case the Simulator will only place units until the resources are used up (same behaviour as when programming an algo)
  • generally this tool is supposed to work with any normal replay file from terminal
  • every new simulation gets added before all other frames of the same turn in the main framelist
  • there are a couple known bugs that I will fix soon, that’s why I didn’t release this before the season ended.


For Mini-games you could upload a file containing only one full turn.
@Demorf If you want you can try this out. It most likely also needs the config before the single turn to work properly. The other tool I was planning on doing for setting up such things is not started yet. (maybe it won’t be neede at all)
However I figured out that you can generate such a single turn file by:

  • using the button “clone round in new tab”
  • spawn some units if wanted and submit
  • download the replay afterwards
  • upload the replay file to a blanc MatchViewer (without the id in the path set) by drag and drop
  • example replay file: 8-1-2020-16-28-21.replay (189.9 KB)


Feel free to give me feedback in form of bug reports or feature requests/ideas.


I did a small update to make it work with both configs of season 6 & 7.
Let me know, if you still see issues regarding the changes from season 7.

I did just noticed, when doing simulations in a match from season 6, it will still use the S7 config. I don’t know if it’s still possible to simulate with the season 6 config, since the playground cannot do it either. Anyway, I don’t think it’s that important.

1 Like