Creep- Energy
- 50 / 50
- Position
- 20, 20
StructureSpawn- Energy
- 250 / 300
- Free capacity
- 50
- Position
- 21, 20
TICK LAB · V1
Use constrained transfer(), spawnCreep(), and CPU / Bucket experiments to inspect API returns, intents, budget checks, and modeled Tick state transitions.
The lab currently contains three constrained experiments: Creep.transfer(), StructureSpawn.spawnCreep(), and Game.cpu CPU / Bucket. Each exposes only a small set of verifiable variables and keeps unmodeled boundaries explicit; results explain reviewed API / Engine behavior or constrained budget calculations and are not Live shard evidence.
Experiment 01 / Transfer Energy
Transfer ENERGY carried by Creep1 into adjacent Spawn1.
CreepStructureSpawnconst result = creep.transfer(
Game.spawns.Spawn1,
RESOURCE_ENERGY
);No parameter guessing required. Pick a typical scenario to run it immediately and inspect the return code, intent, and next state together.
Adjust the controls, then run this Tick.
Adjust the controls, then run this Tick.
Experiment 02 / Spawn Creep
Use one constrained StructureSpawn.spawnCreep() call to see how name, Busy, and Energy checks determine the return code.
Spawn1 is fixed as owned and RCL-usable, the name is Worker1, options is an empty object, the body is limited to three valid presets, and default Room energyAvailable is used. V1 does not model energyStructures distribution, directions, dryRun, exit blocking, or competing Spawns.
StructureSpawnSpawn request[WORK, CARRY, MOVE]const result = Game.spawns.Spawn1.spawnCreep(
[WORK, CARRY, MOVE],
"Worker1"
);These scenarios also expose the checked priority: name conflict comes before Busy, and Busy comes before Energy.
Pick a scenario or adjust the controls, then run this Tick.
Pick a scenario or adjust the controls, then run this Tick.
Experiment 03 / CPU Budget
Use one constrained Game.cpu snapshot to see how limit, tickLimit, bucket, and getUsed() determine whether an optional task still has safe budget.
This experiment fixes Game.cpu.limit at 100 CPU and varies only bucket, CPU already used, and one optional-task cost estimate. tickLimit is modeled from the documented bucket behavior and capped at 500; bucket is capped at 10,000. RUN / SKIP is a local teaching guard decision, not a Screeps API return code or intent. Real task CPU cost must still be measured on a live shard.
CPU snapshotlocal estimateconst plannedTaskCost = 20; // local estimate
const used = Game.cpu.getUsed();
const headroom = Game.cpu.tickLimit - used;
if (headroom >= plannedTaskCost) {
runOptionalTask();
}These scenarios separate bucket refill, steady use, reserve spending, the tickLimit ceiling, and a task that should be skipped.
Pick a scenario or adjust the controls, then run this Tick.
Pick a scenario or adjust the controls, then run this Tick.