- Updated Sunday, January 4th 2015 @ 14:12:12
Example of current output:
update_map 1 player1 6 2 player1 10 9 player1 2 19 player1 2 3 player2 1 6 neutral 2 11 player2 2 10 player2 3 7 neutral 10 8 neutral 2 17 neutral 2 18 neutral 2 22 player2 2 21 player2 2 opponent_moves player2 attack/transfer 12 21 3 player2 attack/transfer 12 10 1
This is not the logical order actually, sorry if it would screw with someone's current implementation but my bet is that it would make it easier for everyone.
If switched, you'd be able to use what the opponent did on the current_map (at the moment you process opponent_moves) which resulted in the updated_map; it's matter of causality that makes this clearly "better" ;)
- Updated Sunday, January 4th 2015 @ 14:19:17
My workaround is to not use "update_map" when given the output, but to just call "update_map" after "opponent_moves" myself (temporarily storing the update_map info).
- Created Tuesday, January 6th 2015 @ 13:33:25
update_map gives the current state on the map while opponent_moves only gives the moves that the opponent have made, but not the result from it. That is something you need to calculate yourself.
I would recommend that when you get the update_map, you'll save the difference and then use that difference to find out what attack succeeded.
- Created Tuesday, January 6th 2015 @ 20:27:42
Map state should be updated often. You calculate the attack mechanic yourself as a guess and then submit your try to the engine which should return a result for you to verify your guess and then update the board accordingly. You shouldn't update the board based on your guess...
What if I want to attack a region, but the opponent added 10 more armies to it... I don't know about those 10 more armies until the end of the move. The extra armies mean that I have a much higher chance of losing because my calculation is now 10 units off.
Also lots of bugs with Fog of War regarding knowing the ownership of a region or its neighbors after taking or losing a region. Besides, more real-time data means more interesting tactics and mechanics.
DeveloperCreated Tuesday, January 6th 2015 @ 21:08:43
@dualinity You are probably right that it would be a bit easier, but I don't think I'm going to change that now because of the impact it would have on a lot of bots. And it's not THAT beneficial either.
@NuclearMoose That's just how Warlight works, you only know what the maps looks like at the start of each round. What moves your opponent does during the round is always unknown to you. Also, there are no bugs with the fog of war. You only get updates of the map that you are actually able to see. If your opponent takes a region and therefore it is now in the fog of war, you will not get that region in the update_map anymore.