So until walls down, I probably can't reach controller level 3, so I have to stick with level 2. Is it reasonable to build defense at level 2? I tried to build ramparts and ranged attack unit to patrol ramparts, but ramparts decay too fast and builders are too weak to keep it up. I guess I can improve situation by throwing more builders, but may be it's better to reach level 3 and hope that noone will notice me? Or build walls instead of ramparts? I never tried to build walls.
vbezhenar
@vbezhenar
Posts made by vbezhenar
-
What is a good way to build proper defense at start?
-
RE: Question regarding the language to use
I used JavaScript. Now I'm rewriting my new code with TypeScript. I can highly recommend TypeScript over JavaScript. Can't say anything about C++, I'm afraid, that won't work well, but you might try it.
-
RE: Inconsistent CPU Usage
You might use some expensive operations. For example any pathfinding operation is expensive and if there's no way to target position, it's very expensive, make sure that your creeps don't block each other. Another issue might be related to some advanced JavaScript constructions. I tested for loop vs forEach method and I found that forEach method is much heavier. 'use strict', ES6 let keyword and so on. So you might want to stick with basic JavaScript constructions if you want to squeeze every bit of performance.
Other than that, I can't say that I observed server load. I played at 20 CPU some time and it was enough for my base. All spikes were caused by pathfinding operations. Probably with 5-10 rooms or fighting mobs I would need more CPU.
-
JavaScript file with all API with JSDocs
Is there Javascript file somewhere, that I can add to my project so my IDE will know in-game classes and provide autocompletion, etc. Just empty functions with correct JSDoc comments.
-
What included in cpu time?
As I understand, basically the process of each step is:
- Memory = JSON.parse(memoryData)
- Game = prepareGameObject
- invokeUserScript
- memoryData = JSON.stringify(Memory)
- applyCommands
What exactly included in cpu time? Specifically I'm wondering if complex memory structure will result in performance penalty? Or only #3 is counted and I can do anything with Memory as long as it feets in 2MB?