Navigation

    forum

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

    Topics created by fazan

    • Game is not defined
      Technical Issues and Bugs • • fazan

      1
      1
      Posts
      2840
      Views

      No one has replied

    • universal getUsedCpu
      General Discussion • • fazan

      2
      2
      Posts
      3506
      Views

      var usedOnStart = 0; usedOnStart = getUsedCpu (); function getUsedCpu () { return Game.rooms.sim ? performance.now () - usedOnStart : Game.getUsedCpu (); }
    • Recommend a lightweight pathfinding library
      Help • • fazan

      4
      4
      Posts
      6800
      Views

      The short answer is: I don't. I have creeps that target moving creeps re-calculate every time they move. The only real caching options here are: check if the target has moved enough to merit an update, if so recalculate.
    • RoomPosition.findClosestByRange () filtering broken?
      Technical Issues and Bugs • • fazan

      4
      4
      Posts
      5673
      Views

      @chris Sorry, but there are no calls of 'filter' in the first example. There I pass an object with a property called 'filter' which holds a function definition. Do I miss something?
    • What happens when a creep is not on path specified by moveByPath?
      Help • • fazan

      3
      3
      Posts
      4725
      Views

      Oh, thanks, it wasn't in the documentation yesterday
    • Game.creeps.filter vs. room.find (FIND_MY_CREEPS)
      Help • • fazan

      2
      2
      Posts
      7119
      Views

      Room.find is optimized for searching in the specified room only, and Game.creeps contains all creeps within all accessible rooms. If you have many rooms, Room.find is definitely faster.
    • What was findNearest returning
      Help • • fazan

      1
      1
      Posts
      2558
      Views

      No one has replied

    • Twitter promo finally here, but...
      General Discussion • • fazan

      6
      6
      Posts
      7037
      Views

      In the same lack of followers boat here, if anyone wants to follow me or wants me to follow them I'm @ICZorach. Also if you were wanting to abuse newbie protection couldn't you just make 11 twitter accounts?
    • Body generation algorithm bug
      Help • • fazan

      2
      2
      Posts
      3188
      Views

      Thats strange - it just started working. I probably just should've reloaded the simulation.
    • Creating a screeps github repository
      Help • • fazan

      4
      4
      Posts
      5681
      Views

      Thanks, I figured it out, everything up and running.
    • Get a global function by name
      Help • • fazan

      6
      6
      Posts
      8988
      Views

      Not sure how efficient the method is, but I create an object that contains my required modules. I start with an var f = {}; and then each module is saved as a f.harvester = require('harvester'); I can later just call that using the string in the memory of a creep Memory.creeps.Harvester1.role = 'harvester'; f[Memory.creeps.Harvester1.role]; // this calls the script just fine using a string.
    • Twitter promo frequency
      Help • • fazan

      6
      6
      Posts
      6874
      Views

      Well, there is vitually an infinite amount of days to come)