HeroWindow Explained

Hi

Can someone please explain the HeroWindow to me, I’m trying to make sense of this according to my position on the map, getting a bit confused exactly on the point.

heroWindow: [
[
254, 254, 254,
255, 255, 255,
255, 255, 255
],
[
254, 254, 254,
255, 255, 255,
255, 255, 255
],
[
254, 254, 254,
255, 255, 255,
255, 255, 255
],
[
254, 254, 254,
255, 255, 255,
255, 255, 255
],
[
254, 254, 254, 0,
0, 0, 255, 255,
255
],
[
254, 254, 254, 0,
0, 0, 255, 255,
255
],
[
254, 254, 254, 0,
0, 0, 255, 255,
255
],
[
254, 254, 254,
255, 255, 255,
255, 255, 255
],
[
254, 254, 254,
255, 255, 255,
255, 255, 255
]
],

Hey @styphoiz , that is the “glimpse” that your bot has on the entire game world. Each bot can only see a certain distance around itself. So your bot is right at the centre of that 2D array (it’s actually a jagged array but it boils down to the same thing).

Obviously the position of this hero window within the greater game world is dependent on your bot’s position and will constantly change as your bot moves.

The values that you see in the array can be interepreted by looking at this enum.

public enum CellType : byte
{
    Bot0Territory = 0,
    Bot1Territory = 1,
    Bot2Territory = 2,
    Bot3Territory = 3,
    Bot0Trail     = 4,
    Bot1Trail     = 5,
    Bot2Trail     = 6,
    Bot3Trail     = 7,
    OutOfBounds   = 254,
    Unclaimed     = 255,
}