screepers / simpleAllies

Allows for simple communication between allies using a public segment
MIT License
1 stars 4 forks source link

roomIntel request #3

Open CarsonBurke opened 1 year ago

CarsonBurke commented 1 year ago

Overview

Properties

V1kingGit commented 1 year ago

Big difference between sharing intel on enemy rooms, whereabouts of hostile creeps and neutral rooms without anything going on in them. I only consider it worth sharing the former two.

In that case limiting the rooms transmitted in any way seems unnecessary. You should be able to loop through the rooms provided and only update your intel if scoutTick is higher than your own. That's a very simple and cheap operation. Ideally you don't have to transmit all rooms, but you should be allowed to.

Intel on hostile creeps would also need standardization, so it may be easiest starting off with intel on enemy rooms. Here I think @Gadjung's suggestions work well as a starter, allowing further discussion:

rcl: number,
towerCount: number,
avgRamparts: number,
knownBoosts:
{
    [RESOURCE_LEMERGIUM_OXIDE]: number,
    etc...
}
CarsonBurke commented 1 year ago

I like it. I do have a concern with known boosts, however. The object could be potentially rather large, and we want to avoid sending too much data through the segment. This is because of limited space, but more importantly, parsing costs.

Gadjung commented 1 year ago

simpleAllies should provide method provideIntel(intel:Intel) method that handles the update of values with logic for scoutTick checks.

also if it is inside the Intel interface, it would make it easier on provider - segment logic - beneficiary sides

CarsonBurke commented 1 year ago

simpleAllies should provide method provideIntel(intel:Intel) method that handles the update of values with logic for scoutTick checks.

also if it is inside the Intel interface, it would make it easier on provider - segment logic - beneficiary sides

I think a default function to handle intel like this will clash too much with a bot's custom data