Navigation

    forum

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

    pmaidens

    @pmaidens

    9
    Posts
    1140
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    pmaidens Follow

    Posts made by pmaidens

    • RE: CPU usage and inconsistency

      As far as I know (I am not an expert on how io.js handles require), require uses a synchronous file system fetch to load in the resource. As a result, if the hardware that the instance of io.js is running on is taking a long time to find the file, or if it is busy doing someone else's loading (most PAAS providers run multiple VMs on a single piece of hardware), then the script will block and wait for the data to come in. I assume that the CPU timer would continue to run during this time and as a result the amount of time wasted on loading the script could vary on things outside of anyone's control.

      The only way I can think of circumnavigating this problem is to not use require. Perhaps as a community we need to develop a Travis script that will go through all the files, replace any require calls with the code that they would fetch, and then push the modified files to the screeps api. That way, the hardware issues would not be reoccurring cost faced by the scripts, and instead would only be paid once during build time.

      posted in Technical Issues and Bugs
      pmaidens
    • Extension documentation says "You are not the owner of this spawn"

      This is a super minor documentation error, but I thought you guys might just like to know.

      If you go to the extension transfer energy documentation, for a return value of ERR_NOT_OWNER and ERR_NOT_ENOUGH_ENERGY it says "You are not the owner of this spawn". I assume it should say "You are not the owner of this extension".

      FYI, the link documentation correctly says "link" instead of "spawn".

      posted in Technical Issues and Bugs
      pmaidens
    • RE: findClosest returning RoomPosition objects?

      @Artem, Thanks! Everything is working great now!

      posted in Technical Issues and Bugs
      pmaidens
    • RE: findClosest returning RoomPosition objects?

      I don't think that will be the case. I think this is a bug that I am sure will be fixed shortly.

      posted in Technical Issues and Bugs
      pmaidens
    • RE: findClosest returning RoomPosition objects?

      I am having the same issue.

      posted in Technical Issues and Bugs
      pmaidens
    • RE: Cannot use moveTo, harvest, or transferEnergy on target stored in memory

      Thanks @avdg_ for responding.

      I think I need to rephrase my question. My confusion is why

      creep.moveTo(creep.room.find(FIND_SOURCES)[0]);
      

      works, but

      creep.moveTo(creep.memory.target);
      

      does not.

      IMHO, objects should be copied to Memory by reference, and therefore should be the exact same thing.

      posted in Technical Issues and Bugs
      pmaidens
    • RE: Cannot use moveTo, harvest, or transferEnergy on target stored in memory

      One way to fix this might be to copy objects into the memory attribute by reference (as one would expect with javascript) instead of by cloning (this seems to be the current case, since memory doesn't seem to reflect changes to the real world).

      posted in Technical Issues and Bugs
      pmaidens
    • Cannot use moveTo, harvest, or transferEnergy on target stored in memory

      For some reason, I cannot tell a creep to moveTo, harvest, or transferEnergy to an object that has been stored in memory. Below is an example.

      creep.memory.target = creep.room.find(FIND_SOURCES)[0];
      creep.moveTo(creep.memory.target);
      

      Instead I have to do the following:

      creep.memory.target = creep.room.find(FIND_SOURCES)[0];
      creep.moveTo(Game.getObjectById(creep.memory.target.id));
      

      However, calling creep.memory.target.pos.x is defined, so I am not sure why this is happening.

      posted in Technical Issues and Bugs
      pmaidens
    • Spawn.canCreateCreep() should not return 0 on success

      Spawn.canCreateCreep() is a totally counter-intuitive method. When the spawn can create the specified creep, canCreateCreep() returns a falsy response, and when the spawn cannot create the specified creep, it returns a truthy response. This method should be renamed cannotCreateCreep().

      posted in Technical Issues and Bugs
      pmaidens