Navigation

    forum

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

    Posts made by DewJunkie

    • RE: Show Controller Level in room overview

      Ideally, it would be something like 

      E68S57 - Lvl6 189K / 3.64M

      posted in Feature Requests
      DewJunkie
    • Show Controller Level in room overview

      On the overview screen it would be nice/helpful if the room controller level were shown.

      Something like E68S57 - Lvl8 would be helpful.

      Another possibly useful option would be to show the cumulative control points as an option in the graph dropdown.

      posted in Feature Requests
      DewJunkie
    • RE: Creating a standalone client

      @Dissi

      Did you abandon this, or ever open source it?  I found this.

      https://github.com/Zinal001/ScreepsAPI_NET

      Just curious, as what you had done so far looked pretty interesting.

      posted in General Discussion
      DewJunkie
    • RE: 10-CPU-Club

      I'm at 3 rooms with 10 cpu, it looks like I may be able to get up to 4, but I'll have to make some changes to get beyond that.

      posted in General Discussion
      DewJunkie
    • RE: Market deal cost.

      OK, found the answer, screen is wrapping as expected.  Turns out the excel function I was looking for was LN not LOG.

      =CEILING(amount*(LN(0.1*distance + 0.9) + 0.1))

      The market UI still was showing a different distance than the game, my guess is the the wrapping point changes over time, and the UI is lagging a bit.

      posted in General Discussion
      DewJunkie
    • Market deal cost.

      I just wanted to try to figure something out.

      Game.map.getRoomLinearDistance("W60S50", "E68S57", true)
      33
      Game.market.calcTransactionCost (5000,"W60S50", "E68S57")
      7676
      Game.map.getRoomLinearDistance("W60S50", "E68S57", false)
      129
       
      It seems like calcTransactionCost is not wraping the ends of the map, isn't it supposed to?  I did a deal between these room, and the cost was what was returned by calcTransitCost.
       
      Something else I thought was curious, is that the range indicated in the market screen was 13.
       
      I tried to use excel to estimate the cost, but I couldn't get it to match up with the cost returned by calcTransactionCost.  Normally I'm pretty good with excel, but I figured I'd see if someone had an answer, or if it just doesn't work as documented.
      Math.ceil( amount * (Math.log(0.1*linearDistanceBetweenRooms + 0.9) + 0.1) )
      =CEILING(B15*(LOG(0.1*A15 + 0.9) + 0.1))
      posted in General Discussion
      DewJunkie
    • Debugging

      Is it possible to debug your scripts when using a private server?  I haven't tried anything, but I wasn't able to find any clues on where to start.

      It would be nice to have a cli option to run 1 tick.

      posted in Private servers
      DewJunkie
    • RE: Example for storing and using a path in memory?

       And here I was trying to make sense of _move.path, and all proud that I had figured out what I needed.  I was trying to figure out which direction the pathfinder was taking my creep when doing moveTo(x,y,"");

      Just in case anyone else was looking, here's a quick snippet.

          creep.moveTo(new RoomPosition(5, 19, creep.room.name));
          console.log(JSON.stringify(Room.deserializePath(creep.memory._move.path)));
      posted in General Discussion
      DewJunkie
    • RE: Now you can play Screeps without writing a single line of code!

      lol, I love the audio. Now another stat I'm thinking of, how many clicks per minute is my script executing, lol.

      posted in General Discussion
      DewJunkie
    • RE: Yall should drop energy before you walk on swamps

      Is the public test area the simulation room?

      Thanks for the tip The_General. I have to say, this had quite a few side effects, but that is part of the fun right.

      posted in General Discussion
      DewJunkie
    • RE: Lost role's in memory

      The other thing I have noticed that could cause this is setting memory with the debug memory editor. When you save your changes, you are saving the whole tree you are under. So possibly, you were editing a different creep under the creeps tree, and when you saved, you overwrote the entire Memory.creeps.

      posted in Help
      DewJunkie
    • Simulation Slows Down

      Is it just me or something I'm doing. Whenever I try to test in simulation, it will run fine at 5x speed for a few minutes, then it slows way down. It makes it a bit tedious to try and test. It seems to slow down to < 50% speed. Has anyone run into this and possibly have a fix?

      posted in General Discussion
      DewJunkie
    • RE: Screeps d.ts file and gulp script

      Ok, I figured it out.
      http://www.typescriptlang.org/Handbook#declaration-merging
      So

      interface CreepMemory{
      role:string;
      }

      will just merge it with whatever is in yours.

      posted in General Discussion
      DewJunkie
    • RE: Screeps d.ts file and gulp script

      Thank you for your work on this. I'm new to typescript, and it seems to solve what I've always hated about javascript. What is the correct way to extend your interface? For example, I want CreepMemory to havea property for role. I could easilly modify the d.ts file you've provided, which works great but feels wrong.
      This is what feels right, but I'm trying to avoid starting a bad habbit when learning something new.
      `
      interface DewCreepMemory extends CreepMemory{
      role:string;
      }
      interface DewCreep extends Creep{
      memory:DewCreepMemory;
      }

      class BaseCreep{
      work(creep:DewCreep){
      creep.memory.role
      }
      }
      `

      posted in General Discussion
      DewJunkie
    • RE: Selected Creep Memory Watch

      That I'm aware of, I guess I'm usually too zoomed out to read the creeps name without first clicking on it. I guess if we were going to extend my idea, and we had access in code to the selected creep, then I'd be able to do even more. Like write console output only for the selected creep.

      posted in Feature Requests
      DewJunkie
    • RE: Ticks Used

      Agreed, it would likely be comparing apples to oranges, but here's mine anyway.
      Avg tick: 26.364
      Avg creeps: 51.741
      Avg Tick/Creep: 0.510
      What I was thinking is if someone was way out of line and doing well, it would give us a benchmark to try and shoot for. Also it would give a beginner something to shoot for, as the code you get when done with the tutorial has a lot of room for improvement.

      posted in General Discussion
      DewJunkie
    • RE: Memory API or Memory Copy

      I was thinking along the line of
      https://screeps.com/api/user/memory
      But that is better than what I had now.

      posted in Feature Requests
      DewJunkie
    • Ticks Used

      Just a fun idea so we can judge how relatively efficient we are. If you add this to the end of your code. We could compare how efficient we are being, and also have a sort of target for how good we could be doing. I'll post my results in ~ an hour.
      if(Memory.cpuTicks && true){
      Memory.cpuTicks = Memory.cpuTicks + 1;
      Memory.cpuTime = Memory.cpuTime + Game.getUsedCpu();
      Memory.creepCount = Memory.creepCount + Object.keys(Game.creeps).length;
      //console.log(Memory.cpuTime + ' ' + Memory.cpuTicks);
      } else {
      Memory.cpuTicks = 1;
      Memory.creepCount = Object.keys(Game.creeps).length;
      Memory.cpuTime = Game.getUsedCpu();
      }

      posted in General Discussion
      DewJunkie
    • Selected Creep Memory Watch

      This is a nice to have. Right now if you want to watch the memory of a creep, you have to select them, click add watch, then delete the watch after. If there was just a standard watch for selected, it would save a little time and make things feel less repetitive.

      posted in Feature Requests
      DewJunkie
    • RE: Add 'creep.underAttack'

      Just curious, but if you added a line to the end of your creeps. Wouldn't that get you 99% of the way there?
      creep.memory.underAttack = creep.memory.hits > creep.hits;
      creep.memory.hits = creep.hits;

      posted in Feature Requests
      DewJunkie