JonathanSafer / screeps

Screeps AI
MIT License
25 stars 7 forks source link

add observer scan queues #117

Closed jordansafer closed 4 years ago

jordansafer commented 4 years ago

each observer has a scan queue. all rooms get added to the observer scan queue for the observer to scan. when we have extra cpu, we add a bunch of rooms to the observer scan queues (50-100 rooms added every 20 ticks => 5-7 rooms per observer).

On each tick an observer:

  1. scans the next room in its scan queue and stores it in global to check on the next tick
  2. checks global to see if a room was scanned in the previous tick. store info on this room into the cache.