https://screeps.com/a/#!/account click "Notifications enabled".
tscmoo
@tscmoo
Posts made by tscmoo
-
RE: Disable/limit e-mail on error when active
-
RE: Knee-jerk reaction to 2015-05-27 update
Did they change the rate at which energy on the ground degenerates? I had a pile of 1.5M or so before the update and it is now at 15K, and seems to be dropping by 10% every tick.
-
RE: Knee-jerk reaction to 2015-05-27 update
One thing that might become common is to simply store energy on the ground in a big pile. You only lose 1 energy per tick, which even with just 2 sources is only a 5% loss.
I agree that the new extension/creep building system seems better, though I'm not sure why they lowered the spawn to 300 energy total.
-
RE: Spawn.transferEnergy fails but returns OK
Indeed, you can only transferEnergy once per tick from a structure or creep. You can transfer from multiple sources to a single destination, but not from a single source to multiple destinations.
-
RE: Spawn.transferEnergy fails but returns OK
You can not transfer energy back and forth in one tick like that, no.
When you transfer energy to a creep, you can only transfer its maximum capacity - current energy, regardless of any energy it is transferring to something else.
-
RE: Significant cpu is used before my script is run
Just as a test, I suicided all of my creeps and it now outputs
[6:53:39 AM]5.816676
[6:53:40 AM]3.636976
[6:53:42 AM]14.490425
[6:53:43 AM]25.138307
[6:53:45 AM]5.462814
[6:53:46 AM]6.005194
[6:53:48 AM]6.023788
[6:53:49 AM]4.453297
[6:53:51 AM]5.006698
[6:53:52 AM]4.547158
[6:53:53 AM]3.560707
[6:53:56 AM]7.207466So that definitely helped, and reinforces my suspicion that the system runs some code to set up the Game interface and all related objects, and it counts the time used towards my used cpu. I don't know why it would take so long though, 60 creeps isn't much...
Either way this is out of my control and it would be nice if it either didn't count it or it was optimized to be less significant. -
Significant cpu is used before my script is run
Here is an excerpt from my log with the entire contents of my script being just
console.log(Game.getUsedCpu());[6:29:12 AM]48.676411
[6:29:13 AM]33.314896
[6:29:14 AM]53.990168
[6:29:16 AM]46.478472
[6:29:18 AM]37.185643
[6:29:19 AM]52.158025
[6:29:20 AM]25.419606
[6:29:22 AM]38.600426
[6:29:23 AM]64.554256
[6:29:24 AM]46.031705
[6:29:26 AM]36.342681
[6:29:27 AM]82.565116
...
[6:33:53 AM]106.455747106? With a 100 cpu budget, that gives me -6 to execute my code.
Right now it seems to average around 50 cpu used before my script is started.
I deleted everything in Memory and there is no other modules other than "main" which contains the above code.It's hard to do anything with approximately 50 cpu, especially when it appears the JIT needs to recompile everything every frame.
At the moment I have maybe 60 creep spread out over 16 rooms or so, is that related? Is it running some script to set up things (eg. Game and all the objects) and counting that as part of my cpu?
Despite any factors regarding server load or such, I feel like it should count the used CPU honestly.
-
RE: Unable to send creep into (opened) room owned by another player.
Oh, it started working! I can now send creeps back. Maybe it took a few hours to update....
-
RE: CPU Usage Optimizations?
I messed around with using c++ with emscripten, and it produced javascript files that were 800kb or so (300 when minified). It would frequently spend about 100 cpu just loading the script (without calling any functions at all), but I did not notice any difference minified vs not (there might've been though).
It seems like they're using V8 javascript engine, since performance is similar to node.js and Chrome, and there is definitely no support for asm.js.It seems to me like there is significant overhead with functions being constantly recompiled. I worry that by the time the JIT gets warmed up the tick is already over and it all gets recompiled the next tick.
Right now I'm using LLJS and using ArrayBuffers for some stuff. The performance is good but there is significant overhead with serializing data into Memory because it is converted to json for storage and ArrayBuffer is not supported, and converting to utf8 string is expensive.
I would be quite happy if Memory supported ArrayBuffer.Honestly I think they could improve the "caching" of scripts or otherwise let the JIT keep compiled functions between ticks, but it's possible their infrastructure prevents this. Or they might already do it and I'm reading things wrong, it's hard to profile code running on their servers.
-
RE: Unable to send creep into (opened) room owned by another player.
Same issue, I destroyed my walls at W4S5 and can send creeps down to W4S6, but they can not return to W4S5. They just move back and forth on the exit squares without anything happening.