Navigation

    forum

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

    Topics created by shedletsky

    • Did development on this game stop?
      General Discussion • • shedletsky

      4
      4
      Posts
      3831
      Views

      @atavus hey, for a game that's goal is to automate everything, it's only natural someone would automate forum posting too at some point!
    • Getting 30 second room loads on shard0
      Technical Issues and Bugs • • shedletsky

      2
      2
      Posts
      2038
      Views

      Isn't this a duplicate of your previous topic?
    • Unsolved Waiting for Data Too Many Tabs Open
      Technical Issues and Bugs • • shedletsky

      1
      1
      Posts
      2157
      Views

      No one has replied

    • Unsolved 10+ second page loads of world map on Shard0
      Technical Issues and Bugs • • shedletsky

      4
      4
      Posts
      2900
      Views

      @shedletsky Yes, rooms images, user badges and stats are loaded as separate requests, so your browser may throttle them. We have plans to revamp this UI using PixiJS, it should help. No ETA though.
    • Document Pathfinding
      Feature Requests • • shedletsky

      4
      4
      Posts
      5896
      Views

      Game.map.findRoute tends to always work, but it isn't guaranteed. PathFinder is the native library for pathfinding. (iirc) The default cost matrix is the same "cost matrix" used by findPath, meaning all objects that can block a creep are max path cost, swamps are more expensive than plain, and roads are 2x cheaper than road. If you're building a custom CostMatrix, it's best to do the whole thing yourself than rely on some interleaving between the default matrix and your custom overlay. findPath is the old pathfinder built entirely in js. It's good to get started with but not good if you want efficiency. A lot of documentation is scattered, typically the best resource is your own experience. If you want a fast and very controllable path, only use PathFinder.
    • Document FIND_DROPPED_RESOURCES
      Feature Requests • • shedletsky

      14
      14
      Posts
      9269
      Views

      @shedletsky This is my first attempt at adding it to the docs. This is my local copy. I am not sure the formatting is consistent this way, but I have run out of time for goofing off on this. EDIT - and it seems the wording on custom filters not being cached needs reworded ... the base query is cached, but the filtering is not cached.
    • Don't let me build roads on top of walls
      Feature Requests • • shedletsky

      5
      5
      Posts
      5247
      Views

      Ultimately wouldn't it just be simpler to use RoomPosition.lookFor(LOOK_STRUCTURES) and structureType != STRUCTURE_WALL before you place down your road? And just a note if you really want to organize your code for everything you can just make your own custom api for specific types of game objects and require it making it easier to update in the future.
    • Unsolved RoomPosition.createFlag fails without room vision
      Technical Issues and Bugs • • shedletsky

      4
      4
      Posts
      2919
      Views

      Got the same error, devs should confirm if this is intended or not.
    • Unsolved Doing RoomVisual Logic Just For the Room I'm Looking At?
      Help • • shedletsky

      23
      23
      Posts
      16530
      Views

      EDIT - this snippet only works in IVM. To support non-IVM, the rooms cache would need placed into Memory So at the bottom of this post is an example script that uses the user/console API to create this functionality. It will inject the functionality into your running client whenever your global resets, or whenever you run the console command injectViewHistory();. It should never inject the functionality into your client more than once, even if the global resets. It will put an undefined into your console each time you change rooms. See this forum post for details on that functionality getting changed: https://screeps.com/forum/topic/2182/allow-third-party-software-to-not-spam-the-in-game-console Note that this example script does not use the correct auth token end-point, so if you spam room changes rapidly, you could get rate-limited like @artch already stated. This call is very easy to change to a post with your auth token, but I did not use the auth token version in this prototype. You must save the script below as a module named viewhistory. Then, in your main module you can then use it like this: main.js var viewhistory = require('viewhistory'); viewhistory.inject(); module.exports.loop = function() { console.log(viewhistory.rooms()); } viewhistory.js let injected = false; const _rooms = {}; const ROOM_LIMIT = 3; global.injectViewHistory = function() { injected = false; inject(); } function inject(){ if(!injected) { injected = true; var output = `<SPAN>Trying to inject View History code!</SPAN> <SCRIPT> if (typeof watching === "undefined") { var watching = false; let lastRoom = "sim"; function attach() { if(!$('section.game').length) return setTimeout(attach,100); let gameScope = angular.element($('body')).scope(); if (gameScope && !watching) { watching = true; gameScope.$watch('Loader.loadingCnt', (n) => { if (n === 0) { let roomScope = angular.element($('section.room')).scope(); if (roomScope) { let Api = angular.element($('section.game')).injector().get('Api'); let room = roomScope.Room; if (room) { if (lastRoom !== room.roomName) { lastRoom = room.roomName; console.log("viewed " + room.roomName); /* should be replaced with an auth token post to user/console instead of injected */ Api.post('user/console',{ expression: "viewedRoom('" + room.roomName + "');", shard: room.shardName }); } } } } }); } } $(function () { setTimeout(attach); }); } </SCRIPT>` console.log(output.replace(/(\r\n|\n|\r)\t+|(\r\n|\n|\r) +|(\r\n|\n|\r)/gm, '')); } } function rooms() { return Object.keys(_rooms); } global.viewedRoom = function(roomName) { _rooms[roomName] = Game.time; let keys = Object.keys(_rooms).length; while (keys > ROOM_LIMIT) { let oldest; for (const roomName in _rooms) { if (_rooms.hasOwnProperty(roomName)) { if (!oldest || _rooms[roomName] < _rooms[oldest]) { oldest = roomName; } } } keys--; delete _rooms[oldest]; } } module.exports = { inject, rooms };
    • Quick quality of life shortcut for browser GUI
      Feature Requests • • shedletsky

      1
      1
      Posts
      1626
      Views

      No one has replied

    • Are you guys running on fewer servers than you were 6 months ago?
      General Discussion • • shedletsky

      9
      9
      Posts
      7206
      Views

      @eiskalt good tip, but I already use Chrome
    • Give observers infinite range
      Feature Requests • • shedletsky

      2
      2
      Posts
      2405
      Views

      Please see this topic.
    • You're killing me
      General Discussion • • shedletsky

      7
      7
      Posts
      5949
      Views

      @mangoscribble the reason shard0 is like this is because it's huge, other shards won't ever get that big
    • My subscription just killed itself with no warning
      Technical Issues and Bugs • • shedletsky

      4
      4
      Posts
      2963
      Views

      EXACTLY - sadly artch does not care about it or feel this issue important (yet).. Properly implementing abuse-proof grace period system is a quite complicated task, and our current focus is new major game features like isolated-vm and power creeps, rather than improvements which would affect a few users in a few specific cases.
    • WebGL Renderer Blurry
      Technical Issues and Bugs • • shedletsky

      16
      16
      Posts
      10775
      Views

      @shedletsky devicePixelRatio=1.1 means you have 110% scale in your browser settings. Better to make it 100% since our engine cannot guarantee precise sprite rendering with floating point devicePixelRatio, best results are with 1, 2, 3, etc.
    • Solved Can't claim room (error -15 GCL not enough)
      Technical Issues and Bugs • • shedletsky

      10
      10
      Posts
      6680
      Views

      @o4kapuk yes it is fixed now, thank you very much!
    • Unsolved Matryoshka creeps
      Technical Issues and Bugs • • shedletsky

      10
      10
      Posts
      7531
      Views

      This can happen when you close your laptop for example. If you later reconnect the "old" objects are still there. The server no longer sends updates to the client about this object, so it remains in place, it never got the "remove from field" update. Later another creep can just move on top of it
    • Better API Support for Portals
      Feature Requests • • shedletsky

      3
      3
      Posts
      2516
      Views

      I agree. If it's available in the map (which it is) then it should be available in an API. Attaching it to Game.map seems like the best choice.