Memory and Code StructureIntermediateGuide
Resolve an exact Flag, validate its schema, bind saved object IDs to the Flag room and expected type, make fallback an explicit policy, and report configuration drift without mutating the Flag.
Memory and Code StructureIntermediateGuide
Save an ID with room and kind metadata, return explicit invalid, no-vision, missing, wrong-type, and ready states, and keep restoration separate from reselection and actions.
Movement and VisionIntermediateGuide
Separate room planning from exit-tile pathfinding, validate the first route step, use finite risk costs versus hard bans, and verify the border transition on later ticks.
Memory and Code StructureIntermediateGuide
Cache derived IDs and plain data in global, rebuild after resets, invalidate with explicit versions, and keep callers correct when the cache is missing or stale.
Memory and Code StructureIntermediateGuide
Keep one main loop, export small functions, pass current game objects into modules, validate role contracts once per runtime, isolate per-Creep failures, and keep durable state out of module scope.
Movement and VisionAdvancedGuide
Collect requests, choose one target per Observer, make one final observeRoom() call, store only that accepted target, read it next tick, and keep visibility attribution honest.
Memory and Code StructureIntermediateGuide
Request active Segment IDs once, read them on a later tick, distinguish unavailable from empty, validate versioned JSON, and write only after a successful read.
Memory and Code StructureIntermediateGuide
Enter acquire at zero Energy, enter work when full, preserve the previous phase at partial values, initialize explicitly, and keep state selection separate from actions and outcomes.
Construction and DefenseIntermediateGuide
Use a one-time Memory request, validate a visible room and 0–49 coordinates, allow Road placement on natural wall terrain, reject an existing Road or Construction Site, respect MAX_CONSTRUCTION_SITES, disable before createConstructionSite(), and verify later.
Movement and VisionIntermediateGuide
Calculate unboosted Creep movement from MOVE recovery, loaded body weight, road, plain, and swamp costs; account for empty CARRY parts; and separate a static body estimate from live multi-tick movement proof.
Room EconomyIntermediateGuide
Filter FIND_DROPPED_RESOURCES for Energy, rank valid piles by collectible amount and path length, handle decay and changing targets, and inspect pickup() and movement results.
Room EconomyIntermediateGuide
Find a Container that currently holds Energy, check the Creep's free capacity, call withdraw(), handle range and return codes, and keep the delivery task outside this focused guide.