Game.cpu.generatePixel change


  • Dev Team

    @rayderblitz We pushed it now because increasing 5000 to 10000, or adding intents cancelling is a very simple change. And it's long overdue, we discussed it 2 months ago already.


  • Dev Team

    generatePixel cost will be changed from 5000 to 10000 CPU on December 10. No other changes to this method will be made.

    πŸ‘πŸ‘€πŸ•΅πŸ˜·πŸ€¦


  • @artch said in Game.cpu.generatePixel change:

    generatePixel cost will be changed from 5000 to 10000 CPU on December 10. No other changes to this method will be made.

    😷 😡

    My exact reaction:

    πŸ€·πŸ˜†


  • I'm much happier with this option that the original proposal of cancelling intents.

    If you're good with your CPU management and plan a bit you should be able to handle this no problem. I expect to see more interest in #operatingsystems as a result of this, which is no bad thing.

    😍


  • notification 28 hours before deployment... 😞

    ☝

  • Dev Team

    @rhef said in Game.cpu.generatePixel change:

    notification 28 hours before deployment... 😞

    This has been announced 2 weeks ago for December 7, but got delayed for 3 more days. See this thread from the top post.

    πŸ‘ŽπŸ€¦


  • I guess it depends on what you mean by "this".

    A tweet on Nov 23 announced that a different change (cancelling intents) is going to be deployed at a different date (December 7), requiring different changes to our codes.

    A forum post on Dec 8 (20:32 CET) announced the actual change on a forum post (not even a new thread) that would happen on Dec 10. This was then reposted by o4kapuk on slack 3 minutes later. It never actually made it to twitter and the first time a lot of people (those who have not read the forum thread since Dec 😎 found out about it was a little over a day before it was actually deployed... if they read slack during the week, that is - because I for instance mostly have time for screeps during weekends and finding out that a breaking change forcing workarounds in my code to not break it was "announced" and deployed during the same week is just making me sad. There was no deadline - the revised design could have been announced through the proper channels with proper vacatio legis and deployed a week later, but it was not.

    I'm just pointing out that the communication about that new design of the pixel change was not 100% perfect and I hope that we can all use that opportunity to draw conclusions and learn from it so that it is better in the future.

    πŸ‘β˜

  • Dev Team

    @rhef But why is it a breaking change? What does it break? The only possible negative effect may be a low-bucket situation, but this situation is normal (e.g. after runtime resets), and your code must be able to handle it properly. If it cannot handle it, then you miss a lot of ticks anyway, and 1 more missed tick doesn't make much difference to call it "breaking change".

    In real breaking cases (when players are expected to change their code) we always test it on the PTR, announce it months in advance, and discuss drafts of the API with the community again and again. Since you're new to Screeps, you may have not seen these discussions, so just one example of such schedule:

    πŸ‘


  • You can see the impact it had on #announcements-any slack, people started hitting global resets a lot when pixel generation ate their entire bucket unexpectedely. You can probably see a clear trend of it on a server-side chart of global resets per tick, if you are monitoring it.

    My code never had to worry about bucket being at much less than 4k. I have an expensive room planner figuring out whether some new buildings or roads need to be done, sometimes it runs on the same tick as a creep scheduler - now they can burst through the limit, cause a reset, which will then on the next tick try to run pathfinder-heavy room planners for all rooms (as those set some room properties that are used by other systems to optimize the work for a small/medium/large room), which causes another reset until the server-side mechanism triggers when it sees that I'm skipping multiple ticks in a row, freezes my code completely to fill up the buffer and then brings my code back online in hope that it can plan all rooms before it bleeds out.


  • Dev Team

    @rhef So you seem to treat persistent global as some documented guaranteed behavior, but it's not. We don't guarantee that you will have the same global each tick. Global reset is a normal situation, many reasons can cause it, including automatic runners recalibration within the cluster. Your code should not rely on it that much, and if you do rely on it, you're using undocumented behavior - which is fine and acceptable, but can't be referred to as a breaking change.

    A breaking change is when you're forced to change API usage or game objects behavior, not some internal optimizations of your code.

    πŸ€¦β™‚πŸ‘πŸ€«πŸ‘ŽπŸ€¦


  • Yup, this last minute change in decision broke my logic and caused me to lose a room due to script execution timeout (in the middle of a battle). I had written the code out anticipating the intents being canceled.


  • Dev Team

    @crazydubc Sorry to hear that. To be fair, the 10000 CPU alternative has been discussed since November 25, so it's not really that "last minute". The top post has been updated long time ago as well.

    πŸ™„


  • To be fair, it was discussed for a while, but then officially announced less than two days before deployment without proper communication, in the middle of a week.

    @artch are you trying to say that the announcement and delivery of this change has been executed perfectly and so nothing shall be improved in the future, if a similar change is going to be deployed one day?

    Or maybe there is some room for improvement, we'll remember this situation and use this it as a lesson to improve our ways?

    πŸ‘β˜

  • Banned

    This post is deleted!

  • Banned

    β€œBut the plans were on display…”
    β€œOn display? I eventually had to go down to the cellar to find them.”
    β€œThat’s the display department.”
    β€œWith a flashlight.”
    β€œAh, well, the lights had probably gone.”
    β€œSo had the stairs.”
    β€œBut look, you found the notice, didn’t you?”
    β€œYes,” said Arthur, β€œyes I did. It was on display in the bottom of a locked filing cabinet stuck in a disused lavatory with a sign on the door saying β€˜Beware of the Leopard.”

    So I finally found this after having unexpected behaviour for the past few days. @artch top post still says 5000 cpu and cancelling intents, and the Nov 25 post about it makes it sound like a suggestion not the planned update. When are we getting a bigger bucket to accommodate this change?

    πŸ•΅πŸ‘†β˜β‰πŸ‘»

  • Banned

    PIXEL_CPU_COST still returning 5000.
    Screeps Documentation still lists PIXEL_CPU_COST as 5000.
    While this isn't fixed you are breaking people's... trust in you!
    (and also incidentally their code)

    😘😞

  • Dev Team

    @rhef There is always room for improvement for everything, that's sophistry. What I'm saying is that we always treat breaking changes seriously, and non-breaking changes less seriously. Because we don't have enough resources to run full-scale communication procedure for every tiny change. We only have 4 people in our entire team for both World and Arena, and the community manager is also the game engine developer. Hence the more communication, the less development. We did our best in this case, and I think it was good enough, given how tiny this change was in comparison to the initial intents cancelling idea.

    Please don't judge us how you judge big companies with a lot of staff and resources. We're a small indie team, and we cannot follow all the same procedures you got used to in other places. Especially given that it's a game, not a banking system.


  • Dev Team

    @tdxtor Oh wow, and this is the real issue here, unlike communication. Sorry for that, fixed now. It should have been deployed together, but somehow got overlooked.

    πŸ™ƒπŸ‘€

  • Banned

    @artch said in Game.cpu.generatePixel change:

    @tdxtor Oh wow, and this is the real issue here, unlike communication. Sorry for that, fixed now. It should have been deployed together, but somehow got overlooked.

    Screeps documentation still lists PIXEL_CPU_COST as 5000.

    The communication is a real issue here, you are insulting us by dismissing it over and over again so flippantly. Your SEO is garbage. Google "screeps patch notes" and tell me where you see this thread or a link to this forum. I see links to people asking where to find patch notes, but no patch notes. I see no links to screeps' twitter or slack or discord or forums or whatever on page one of search results.
    "Top post still says 5000 cpu and cancelling intents, and the Nov 25 post about it makes it sound like a suggestion not the planned update." You still hadn't decided which tact you would take with the update here https://screeps.com/forum/post/15881 and you only actually announced the change 5 days ago here https://screeps.com/forum/post/15895 but you have lied about it in several posts since.

    You failed to communicate this.
    Take a deep breath, admit it, then make sure to do better next time.

    Because of how badly you did communicating this, people are asking "hey, are you going to do a better job in the future?" and you are just blowing them off when we need a real answer. Also, maybe you should have a tip pop up to let players know this is where they need to be looking for critical update news so they find out 2 days before a change happens, instead of 2 days after.


    Next and perhaps more importantly, you used to have a system to buy back your cpu for a fake currency, now you largely don't. What used to be in people's "if(Game.cpu.bucket>9500){" used to be "give the devs compute back in exchange for fake currency so that game ticks can be faster" but now we have to go back to "while(Game.cpu.getUsed()<400){}" so that we are getting our cpu's worth. This slows the game down, make the game less fun for subscribers, and devalues all cpu subscriptions since they will work for fewer ticks (which will cost screeps real money as people unsub).

    β‰πŸ‘πŸ‘‚β‰β˜πŸ‘†

  • Banned

    @tdxtor wow on https://status.screeps.com/ you can see some people have already gotten wise and are making ticks longer. Just wait until the devs actually communicate this update to the players.

    πŸ˜†