Navigation

    forum

    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    1. Home
    2. Finndibaen
    3. Posts
    • Flag Profile
    • block_user
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Groups
    • Blog

    Posts made by Finndibaen

    • RE: bug ? : room.energyAvailable counts inactive extensions

      Looks like this has never been fixed, I was checking my rooms after a long inactivity period and I can still see it happen.

      Here is i posted on slack last night, with my findings

      I have a room (W61S45) with disabled structures (extensions). That room reports energyAvailable < energyCapacitAvailable (1750<1800). BUT Game.rooms.W61S45.find(FIND_STRUCTURES, {filter: { structureType: STRUCTURE_EXTENSION }}).filter(s=>s.energy < s.energyCapacity && s.isActive()) reports no extension.

      looks like the extensions counted for energyAvailable are not the active ones, anyone faced this already ? (notable to say that the displayed status of the extensions is off too, extension at 39,14 is shown active , but isActive returns false, meanwhile the one at 43,14 is the opposite [active but showed inactive])

      This should be fixed so that inactive status of structures is consistent across the various APIs ... Due to the highly inefficient way isActive() is implemented, you can't expect players to have to call it every time (especially as the implementation lets me think the order may not be consistent over time either).

      As my code will only spawn creeps when energyAvailable == energyCapacityAvailable the only way out I found is to refill all extensions, including inactive ones which is a shame

      posted in Technical Issues and Bugs
      Finndibaen
    • RE: creeps not spawning even though createCreep returned the provided creep name

      @Mashee neither : ) I'm actually running a timer based system. whenever a creep is spawned, a timer is set to determine when a new one needs to spawn, thus sparing the cpu cost of checking untill that time. this is why this issue is particularly hurting me

      @SandGrainOne by construction my code should only ever spawn 1 creep per tick and per room. But yes, your point is valid

      posted in Technical Issues and Bugs
      Finndibaen
    • RE: creeps not spawning even though createCreep returned the provided creep name

      @Mashee thanks for the willingness to help, but there is no caching involved here, i'm storing in (saved) memory every spawn request i'm expecting to succeed, and checking that it was realized on the next tick, otherwise resubmitting it.

      Had to do that because of the issue i describe above, which was resulting in some critical creeps missing

      posted in Technical Issues and Bugs
      Finndibaen
    • RE: Possible issue with getUniqueName

      isn't that "getUniqueName" belonging to your code ?

      posted in Technical Issues and Bugs
      Finndibaen
    • RE: creeps not spawning even though createCreep returned the provided creep name

      you're definitely right ! i'll fix this, although this is not explaining the issue

      posted in Technical Issues and Bugs
      Finndibaen
    • RE: Regarding active structure checks

      the issue with this active check is how it's implemented : the engine searches for all structures , sorts them by range to the controller and returns true/false based on that .... but it's NOT cached.

      This is especially bad for extensions as you can imagine, if you want to test which extensions are active and you have 40 of them, you'll do this check (sorting, checking if the current extension is in the allowed set) for EACH of them

      posted in Feature Requests
      Finndibaen
    • RE: creeps not spawning even though createCreep returned the provided creep name

      i am not 100% certain but the code shouldn't allow it, i'm only spawning 1 creep per room per tick.

      AND, the next tick the spawn isn't spawning anything else either (eg, spawn.spawning === undefined)

      posted in Technical Issues and Bugs
      Finndibaen
    • RE: PTR Changelog 2017-08-27: shards API

      I'm not sure why all the fuss ?

      If you intend to send creeps on a different shard, just allocate some cpu to it before ? now that we have the api it shouldn't be an issue right ?

      posted in News & Announcements
      Finndibaen
    • creeps not spawning even though createCreep returned the provided creep name

      So ... I'm trying to understand why some creeps don't spawn.

      Are there cases where the creep won't spawn (eg, spawn.spawning is null on next tick) even though spawn.createCreep returned the provided name ?

      This seems to happen quite often and is quite disruptive for my codebase,

      How i came up to that conclusion : whenever I call spawn.createCreep and it returns ok I remember the request

      	let result = this.createCreep(body, name, memory);
      
      	let success = result === name;
      	if (success) {
      		Memory.spawning = Memory.spawning || {};
      		Memory.spawning[this.id] = {name: name, time: Game.time, needTime: body.length / 3, result: result};
      	}
      

      Then on next tick I check if that spawn is spawning

      function checkSpawns() {
      	let failed = false;
      	_.forEach(Memory.spawning, (expected, spawnId) => {
      		let spawn = Game.getObjectById(spawnId);
      		if (spawn && (!spawn.spawning || spawn.spawning.name !== expected.name)) {
      			failed = true;
      			expected.failed = true;
      		}
      	});
      	if (failed) {
      		Memory.failedSpawning = Memory.failedSpawning || {};
      		Memory.failedSpawning[Game.time] = Memory.spawning;
      	}
      	delete Memory.spawning;
      }
      
      

      Ir remember the whole spawn requests because i wanted to make sure there was not name conflicts

      Current output

      {
        "21066868": {
          "5800c9308a798b425be34e2c": {
            "name": "bridge-867-W55S43",
            "time": 21066867,
            "needTime": 3,
            "result": "bridge-867-W55S43",
            "failed": true
          }
        },
        "21067841": {
          "580feb31ba239b7c48519603": {
            "name": "tractor-1840-W52S41",
            "time": 21067840,
            "needTime": 16,
            "result": "tractor-1840-W52S41",
            "failed": true
          },
          "59880854ae5de95797792478": {
            "name": "tractor-1840-W76N67",
            "time": 21067840,
            "needTime": 16,
            "result": "tractor-1840-W76N67",
            "failed": true
          }
        },
        "21067980": {
          "583090f06fba44674ac260ed": {
            "name": "bridge-1979-W57S45",
            "time": 21067979,
            "needTime": 3,
            "result": "bridge-1979-W57S45",
            "failed": true
          }
        }
      }
      

      so ... down to my question : are there cases where the spawn intent won't be executed on server side ? I've checked also that the energyAvailable on next tick was enough for the creep to spawn

      posted in Technical Issues and Bugs
      Finndibaen
    • RE: hundreds of errors in /opt/engine/dist/core/path-finder.js

      found the faulty calling site ... was calling PathFinder.search ([pos: undefined, range: x])

      posted in Technical Issues and Bugs
      Finndibaen
    • hundreds of errors in /opt/engine/dist/core/path-finder.js

      I have about 630 notifications with the below exception last night, starting at 1.50AM GMT+2 untill 3.14AM GMT+2. Granted the above looks like it could be a creep lifetime, and can be caused by my code. But it looks like the limit on notifications prevents reaching the applicaiton code here 😞 and letting the game error handling it means you have to let any exception break your game code which is dissuasive.

      Is there a way to see what are the lines from https://github.com/screeps that we're talking about here ?

      [Priority 1] TypeError: Cannot read property 'x' of undefined
          at toWorldPosition (/opt/engine/dist/core/path-finder.js:34:16)
          at /opt/engine/dist/core/path-finder.js:104:22
          at arrayMap (/opt/engine/dist/core/node_modules/lodash/index.js:1406:25)
          at Function.map (/opt/engine/dist/core/node_modules/lodash/index.js:6710:14)
          at Object.exports.search (/opt/engine/dist/core/path-finder.js:94:19)
          at Object. (/opt/engine/dist/game/path-finder.js:54:38)
          at Object.se
      
      
      posted in Technical Issues and Bugs
      Finndibaen
    • RE: Unclaiming a room triggers safemode

      @artch why would unclaiming a room trigger empire wide safemode cooldown though ? isn't this what @tedivm is explaining ?

      posted in Technical Issues and Bugs
      Finndibaen
    • RE: CPU log

      @Demos on top of what @kirk explained , what you're seeing are each "worker" process loading your scripts

      posted in Help
      Finndibaen
    • RE: hard resets/timeouts storms

      this seems over for now; lasted about 16h though

      posted in Technical Issues and Bugs
      Finndibaen
    • RE: Please fix "reset storm" bucket filling

      so ... is there anything i CAN do to avoid this kind of things ?

      you can imagine it's taking a heavy tax on cpu for all the additional script reloading, at least during storms my bucket refills 😉

      posted in Technical Issues and Bugs
      Finndibaen
    • RE: Please fix "reset storm" bucket filling

      is there a relation between this "fix" and code being now reloaded every 150 ticks or so (rather than 700 before ?)

      0_1503061032775_db9e056a-44de-4f33-a846-ce7c5305ea05-image.png

      Because indeed we are now compensated for "storms" (between 8am and 9 am on the above pic) but not outside of them

      posted in Technical Issues and Bugs
      Finndibaen
    • RE: hard resets/timeouts storms

      so indeed bucket is now refilled during storms, but there also seem to be very bad storms going on right now.

      I'm currently experiencing one for almost 8H 0_1503044300153_0d50552e-bf82-4843-af92-34bc74f62552-image.png

      i can say exactly when you pushed that fix to live though ! 0_1503044337363_ee01748d-b878-41b4-87ff-9c49e887da40-image.png

      posted in Technical Issues and Bugs
      Finndibaen
    • RE: hard resets/timeouts storms

      @artch i've never seen anything like this until now indeed (hopefully), bad 15 mins of no service is pretty bad on the bad scale.

      actually ... I hadn't thorougly checked the emails... FR times

      11:30 AM : 
      83	Script execution timed out: CPU limit reached
      35	Script execution has been terminated: CPU bucket is empty
      28	[Priority 1] TypeError: Cannot read property 'message' of null
      11:36 AM
      40	[Priority 1] TypeError: Cannot read property 'message' of null
      11:42 AM
      36	[Priority 1] TypeError: Cannot read property 'message' of null
      11:47 AM
      28	[Priority 1] TypeError: Cannot read property 'message' of null
      11:53 AM
      29	[Priority 1] TypeError: Cannot read property 'message' of null
      12:00 PM
      168	Script execution timed out: CPU limit reached
      99	Script execution has been terminated: CPU bucket is empty
      

      here is the cpu view, as you can see, my code was blacked out for almost 30 mins 0_1502996002698_9febc6fd-c5c6-4305-9a73-01534001c35c-image.png

      posted in Technical Issues and Bugs
      Finndibaen
    • hard resets/timeouts storms

      I usually have a few timeouts/hard resets per day, but today, in a single (so a 15 mins interval) notification email i received

      83 Script execution timed out: CPU limit reached
      35 Script execution has been terminated: CPU bucket is empty
      28 [Priority 1] TypeError: Cannot read property 'message' of null (those are exceptions without message) 
      

      This notification email is dated 9:30 AM GMT time, according to my gathered metrics it was NOT during a reset storm.

      I'm pretty sure it matches the interval where i don't have any metric in my reporting, underlined in red on the image below

      0_1502994547069_f79fd19c-3269-40e4-be55-428ca87a5677-image.png

      edit : I'm reporting this, because if you add up all the missed ticks, it's almost 12 minutes long ... hopefully i wasn't attacked during that time

      posted in Technical Issues and Bugs
      Finndibaen
    • RE: Adjust Monthly Expansion Rankings for Shards

      I'm not sure I see the value in being in the charts ?

      especially for players that are already high enough GCL.

      And ... considering how things are going right now, shard1 does NOT seem to be a place where new players will be able to progress much

      posted in Feature Requests
      Finndibaen