Screeps: Why Game.rooms[roomName] Is Undefined
Learn why Game.rooms[roomName] is undefined without current room vision, how to guard live Room reads, and why Memory.rooms does not prove visibility.
ARTICLE LIBRARY
Browse 81 published guides by system, difficulty, content type, or topic. Start with What Is Screeps? A Programming Strategy Game or follow the beginner sequence through How to Combine Your First Screeps Room Loop.
Learn why Game.rooms[roomName] is undefined without current room vision, how to guard live Room reads, and why Memory.rooms does not prove visibility.
Coordinate Creep.pull(), the puller's movement, and target.move(puller) in the same tick, handle adjacency and fatigue correctly, and verify the pair moved later.
Call PathFinder.search() with the goal range your action actually needs, interpret path, ops, cost, and incomplete correctly, and reject partial paths before handing movement to a Creep.
Verify movement over later ticks, then isolate fatigue, repeated movement intents, traffic, cached paths, room edges, and impossible stop ranges.
In Screeps PathFinder, a CostMatrix cost of 255 is unwalkable. See what 0, 1–254, and 255 mean, plus practical road, obstacle, and roomCallback rules.
Separate ERR_NO_PATH from missing cached paths and incomplete PathFinder searches, then inspect goal range, CostMatrix rules, callbacks, limits, and room routes.
Find the action that returned ERR_NOT_IN_RANGE, use its documented range, submit movement separately, and retry the action on a later tick.
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.
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.
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.
Choose between getRangeTo(), inRangeTo(), isNearTo(), isEqualTo(), findClosestByRange(), findClosestByPath(), and findInRange() without confusing linear range with route reachability.
English articles are published only after source review, official API checks where applicable, JavaScript syntax review where code is present, duplicate-intent and link checks, and editorial review. Publication does not imply Console or multi-tick live-room verification; those evidence states remain separate in each guide. Review the verification method.