Navigation

    forum

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

    Topics created by Primoz56

    • Circular references
      Help • • Primoz56

      2
      2
      Posts
      3444
      Views

      I don't. In such cases I usually have a third file that imports the other two ,)
    • is there a non-linear Game.map.getRoomLinearDistance
      Help • • Primoz56

      3
      3
      Posts
      4679
      Views

      Thank you, strange how i managed to miss that function even though i was in the right area :s
    • moveTo to NOT leave room
      Help • • Primoz56

      6
      6
      Posts
      8991
      Views

      awesome thanks that worked
    • calling a failing createcreep causes memory issues
      Technical Issues and Bugs • • Primoz56

      3
      3
      Posts
      4251
      Views

      Same, although I can circumvent by pre-checking all creep creation conditions myself instead of relying on the creep creation function.
    • Picking up non energy drops from invaders
      Help • • Primoz56

      3
      3
      Posts
      4791
      Views

      ty that worked
    • attacking with CLAIM
      Feature Requests • • Primoz56

      3
      3
      Posts
      5145
      Views

      I think it would be better just to only do something about people who lost everything and can't possibly recover their room, as you suggested in the last paragraph.
    • Object.isConstructionSite
      Help • • Primoz56

      4
      4
      Posts
      4562
      Views

      http://support.screeps.com/hc/en-us/articles/207689119-Important-change-game-objects-prototypes
    • container.room incorrect
      Technical Issues and Bugs • • Primoz56

      4
      4
      Posts
      4705
      Views

      That does appear to be a bug. On a different note, this exact bug is why I have my IDE flag the use of assignment in conditionals as 'probably wrong', and why I trained myself to put constant first in tests ("E34S11" == creep.room.name) so that missing an = sign causes an instant error.
    • Creeps spawning without memory
      Help • • Primoz56

      9
      9
      Posts
      11974
      Views

      I think the logic is in the way the game loop works. The Memory is yours, and you can act on it. You can manipulate the same Memory object several times in a row, and the data is written instantly always. Spawning and World-affecting stuff (i guess everything they declared with the const cost of 0.2CPU) could be seen as being acted between gameticks. Your code is preparing it, telling everyone what to do, but they don't do it until your code is complete. So the spawner does not start spawning until the end of the tick (although it already got the command earlier). Until then, it leaves us with the state of the creep's Memory existing before the creep itself (kinda philosophic, isn't it?)   Edit: Another thing i stumbled upon is the cancelOrder(methodName) method of the creep. This might be a reason why things work as they work. It seems like you can gain more control by being able to cancel the Orders you gave in your code before they are executed.
    • structure.say
      Feature Requests • • Primoz56

      3
      3
      Posts
      4120
      Views

      Go one step further, and use MapObject.say(). If it has a position, it can talk. I also don't see any obvious reason why you can't have enemy creeps talk (to you). Since .say() costs 0.2cpu to call it's not like it can be abused. Better (server performance wise) to use say() than to spawn flags for debugging.
    • Spawning names
      Feature Requests • • Primoz56

      2
      2
      Posts
      3243
      Views

      You can easily check if a Gane.creeps["name"] is alive. The engine does all the checks in user time (meaning it costs CPU) before it sends the request to the server. I advice you to write your own method which does this for you. I don't think they will implement this.
    • Sign-in via steam on website
      Technical Issues and Bugs • • Primoz56

      2
      2
      Posts
      3870
      Views

      I ran into the same problem when trying to connect an account to steam that I had previously created via link to github. I was able to work around this by setting a new password on my account and then using the steam client to log into my account, which automatically linked the account to my steam. I don't know if this will help you with logging in, though, but maybe you can at least set a password and login without steam after that.
    • ramparts.isActive
      Help • • Primoz56

      1
      1
      Posts
      2140
      Views

      No one has replied

    • walls in reserved areas
      Feature Requests • • Primoz56

      3
      3
      Posts
      3745
      Views

      I kind-of agree that regular walls in reserved areas would be a bit too easy. That said some kind of improved defenses in reserved areas would be nice. Perhaps smaller walls with a hit point cap, or some other defensive options for the frontier (watchtowers, minefields, tank traps, outposts, etc.).  The possibilities are endless
    • simulation mode extensions
      Technical Issues and Bugs • • Primoz56

      2
      2
      Posts
      2910
      Views

      Have you increased the controller level to the required value?
    • steam view profile upgrade
      Technical Issues and Bugs • • Primoz56

      6
      6
      Posts
      6416
      Views

      Hum, indeed too obvious IMHO a link from the profile page to the overview could still be usefull but it's OK to use the top menu.
    • roads on room edges
      Feature Requests • • Primoz56

      1
      1
      Posts
      2178
      Views

      No one has replied

    • code help for sorting creeps by energy
      Help • • Primoz56

      5
      5
      Posts
      8773
      Views

      I'd say the problem with including the transferring creep in transferCreeps follows like this: Whenever your digger has the highest energy in the group (which is usually the case) then it will itself be transferCreeps[0] and do nothing. Otherwise, it'll completely ignore any creeps with less energy than it and only transfer to creeps with more energy than itself. Hopefully this explains the weird behavior.
    • comparing pos not working
      Help • • Primoz56

      4
      4
      Posts
      6725
      Views

      thank you
    • access points
      Help • • Primoz56

      3
      3
      Posts
      3977
      Views

      This is what I have been using for sources. Can be important at low controller level.   accessPoints: function (room, pos) { var accessPoints = 0; if (room.lookForAt(LOOK_TERRAIN, pos.x+1, pos.y) != "wall") { accessPoints = accessPoints+1; } if (room.lookForAt(LOOK_TERRAIN, pos.x+1, pos.y+1) != "wall") { accessPoints = accessPoints+1; } if (room.lookForAt(LOOK_TERRAIN, pos.x+1, pos.y-1) != "wall") { accessPoints = accessPoints+1; } if (room.lookForAt(LOOK_TERRAIN, pos.x-1, pos.y) != "wall") { accessPoints = accessPoints+1; } if (room.lookForAt(LOOK_TERRAIN, pos.x-1, pos.y+1) != "wall") { accessPoints = accessPoints+1; } if (room.lookForAt(LOOK_TERRAIN, pos.x-1, pos.y-1) != "wall") { accessPoints = accessPoints+1; } if (room.lookForAt(LOOK_TERRAIN, pos.x, pos.y+1) != "wall") { accessPoints = accessPoints+1; } if (room.lookForAt(LOOK_TERRAIN, pos.x, pos.y-1) != "wall") { accessPoints = accessPoints+1; } return accessPoints; },   Yes there are several function to find distance between two targets. Cehck out http://support.screeps.com/hc/en-us/articles/207023879-PathFinder  By yes I mean you first find the path then check its length. Need to decide whether just doing a trigonometric distance is good enough.