Your creep moves, and then the path to its goal is calculated again (for example the spawnpoint or the energy source). Some of them are calculating a path to a every second. For example, in the tutorial on the homepage you can build some basic scripts to control your creeps. The more efficient you make your script, the faster it gets. There are also mechanisms like a bucket of CPU time, that fills when you dont use CPU time, and can be used when there are spikes in your code. When the time is expired, your script is stopped and the next players script run. Your scripts are limited to a certain time to be run. The server is running through all Scripts of all people each second. The CPU tells you, for how long your script can be run in maximum.
Screeps cpu code#
Well basically, a more efficient code will lead to you getting a lower CPU?
Yes, I have seen some similarities, it seems that things like 1 is essentially a directory leading to it if I'm guessing right. (Keep in mind someone will need to host a server for the offline mode, could even be wrong on the machine you play on) That said Javascript goes perfectly with HTML, almost a requirment when writing HTML.Īnother note this game will have an offline mode in 1-2 months so the free trial may be long enough for that. Side not Java and Javascript are not the same thing. It comes with a one month free trial of 30CPU but I can confirm that the game is very playable at 10CPU, ive gotten my code currently to stay around 4CPU.īut again it is a measurement of performance/usage, just if you run an application on your computer it uses a percentage of the CPU. Цитата допису Bundeswehr:CPU is just a measurement of how much computer power your code uses.