Navigation

    forum

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

    Posts made by Mototroller

    • RE: Pathfinder cannot find path within one room

      There are awesome detailed articles by Red Blob Games:

      • http://theory.stanford.edu/~amitp/GameProgramming/index.html
      • https://www.redblobgames.com/pathfinding/a-star/introduction.html

      They are really helpful for understanding A*, tuning in-game PF and even implementing you own path-finding. Actually, built-in PF is pretty nice, but its parameters should be chosen carefully.

      posted in Technical Issues and Bugs
      Mototroller
    • RE: High CPU usage of Game.market.getAllOrders()

      @maey, there was an official announcement about indexing and caching.

      Yep, plain (not-a-callback-like) filter will work much faster.

      Definitely strange it isn't mentioned in documentation 😕

      posted in Technical Issues and Bugs
      Mototroller
    • RE: Ability to permanently remove a non-constructed wall tile from a room (for an extremely high price)

      @artch, I like the tunnels idea! Some thoughts:

      • Should it be allowed to build tunnels at rooms edges? I guess it's very tricky to implement and make compatible with current path finding.

      • Not neccessarily. It might open some interesting tactics in neutral rooms too.

        ...and not only neutral, but even enemy rooms! As a neutral structure like roads (with neutral construction sites?) tunnels can make possible some powerful "backdoor" siege tactics.

      Still, I guess, tunnels will become very high-level and late-game feature and for high-level players only, so it's questionable is it worth to implement. Well, but as a community contribution and for some tokens (like awesome super fancy Tombstones) -- why not? 🤔

      posted in Feature Requests
      Mototroller
    • RE: Force a global reset

      @joykill, you cannot push code from you code, obviously) See the topic issue:

      Is there a way to force a global reset from within the game loop with the iVM architecture?

      posted in Help
      Mototroller
    • RE: Force a global reset
      const heap_bomb = () => { new Uint32Array(8*1024*1024); heap_bomb(); };
      heap_bomb(); 
      

      I've tried this code -- works fine, but takes 2 ticks to reset global. As I see, for now the only way to force global reset is "heap overflow" or critical error, but one does not simply throw a critical error from sandbox ☝

      UPD: well, nope, it takes ~10 ticks, jeez 😅 (at least on PTR):

      [3:38:10 PM][shard0]GAME TIME 24980814
      const heap_bomb = () => { new Uint32Array(8*1024*1024); heap_bomb(); }; heap_bomb();
      [3:38:25 PM][shard0]Script execution timed out ungracefully
      [3:38:32 PM][shard0]Script execution timed out ungracefully, restarting virtual machine
      [3:38:35 PM][shard0]GAME TIME 24980823 
      
      posted in Help
      Mototroller
    • getTerrainOfRoom — fast copy of staticTerrainData[room]

      Suggested getTerrainOfRoom() is very minor, but useful function: instead of 2500 calls of getTerrainAt() to acquire static terrain data user now can call getTerrainOfRoom() once to get copy of runtimeData.staticTerrainData[roomName] typed array.

      There are TERRAIN_MASK_* constants within existing API which can be used for future analysis of this Uint8Array: distance transform, skeletonization, convolution with CostMatrices, transferring to WASM etc. IMHO, terrain data acquiring and transferring is pretty expensive now to try some advanced path/map techniques.

      Simple test to try (spoiler):
      const room = Game.rooms[Object.keys(Game.rooms)[0]];
      let t = 0;
      
      t = Game.cpu.getUsed();
      const arr = Game.map.getTerrainOfRoom(room);
      t = Game.cpu.getUsed() - t;
      console.log(`getTerrainOfRoom   = ${t.toFixed(6)} CPU`);
      
      t = Game.cpu.getUsed();
      const own = new Uint8Array(2500);
      for(let i = 0; i < 50; ++i)
          for(let j = 0; j < 50; ++j)
              own[i + 50*j] = Game.map.getTerrainAt(i, j, room.name).charCodeAt(0);
      t = Game.cpu.getUsed() - t;
      console.log(`getTerrainAt 2500x = ${t.toFixed(6)} CPU`);
      

      Typical performance tests:

      [5:42:29 PM]getTerrainAt 2500x = 0.988422 CPU
      [5:42:30 PM]getTerrainOfRoom   = 0.015738 CPU
      

      Need reply to ensure there aren't security underwater rocks here (constructor or accessors rewriting?) Now I'm investigating it as well.

      Pull request: https://github.com/screeps/engine/pull/83

      NOTE: there is a typo inside function (.roomName instead of .name if argument is a Room object), it'll be fixed before merging.

      posted in Feature Requests
      Mototroller
    • RE: PTR Changelog 2018-02-28: lab reaction time

      @artch,

      variable reaction time just looks reasonable and should have been implemented from the start

      Yes, I agree, that's good point indeed. Such a pity some legacy improvements sometime so... painful.

      Well, it was just my personal opinion, lets see community feedback. If only "3.5 anonymous" will be affected... well, it's time for just one more code rework, I guess.

      posted in News & Announcements
      Mototroller
    • RE: PTR Changelog 2018-02-28: lab reaction time

      @artch, not only economical optimal, but even surviving critical in some cases, I guess.

      T3 XGH20 7 lab pipeline (gif under spoiler)

      T3 XGH20 7 lab pipeline

      I posted out this personal "know-how" to Slack thread just to demonstrate one of the most optimal and advanced cook solution. Not sure how many players use such an approach, put this is an example of very timing sensitive layout.

      The official blog post said about lab effectiveness and forced people to use effective solution, and now... well, personally just don't fully understand background, maybe.

      UPD: @artch sorry, I missed some points:

      On the other hand, reducing T3 bonuses could break someone who rely on their hardcoded effectiveness in dealing with SKs, for example, creeps will just start to die out of sudden.

      Emh... Every effectiveness already represented within existing constants, so players already can build their creeps to satisfy damage/heal/tough requirements. And -- are there any players using boost for SK mining?! Crazy bastards 😄

      posted in News & Announcements
      Mototroller
    • RE: PTR Changelog 2018-02-28: lab reaction time

      @artch, thanks, I see. Well, I don't think reaction time balancing is much more simpler than percentages balance (and, as I pointed out, it may affect layouts (!) due to proxy capacities and chaining optimization).

      By the way, did you think about just... X sources regeneration time huge increasing, for example? Moreover, it can be applied for out favorite Z mineral, and others 🤔

      Were there any thoughts from @wtfrank about requested effectivenesses table update? My main idea is that there still lots of balancing possibilities without some pretty breaking changes like different reaction times.

      posted in News & Announcements
      Mototroller
    • RE: PTR Changelog 2018-02-28: lab reaction time

      @artch, you mentioned @wtfrank post, but there was nothing about reaction time, but about percentages. Moreover, I can't find any ideas about reaction times inside the whole mentioned topic.

      Instead of suggested percentage balancing, it decided to break all da chain lab layouts logic. And I expect future reaction time tuning, which will affect previously effective layouts as well. Hooray!

      Still don't understand, why it's necessary to change reaction times instead of change boost effectiveness.

      And, as was pointed out inside Slack, lab code is already one of the most difficult challenge for beginners, and now it may become even more hardcore ¯\(ツ)/¯

      posted in News & Announcements
      Mototroller
    • Forum themes CSS/Bootstrap bug

      There some issues with forum styles on my Linux machine (Windows seems to be ok). Default (toxic light theme) works fine, any other causes layout problems (see screenshot).

      Browsers details:

      4.4.0-112-generic #135-Ubuntu x86-64
      Google Chrome Version 64.0.3282.140 (Official Build) (64-bit)
      Firefox 58.0.1 (64-bit)
      
      Screenshot:

      0_1518599406389_css.png


      Questionable style lines inside bootstrap.min.css:

      .navbar-nav {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column; /* <= this one */
        padding-left: 0;
        margin-bottom: 0;
        list-style: none;
      }
      
      body {
          margin: 0;
          font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
          font-size: 0.875rem; /* <= font becomes unexpectedly small */
          ...
      }
      

      I have no idea how these styles been generated, but seems like there are some problems here.


      UPD: cache cleaning doesn't help, as well as even browser changing.

      posted in Technical Issues and Bugs
      Mototroller
    • RE: PTR Changelog 2018-01-18: isolated VM

      PathFinder seems to be fine, but there are relatively rare errors, see below:

      Spoiler:
      RangeError: Array buffer allocation failed
          at new ArrayBuffer ()
          at typedArrayConstructByLength ()
          at new Float64Array (native)
          at new Heap (:33344:27)
          // ======= ^ Screeps space
          at Object.findRoute (:33150:13)
          at Object.Creep.moveTo2 (__prototypes:1130:34)
          at Role.work (scout:179:27)
          at legacy_loop (main:1328:60)
          at LEGACY.run (main:1425:9)
          at Kernel:44:77
          // ======= ^ userspace
      

      and

      RangeError: Array buffer allocation failed
          at new ArrayBuffer ()
          at typedArrayConstructByLength ()
          at new Uint8Array (native)
          at new  (:39248:22)
          // ======= ^ Screeps space
          at staticRoomCallback (__prototypes:356:21)
          at global.civilRoomCallback (__prototypes:421:21)
          at roomCallback (__prototypes:1151:24)
          at :33018:31
          at Object.exports.search (:33030:19)
          at Object.search (:39286:38)
          // ======= ^ userspace
      

      Moreover, sometimes V8 heap overflow errors appear unexpectedly, cannot track them for now.

      posted in News & Announcements
      Mototroller
    • RE: Introduce boosts one teir at a time rather than all at rcl6.

      I'm not sure, what's the main goal and what's the current disbalance of RCL6 boosting? Imho:

      • Energy capacity and number of spawns are still very significant limiting factors (effective "creeps-per-tick" is pretty low for RCL6);
      • T3 cooking with only 3 or 6 labs takes veeery long time, so producing locking is questionable;
      • Due to low "creeps-per-tick" factor (see 1st point) it's pretty tricky (and expensive) to spawn and boost effective squads non-stop.

      I see a few main scenarios:

      1. Newly (re)spawned player reaches RCL6:
        • It's his first high level room: it'll take long time for him to cook (or buy) any valuable amount of any boosts.
        • He reaches RCL6 at several rooms simultaneously: it'll still take long time + resources + code flexibility to build and equip any effective squad.
      2. This room is claimed by high-level player in direct (~20) range of RCL7+ rooms: so boosting ability almost doesn't matter due to unlimited reinforcement.
      3. This room is claimed by high-level player through a portal: almost the same as previous point, because portal-runners are sufficiently experienced players.

      None of these cases seem imbalanced enough for me to change lab core mechanics.

      • Almost every high-level player has several RCL7+ rooms to support any newly claimed room. Moreover, these players should have pretty robust code to defend against every ordinary threat (not about Bonzai's one 😄).
      • Newbie players "grow up" almost simultaneously (Respawn and Novice areas) and they have tons of more important early-game (!) mechanics to implement. Moreover, diplomacy is very important for them while growing.
      • Experienced players in Respawn areas will always have an advantage against any other players here: they have their code and credits to boost yourself, and, if they are assertive enough, boosting limitations don't matter for them.

      And one more: honestly, are there any significant number of incidents "RCL6+T3 vs RCL5" in real world?

      posted in Feature Requests
      Mototroller
    • RE: Hard lag and 100% CPU tab usage with old renderer

      @artch It suddenly disappeared several hours later. Possibly it could be an issue with local internet provider routing, and some resources and utility hosts became unreachable. Cannot reproduce it same way.

      I'll try to investigate and dump it more carefully next time if it'll happen again, for now ticket is useless and can be deleted I think, thanks for response anyway.

      posted in Technical Issues and Bugs
      Mototroller
    • Hard lag and 100% CPU tab usage with old renderer
      • Any shard
      • Any room
      • 100% local CPU usage of Screeps tab => Hard lag and slow response
      • Chrome profile shows some Angular uncaught exceptions (see log below)
      • Non-WebGL mode only
      Console output:
      11:35:27.402 angular.js?bust=1509735506825":1 Uncaught Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!
      Watchers fired in the last 5 iterations: [[{"msg":"fn: o","newVal":{},"oldVal":{}},{"msg":"fn: o","newVal":{},"oldVal":{}}],[{"msg":"fn: o","newVal":{},"oldVal":"..."},{"msg":"fn: o","newVal":{},"oldVal":"..."}],[{"msg":"fn: o","newVal":{},"oldVal":"..."}],[{"msg":"fn: o","newVal":{},"oldVal":"..."}],[{"msg":"fn: o","newVal":{},"oldVal":"..."}]]
      http://errors.angularjs.org/1.5.11/$rootScope/infdig?p0=10&p1=%5B%5B%7B%22msg%22%3A%22fn%3A%20o%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%2C%7B%22msg%22%3A%22fn%3A%20o%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%7B%7D%7D%5D%2C%5B%7B%22msg%22%3A%22fn%3A%20o%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%22...%22%7D%2C%7B%22msg%22%3A%22fn%3A%20o%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%22...%22%7D%5D%2C%5B%7B%22msg%22%3A%22fn%3A%20o%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%22...%22%7D%5D%2C%5B%7B%22msg%22%3A%22fn%3A%20o%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%22...%22%7D%5D%2C%5B%7B%22msg%22%3A%22fn%3A%20o%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%22...%22%7D%5D%5D
          at angular.js?bust=1509735506825":1
          at d.$digest (angular.js?bust=1509735506825":1)
          at angular.js?bust=1509735506825":1
          at o (angular.js?bust=1509735506825":1)
          at angular.js?bust=1509735506825":1
      (anonymous) @ angular.js?bust=1509735506825":1
      $digest @ angular.js?bust=1509735506825":1
      (anonymous) @ angular.js?bust=1509735506825":1
      o @ angular.js?bust=1509735506825":1
      (anonymous) @ angular.js?bust=1509735506825":1
      setTimeout (async)
      l.defer @ angular.js?bust=1509735506825":1
      $evalAsync @ angular.js?bust=1509735506825":1
      (anonymous) @ angular.js?bust=1509735506825":1
      u @ angular.js?bust=1509735506825":1
      then @ angular.js?bust=1509735506825":1
      i @ build.min.js?bust=1509735506825:1
      e @ lodash.js?bust=1509735506825":1
      i @ lodash.js?bust=1509735506825":1
      setTimeout (async)
      o @ lodash.js?bust=1509735506825":1
      $digest @ angular.js?bust=1509735506825":1
      (anonymous) @ angular.js?bust=1509735506825":1
      o @ angular.js?bust=1509735506825":1
      (anonymous) @ angular.js?bust=1509735506825":1
      setTimeout (async)
      l.defer @ angular.js?bust=1509735506825":1
      $evalAsync @ angular.js?bust=1509735506825":1
      (anonymous) @ angular.js?bust=1509735506825":1
      u @ angular.js?bust=1509735506825":1
      then @ angular.js?bust=1509735506825":1
      i @ build.min.js?bust=1509735506825:1
      e @ lodash.js?bust=1509735506825":1
      i @ lodash.js?bust=1509735506825":1
      setTimeout (async)
      o @ lodash.js?bust=1509735506825":1
      $digest @ angular.js?bust=1509735506825":1
      (anonymous) @ angular.js?bust=1509735506825":1
      o @ angular.js?bust=1509735506825":1
      (anonymous) @ angular.js?bust=1509735506825":1
      setTimeout (async)
      l.defer @ angular.js?bust=1509735506825":1
      $evalAsync @ angular.js?bust=1509735506825":1
      (anonymous) @ angular.js?bust=1509735506825":1
      u @ angular.js?bust=1509735506825":1
      then @ angular.js?bust=1509735506825":1
      i @ build.min.js?bust=1509735506825:1
      e @ lodash.js?bust=1509735506825":1
      i @ lodash.js?bust=1509735506825":1
      setTimeout (async)
      o @ lodash.js?bust=1509735506825":1
      $digest @ angular.js?bust=1509735506825":1
      (anonymous) @ angular.js?bust=1509735506825":1
      o @ angular.js?bust=1509735506825":1
      (anonymous) @ angular.js?bust=1509735506825":1
      setTimeout (async)
      l.defer @ angular.js?bust=1509735506825":1
      $evalAsync @ angular.js?bust=1509735506825":1
      (anonymous) @ angular.js?bust=1509735506825":1
      u @ angular.js?bust=1509735506825":1
      then @ angular.js?bust=1509735506825":1
      i @ build.min.js?bust=1509735506825:1
      e @ lodash.js?bust=1509735506825":1
      i @ lodash.js?bust=1509735506825":1
      setTimeout (async)
      o @ lodash.js?bust=1509735506825":1
      $digest @ angular.js?bust=1509735506825":1
      $apply @ angular.js?bust=1509735506825":1
      (anonymous) @ angular.js?bust=1509735506825":1
      o @ angular.js?bust=1509735506825":1
      (anonymous) @ angular.js?bust=1509735506825":1
      setTimeout (async)
      l.defer @ angular.js?bust=1509735506825":1
      C @ angular.js?bust=1509735506825":1
      $applyAsync @ angular.js?bust=1509735506825":1
      a.listener @ build.min.js?bust=1509735506825:1
      dispatch @ jquery.js?bust=1509735506825":1
      g.handle @ jquery.js?bust=1509735506825":1
      trigger @ jquery.js?bust=1509735506825":1
      (anonymous) @ jquery.js?bust=1509735506825":1
      each @ jquery.js?bust=1509735506825":1
      each @ jquery.js?bust=1509735506825":1
      trigger @ jquery.js?bust=1509735506825":1
      m.fireEvent @ build.min.js?bust=1509735506825:1
      l.onmessage @ build.min.js?bust=1509735506825:1
      o.dispatchEvent @ sockjs.js?bust=1509735506825":1
      m._dispatchMessage @ sockjs.js?bust=1509735506825":1
      m._didMessage @ sockjs.js?bust=1509735506825":1
      r.ws.onmessage @ sockjs.js?bust=1509735506825":1
      

      Angular doc reference

      posted in Technical Issues and Bugs
      Mototroller
    • RE: PTR Changelog 2017-09-14: WebGL renderer (WIP)

      [BUG]: after some time (> ~5 minutes) out of Screeps tab the renderer hangs with static background image and some creeps stayed inside walls and other intermediate positions (Ubuntu, Google Chrome):

      Screenshots:

      0_1507898512181_Screenshot_2017-10-13_15-37-40.png

      0_1507898666383_Selection_265.png

      posted in News & Announcements
      Mototroller
    • RE: PTR Changelog 2017-09-14: WebGL renderer (WIP)

      @dissi @artch can confirm glitches, yep, FPS is strongly depends on view scale. The higher camera is, the higher FPS is, and vice versa.

      posted in News & Announcements
      Mototroller
    • RE: PTR Changelog 2017-09-14: WebGL renderer (WIP)

      @dissi are you sure about it's a real impact? FPS showed by metrics isn't stable, but scaling/moving around a room map is pretty smooth. I've got worse NVIDIA GForce GT 740m than you, and metrics shows FPS 10-100 with average is about ~50.

      posted in News & Announcements
      Mototroller
    • RE: PTR Changelog 2017-09-14: WebGL renderer (WIP)

      @artch: yep, it's working (without lightning effects, but ok).

      UPDATED: there may be issues with Intel Optimus + Bumblebee drivers (this was my case and it described above). Solution : install and use Nvidia Prime instead of Bumblebee (link).

      Screenshot and adapter details after Nvidia Prime enabling:

      0_1507814781178_Screenshot_2017-10-12_16-23-57.png

      0_1507818496120_Selection_264.png

      Thanks for help. Anyway, there are lots of possible problems with Linux + NVIDIA drivers, especially for laptops with integrated Intel graphics, they aren't Screeps issues.

      posted in News & Announcements
      Mototroller
    • RE: PTR Changelog 2017-09-14: WebGL renderer (WIP)

      @artch: I've already tried this, but it might be an issue with nvidia drivers/default graphical adapter/Intel integrated hardware accelerator/Bumblebee drivers for Intel-nvidia ad-hoc switching in Linux. Thanks, never mind, I gonna try another options, but this conversation should stay here with its keywords. I'll post a solution in case of success.

      Another useful link -- WebGL 2 enabling

      posted in News & Announcements
      Mototroller