Screeps Arena spawnCreep(): Find Your Spawn
Find your Screeps Arena Spawn with getObjectsByPrototype(), call spawnCreep(body), read object or error results, and avoid mixing Arena with MMO syntax.
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.
Find your Screeps Arena Spawn with getObjectsByPrototype(), call spawnCreep(body), read object or error results, and avoid mixing Arena with MMO syntax.
Clean stale Memory.creeps entries by comparing them with Game.creeps. Delete only confirmed dead names and keep custom task indexes in sync.
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.
Use fill: 'transparent' for unfilled RoomVisual circles and rectangles, then add debug labels and target paths without confusing visuals with game results.
Use Creep.attack() with the correct range-1 boundary, active ATTACK parts, documented return codes, Rampart behavior, and later-tick verification.
Call Game.notify(), use groupInterval and simple Memory incident state to avoid repeated alerts, preserve the checked engine result, and keep scheduling separate from external email delivery.
Read the previous tick's Room events, distinguish parsed and raw mode, filter event-specific data safely, match actor and target IDs when attribution matters, and keep optional history bounded.
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.
Use Creep.harvest() to find an active Source, move into range, keep harvesting until your Creep is ready to deliver, and read Source-specific return codes without treating ERR_FULL as a harvest result.
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.
Diagnose room.energyAvailable below energyCapacityAvailable by reconciling active Spawn and Extension Stores, holding one stable fill target, preserving transfer() results, and matching the processed Energy transfer on the next tick.
Confirm a blocked Screeps Spawn exit from current spawning state and all eight adjacent tiles, then fix direction policy without confusing accepted intents with observed birth.
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.