TOPIC · 3 GUIDES

CPU Screeps guides

Focused English articles connected to cpu, organized with the same filters used by the main article library.

3 matching guides

Operations and DebuggingIntermediateGuide

How to Measure and Control CPU Usage in Screeps

Measure CPU with Game.cpu.getUsed() deltas, understand limit, tickLimit, and bucket, avoid Simulation-only conclusions, collect bounded samples, and gate optional work without hiding essential room logic.

17 min read
Memory and Code StructureIntermediateGuide

How to Build a Safe Global Cache in Screeps

Use the global object as a disposable runtime cache, rebuild after global resets, version and expire entries, cache IDs and derived data instead of live game objects, and return cloned values to prevent accidental mutation.

18 min read
Memory and Code StructureIntermediateGuide

How to Use RawMemory Segments Safely in Screeps

Validate segment IDs, activate one consolidated set for the next tick, distinguish unavailable from empty data, parse versioned string payloads safely, merge updates, and avoid multiple setActiveSegments calls overwriting each other.

20 min read