I got some time to make sense of things this weekend

Hey, Sorry, I did not use the release binary, I did not see it. I compiled it myself but what happened was the application just showed a blank screen regardless of where I point the config (before and after compilation).

I did not make too much of it as I am generally not experienced in debugging the actual source and adapting it in this case. I’m not good with UI kind of stuff… I have not focused on that kind of work yet, Its a skill in its own really. Will wait for your new release and give it another go. This will help me build a monster AI. Will make things simpler most definitely.

I think the problem is the old replay format, will update the current viewer to be backwards compatible with the old directory structure.

Updated to be backwards compatible. Seems that ulrikdem fixed the issue for me as well. Big thumbs up him.

Try the latest release, I have put some messages in for clarity should something break. Launch it from command line. The way that HaXe handles try-catch is a bit different. Still getting used to the language.

Spoke to quickly, trying other directories and seems there is still another thing I am not catering for. Debugging quickly…

Seems it was working, I screwed up the config for the match directory. Config differs across the different machines that I am working on.

I managed to get a replay visualizer working, But that was not yours… It was a different one built in unity. more 3D… Wheres your release binary? I like your 2D Graphics. Though I will use the one I found for the moment…

be kind to link the 3d one, interested mostly.

Itr is in the public domain: https://github.com/dlweatherhead/entelect-challenge-2018-visualiser

Im still not getting yours to work just yet. Dies seem directory related.

I just tried on another machine with the zip. Works for me on the other machine, both windows. Does your configured match directory use back- or forward-slashes for the path?

It will break if you use back-slashes. Though I am assuming you doing forward-slashes and that I am struggling to think what it might be. You have anything printed to the console?

At first I used this:
C:\Users\MyUserName\Desktop\EntelectChallenge2018\BotVisualizer\tower-defence-matches

But after inspecting the config.json I started using this:

C:/Users/MyUserName/Desktop/EntelectChallenge2018/BotVisualizer/tower-defence-matches

The console closes quite fast and the bat does not force it to stay open, I managed to screenshot the issue:

Main.hx:141: ERR: Invalid field Access: substring.

I have a number of computers so will try and run it on my trident. Will give more feedback regarding that results later on.

Yes, the first one will definitely break the visualiser. Going to check the source and see what it is referring to. If you start the exe from console you keep the log.

Do me a favor and post what is in your final round folder?
Seems that it is struggling to retrieve the folder names for the bots there.
I can then simulate the error on my side by renaming those folders.

e.g.

var rounds = FileSystem.readDirectory(config.matchDirectory + “/” + match);
var players = FileSystem.readDirectory(config.matchDirectory + “/” + match + "/Round " + pad(rounds.length - 1));
if (players[0] != “endGameState.txt”)
{
if (players[0] != “Player 1”)
{
aName = players[0].substring(4);
bName = players[1].substring(4);
}
else {
aName = players[0];
bName = players[1];
}
playerA = players[0];
}

Brilliant, Thank you. One of my matches I terminated ahead of completion. As a result only one of the Player’s info were in the folder. This messed with the replay-viewer, I got this to work. Now I can start with my AI…

This just makes debugging so much easier… Thanks

I will update to handle this scenario. Glad to hear you came right.

1 Like

Hi. Is it possible to compile the replay-viewer on Mac?

Yes, though you will have to do that yourself. I do not have a Mac to compile the IOS version on sadly. Unless you want to buy me one… hehe :wink:

The source will compile with the HaXeToolkit and that will allow you to setup the iOS run-time as well.

Thanks :slight_smile: . How do you compile with haxe? I’ve been trying, but not really getting anywhere.

Thanks very much for this @avanderw, this has been most helpful.
For the benefit of other HAXE n00bs like me, these are the steps I went through to get it running on my windows machine:

  • you need the microsoft visual studio c++ compiler installed on your machine
  • install HAXE (google it)
  • install openfl as described here: http://www.openfl.org/download/ (option 2)
  • install “minimalcomps” HAXE library ($haxelib install minimalcomps)
  • go openfl build windows in the “replay-viewer” directory, it should build
  • copy config.json to the bin folder where the exe is
  • edit config.json to point to your match folder
  • run it. on the left are all your matches, and then you can select the turns in the next column, mouse scroll through them to view the match
1 Like

Try that site… should hopefully get you up and running.
Three videos, have not personally gone through them. But it sounds like it is in the right direction.

I am using HaXe(Lime 6.3.1) & OpenFL(8.0.2) as they work nicer with the Android NDK v13
Though that should not make a difference for the iOS build.

Thanks a lot. :smile: