PTR Changelog 2017-07-20: world shards



  • I agree, although I would have phrased it differently from tedv. Please, don't remove what make this game special, because I guarantee it's the clever coding solutions and not the tedious micro.


  • Dev Team

    If we can do it directly, in game, with a proper limit than it won’t be an issue for either side.

    The limit would be, say, once per day. Do you think it’s fine to have an API call that works only once per day? Considering that it is related to real time, not game ticks at any shard.


  • Culture

    Once per day is more than enough. Sometimes a shard would require more CPU (massive GCL boosting, preparing for attacks / defenses if needed). If you are using this call you can assume that the player is experienced in their coding capabilities to make proper use of it, as he's already on multiple shards.


  • Culture

    > The limit would be, say, once per day. Do you think it’s fine to have an API call that works only once per day? Considering that it is related to real time, not game ticks at any shard.

    I'm happy with this. While it would be nice for this limit to be more often (four times a day?) I can live with one if that makes it easier for us to get this feature.

    It would be nice if the limit could be higher on PTR for testing purposes though. Nice, but not a requirement if it's too complicated to do.


  • Culture

    It would be a nice touch to make the API call cost a lot of resources in-game as well?

    Say we can build resources like RESOURCE_SHARD_CONTROLLER and apply those to our account?


  • Culture

    > Say we can build resources like RESOURCE_SHARD_CONTROLLER and apply those to our account?

    Only if that limit also applies to the UI.

    Would the 24 hour CPU allocation limit apply to the UI as well? That would be my preference.


  • Dev Team

    Would the 24 hour CPU allocation limit apply to the UI as well? That would be my preference.

    Sure. It would be the limit on the web endpoint.


  • Culture

    I would suggest that the same limit also applies to the UI.

     

     


  • Culture

    I would be fine with once a day (though as tedivm says I would prefer a _little_ more often than that). It's not like I need to do it very often, so most days I probably wouldn't change it. It'd be a strategic resource, kind of like safe mode. If I need more CPU in a shard because I'm under attack, and I reallocate, and then the enemy forks their attack to another shard that I pulled CPU from, tough cookies for me!

    I don't agree with adding a resource requirement unless it is a requirement no matter how you call the API, though. Smells too much like an explicit advantage to manual play.

     

    e: sounds like everyone else thinks that too. Cool, sounds good to me. 



  • Once a day would be definitely fine for me!

     

    I'd also be open to the UI either matching the limits, or not having them. We can assume someone calling via code knows what they want, and thus apply a limit to them. Via the UI could be a new player just experimenting though (if it isn't heavily warned against), and accidentally assign all their CPU to a shard they're not on.


  • Culture

    So the safemode thing, plus daboross concern about the new player experience, bought up an idea.

    What if every 24 hours we got a "reallocate token", with a max of something like four tokens (and no transfers to other players). There could still be a cooldown between them (30 minutes?), but it would mean that players could at most average a change a day (even though they can "burst") and would make mistakes a bit easier to handle when they occur. 


  • CoPS

    Once per day seems fine, but I think a option to undo within 1 minute may be good for the UI. It would be a very bad thing to get wrong.



  • Artem, can you answer my questions so I can personally dial down my frustration with your game roadmap

    - is this a game about autonomous game scripting or a "player" will need to be manually operating it all the time

    - is the CPU limit a cup for the scripts and balancing for the players or the available server resources and thus distributing some of the processing time to an own server and just sending the data back via the API is the way the developers see the game in the future?

     

    if the answer to the first question is that the game scripts should not be fully autonomous - the whole discussion here will go away as surely the people that are trying to create AIs that can play the game will just go do something else cause this won't be achievable here and thus pointless to waste their times

    if the answer to the second question is that we should boost our ingame scripts with data imported from the web endpoints - then the discussion goes away as we'll have the answer to how to fully automate the scripts - it'll just require an external server running an off-site version of our scripts



  • It appears having a programmatic API to adjust CPU has already won the day, but I'll add my feedback as another player in favor ideologically of having such an API. 

    I like the interShardSegment. I trust at some point you will document in more detail what memory model we can expect now that we've effectively got a multi-threaded application with shared memory? 

    Thanks for all your work, I've been enjoying playing screeps!


  • Dev Team

    a option to undo within 1 minute may be good for the U

    Sounds reasonable.

    • is this a game about autonomous game scripting or a “player” will need to be manually operating it all the time

    I don’t think this question is something that should be answered. It’s obvious enough that Screeps is about scripting.

    is the CPU limit a cup for the scripts and balancing for the players or the available server resources and thus distributing some of the processing time to an own server and just sending the data back via the API is the way the developers see the game in the future

    Sorry, I can’t seem to understand your question. If you mean “cap” instead of “cup”, then yes, your scripts are capped to your CPU limit. If you try to overcome this limit by offloading some calculations to your own server sending results back to your game script constantly, it might be considered an abusable behavior since it’s not very sporty.

    I trust at some point you will document in more detail what memory model we can expect now that we’ve effectively got a multi-threaded application with shared memory?

    Please elaborate what kind of documentation you’d expect here? Isn’t it a coding challenge that players need to solve on their own?


  • Dev Team

    CPU re-allocation is only a part of the problem here. In order to automate inter-shard colonization, you have to re-allocate GCL levels as well (along with Power Levels when they are released). They are not shared nor synchronized, so you need to explicitly allocate some of your control levels to the secondary shard. We need to come up with such APIs regarding all user account resources, sounds like a major piece of API to introduce.


  • Culture

    I think we'd love a simple explanation of what's going on with the segment, like by what process it gets replicated between shards and how conflicts are reconciled, so we might better solve the coding challenge.

    Whether you want to give us that, or leave it as a mystery for us to work out through experimentation, is totally up to you. 😉

     

    Thanks for listening to the feedback. I'm super excited about this feature now!


  • Dev Team

    I think we’d love a simple explanation of what’s going on with the segment, like by what process it gets replicated between shards and how conflicts are reconciled, so we might better solve the coding challenge.

    It is simply a shared string (in Redis) that gets rewritten in the end of every shard tick if this shard introduces some changes to it. All shards have access to the same instance of this Redis key. The string is rewritten all at once, so the changes are atomic. Updated the documentation a little bit.


  • Culture

     

    > CPU re-allocation is only a part of the problem here. In order to automate inter-shard colonization, you have to re-allocate GCL levels as well (along with Power Levels when they are released). They are not shared nor synchronized, so you need to explicitly allocate some of your control levels to the secondary shard. We need to come up with such APIs regarding all user account resources, sounds like a major piece of API to introduce.

     

    I'm curious why this would be a big project, especially since the APIs to make the actual changes have to get created for the UI anyways. One way to solve it would be a special type of intent that dumps requests into a separate queue would be enough of a change from the game itself, and then a separate microservice that just reads from that queue and makes the changes (if allowed) by utilizing a special version of the API that already has to exist for the UI. This gives the minimum amount of actual game system changes, but I'm sure there are other ways to handle it as well.


  • Culture

    Can you confirm that all the workers on all the shards will have NTP (or some equivalent time management system) configured (preferably against a local server but at a minimum against the same pools) so that we can depend on the system clocks being pretty much synchronized even across shards?