Communication
Opened this issue · 10 comments
UPDATED REGISTRY:
[0, 5] - robot census.
[15,29] - lumberjack tree locations.
[30,48] - soldiers.
[50] - last round soldiers got into a fight
[80, 90] - which archon to hire from.
[100,114] - gardeners.
As you probably know, communication this year is done via an array with a size of GameConstants.BROADCAST_MAX_CHANNELS containing simple integers. This array must then contain all info that needs to be transmitted, which could include:
- locations of trees that need chopping
- locations of enemy robots
- locations where troop support is needed
- locations to rain bullet hell on
- etc.
BASICALLY, need to agree on a way to communicate and avoid overlap. Please post the way your units manage communication if they do, or any ideas or suggestions.
FYI, MAX_BROADCAST_CHANNELS is 10000
So we could just keep say, 15 tree locs that need chopping and just overwrite the oldest one when we find a new tree. This could mean that channels [10,24] would have treelocs, and 9 would have the next treeloc to overwrite
I also think it would be good to have a section to tell soldiers to fire at a location so that their bullet arrives at a specified round #. We could add a random spread to make the barrage hard to dodge.
Soldiers hereby claim channels [30, 40] for combat locations. I'll probably make a mildly user friendly method to report them. I also claim [41,48] for shooting coordination.
Gardeners using [100, 114] for location and whether they're planting or not
Use two indexes for whether they're planting.
The first one is incremented by planting gardeners each turn and zeroed by archons (only those spawned before round 2).
The second number is set by the first archon to zero the first value each turn. 0 means no one is planting, n means n gardeners are planting.
Unless there are any objections, the first number is in 100 and the second is in 101.
I'm going to keep the system where I just use a single bit for whether a gardener is planting or not, and broadcast that bit with that gardener's location in the same array slot, so the archons know where to move. If you want to use the indexes you suggested, I'll put them at 100 and 101 and shift everything else accordingly.
So archons will check the first bit of each gardener index before building more gardeners
Archons are currently set up using Ajay's system. Also using [80,82] to determine best archon to hire from
[0, 5] used for robot census.
ARCHONS use 0
GARDENERS use 1
LUMBERJACKS use 2
SOLDIERS use 3
TANKS use 4
SCOUTS use 5
Changing archons to [80, 90] to work with archons from trees