-
To save your CPU, use less creeps of a larger size.
-
A good way to save CPU is caching often-used paths.
-
The more body parts of one type a creep has, the greater its productivity.
-
Use storage to not lose surplus of mined resources.
-
A resource abandoned on the ground eventually vanishes.
-
Use towers to set up automatic defense of your room.
-
The more small objects in the Memory, the more CPU spent on its parsing.
-
Inscreasing the
reusePath
option in theCreep.moveTo
method helps saving CPU. -
The
RANGED_ATTACK
body part is 3 times weaker thanATTACK
and 2 times costlier at that. -
You can have as many rooms under your control as your Global Control Level.
-
You can address from your script only those rooms that contain your creeps or structures.
-
Observers allow to get the
Room
object for the rooms that have no objects of yours. -
Build roads to save on
MOVE
body parts of your creeps. -
Roads wear out as they are used, so don’t forget to repair them.
-
Walls, roads, and containers don’t belong to any player, so they should be searched with the help of
FIND_STRUCTURES
, notFIND_MY_STRUCTURES
. -
Use try/catch blocks in right places to avoid a complete halt of your script due to errors.
-
Use branches to test and debug your temporary code and also do backups.
-
Set up a grunt task to write scripts on your local machine and commit them to Screeps.
-
More spawns in a room allows building more creeps at a time.
-
The more spawn extensions in a room, the more energy you can spend on building one creep.
-
Spawn extensions capacity increases on room levels 7 and 8.
-
Spawn extensions do not have to be placed near spawns, their range is the whole room.
-
Towers can aim at any object in a room even through walls and obstacles.
-
A tower’s effectiveness depends on the distance to the target.
-
Power banks appear only in neutral rooms that divide living sectors on the map.
-
Ramparts can be built not just on empty squares but on existing structures too.
-
While not destroyed, a rampart protects a creep or building on its square from any type of attack.
-
Creeps cannot move faster than 1 square per tick.
-
Use links to save on creep building and CPU.
-
Links can pass energy to other links at any point inside the same room.
-
You can build and repair roads and containers in any rooms, even neutral ones.
-
Leaderboards reset to zero each month, while your game process continues.
-
Modular architecture of a script will allow easy testing of individual functions in the simulator.
-
You can create any objects in the simulator to test your script.
-
The
console.log
function of the simulator displays a live expandable object in the browser console. -
Walking over swamps is 5 times slower compared to plain land.
-
Ramparts and walls initially have 1 hit point. Repair them after construction.
-
You cannot have more than 3 rooms in the Novice Area.
-
If you want to play from scratch, you can always Respawn in a new room.
-
Every creep dies after 1500 ticks, however you can prolong its life using the
Spawn.renewCreep
method. -
To control a room continuously, you need to upgrade your controller from time to time.
-
A spawn automatically replenishes itself with power until the energy in the room reaches 300 units.
-
Test various game scenarios in the simulator in order to be prepared for surprises.
-
Always try to control as many rooms as your GCL allows. It will allow your colony to develop at the maximum speed.
-
You can use more CPU than your CPU limit allows in short bursts.
-
Unless you use up your CPU limit each tick, it is stored for future use.
-
There is a keyword
debugger
in the simulator that stops your script in the browser. -
Your CPU Limit depends on your Global Control Level.
-
Send emails to yourself with the function
Game.notify
to be aware of everything happening in the game. -
The
Game.notify
function automatically groups identical messages using the specified interval. -
It is too costly and senseless to maintain an army of military creeps in the peacetime.
-
The creep memory is saved upon death, so clear
Memory.creeps.*
to prevent overflowing. -
You can output HTML content to the console, like links to rooms.
-
Each game action has a constant cost of 0.2 CPU.
-
Creeps can miss each other if they walk towards each other simultaneously or follow step by step.
-
A creep can execute some commands simultaneously in one tick, for example
move
+build
+dropEnergy
. -
require
spends CPU depending on the size and complexity of the module loaded. -
Use loop architecture to save CPU on the logic you do not have to run each tick.
-
The game is fully recorded, so you can see replay of any room for the past several days.
-
If CPU limit raises, your script will execute only partially.
-
To output an object content into the console, use
JSON.stringify
. -
A creep with an
ATTACK
part automatically strikes back at every attacker byATTACK
. -
Respawning in a chosen room would automatically destroy all structures except walls and roads.
-
You can apply
transfer
andheal
to another player’s creep, andtransfer,
build
andrepair
to others’ structures. -
To prevent other players from seizing a neutral room you want, use
Creep.reserveController
. -
Energy in a storage can not be used to spawn creeps. Transfer it to a spawn or extensions instead.
-
You can speed up downgrading of hostile room controller by using
Creep.attackController
on it. -
Sources in neutral rooms have reduced capacity. Reserve or claim the room to restore it to full capacity.
-
Use
Room.energyAvailable
andRoom.energyCapacityAvailable
to determine how much energy all the spawns and extensions in the room contain. -
Dead body parts have weight and generate fatigue as well.
justjavac / screeps-tips Goto Github PK
View Code? Open in Web Editor NEWTips of the day for Screeps Game.
License: MIT License