Web Visualizer

Hi @Izak just want to know will the visualize button be implemented at some stage?

1 Like

same - that would be tremendously useful.

It’s nice to be able to see exactly how your bot failed, in glorious TechnoColor ™.

I do currently use this very basic mutant of last year’s reply visualizer if you want to use it

improvements are more than welcome

1 Like

I assume you feed it the logs produced by the engine?

Built for a chome-based browser?

Yes just add the match logs from the choose file button

I havent tested on any other browsers just chrome and edge.

1 Like

Ok stupid question, do I need to run this from a web server, or can I just open directly in browser.

So far, just running directly in browser does not work (Chromium - upstream from chrome).

Might be permission issues preventing the file from actually being loaded :person_shrugging:

Just run it directly no server required

Hmm, some of that code looks a bit familiar… :stuck_out_tongue:

What do you mean with “does not work”? doesn’t open, doesn’t render, doesn’t play?

you should be able to just open the html file in a browser, then click the “choose file” button, select your gamelogxxxx.json file. The moment you open the file, it should draw the 4 maps. Set your replay speed to something a bit more reasonable than 50 ticks per second (like 10) then press play. You’ll see the players start moving around on map 1 in the bottom left corner.

Of course its a mutant of yours and mine amd some parts of willies from last year

@Seuntjie - yup, none of that happens.

Select file - nothing happens.
no console log error, no visuals rendered, nada.

If I try to play a round, this error is logged:

vz.html:155 Uncaught TypeError: Cannot read properties of undefined (reading '0')
    at drawRound (vz.html:155:50)
    at viewFirstRound (vz.html:112:3)
    at HTMLInputElement.onclick (vz.html:73:117)
drawRound @ vz.html:155
viewFirstRound @ vz.html:112
onclick @ vz.html:73

Which is kinda what I would expect if the log file loading failed.

But don’t worry about it, this was a side quest for me - my dumb bot is still plenty dumb, and time is just about run out.

Did you download the matchlog from the web portal?

If you use a file from the engine and the engine was terminated early you need to close the json array in the replay file before loading it

Aaaaaaah ok, that might be it.

I’ve been grabbing it from bind mounted folder from the engine container.
It does not seem to terminate by itself, so I have been CTRL+C’ng it.

That might be it.

Yes, that might be the issue, i found plain notepad to be the fastes in just appending the ] at the end, no syntax highlighting to slow down large files

1 Like

Hi @Kortgat,

Unfortunately I don’t think that will ever be implemented. Our usual strategy is to develop the game first before the first tournament and only then do we start working on the visualizer. I think that button was put there to motivate the team to implement it in the future but it doesn’t really fit into the flow of the Entelect Challenge.

There was a post somewhere about someone who made it playable in Unity, perhaps they also made a visualizer.

Furthermore, the ReferenceBot does have a very rudementary visualizer built-in that you could use. Someone at Build-a-Bot discovered that if you run your bot and the ReferenceBot with the same BotID as your bot, the visualizer will display your bot.

Hopefully that helps you out

While playing i already have a visualizer, it was more to view the replays of the games, but for now our makeshift web version is working fine,

Was just curious about that button :stuck_out_tongue:

1 Like