PTR Changelog 2016-09-29
-
> Calm your tits mate, it isn't as bad as it look. The expected cost will be around 1 cpu for every 100th flag and it should mostly affect the players who has been using the flag objects as their memory object.
I'm in his boat:
> Object.keys(Game.flags).length
< 2932I, too, only use flags to mark locations: buildings and roads. Honestly I don't know how I ended up with so many, maybe it's the roads. But the point is that I now have to completely rework my building code to deal with this change. 1 cpu per 100 flags means I'm paying 29 cpu per tick. tedivm is even worse off.
I have to spend hours to write a bunch of code just to keep my current codebase running and I haven't seen anything but nerfs for months. I wrote a bunch of code for boosts: now boosts are really hard to make. I wrote a bunch of code for the market: now no one uses it because minerals are too precious. I wrote a bunch of code for automatic layout: now the mechanism I used to store my layout is going to cost me half my CPU/tick.
It's not fun. Games are supposed to be fun.
-
Honestly, in the last month it felt they they were just screwing with us.
1. Market requires 10cpu to 25cpu if you want to read the orders in it.
2. Pushed a no-notice upgrade where they didn't bother checking to see if they killed anyones code, and took my empire out for six hours. Had I been on vacation it would have been the end of the game for me.
3. Nerfed minerals, forcing people to rebalance.
4. Removed real testing on PTR by no longer copying empires over (you now have to rebuild it from scratch with 10+ second ticks).
5. Nerfed flags.
Honestly, I wish the devs would spend some time working on the open source server instead of spending all this time ruining their game.
-
Hell, half the reason people use flags so much is because of how memory used to get corrupted. So you built this situation you're now punishing people for.
-
This years nerf/buff report so far, this is in no way the vision of the community, it's purely based at my own personal experience with the game so far.
Buff:
- Pathfinder - http://support.screeps.com/hc/en-us/articles/207728995-Changelog-2016-02-19
- Labs + minerals - http://support.screeps.com/hc/en-us/articles/207929925-Changelog-2016-03-10
- terminal costs - http://support.screeps.com/hc/en-us/articles/209659809-Changelog-2016-08-08
Moot changes (no changes needed, but new work needed to get it working, new stuff, exciting stuff sometimes):
- Reserving rooms (good nerf) - http://support.screeps.com/hc/en-us/articles/206897739-Changelog-2016-02-08
- Markets - http://support.screeps.com/hc/en-us/articles/212013685-Changelog-2016-09-05
Breaking changes (required big reworks in areas):
- Flag change with ID's - http://support.screeps.com/hc/en-us/articles/208518785-Changelog-2016-05-12
- Invaders - http://support.screeps.com/hc/en-us/articles/207520959-Changelog-2016-04-13
- Withdraw - http://support.screeps.com/hc/en-us/articles/209019269-Changelog-2016-07-11
- Mineral countdown mining - http://support.screeps.com/hc/en-us/articles/211853829-Changelog-2016-09-26
-
Dissi, you really should put the retirement of PTR as a testing server in there. Now that they don't copy the empires over it's basically useless.
-
There hasn't been a big change which required me to use PTR (I test in PROD a lot, I'm a monster). I've voiced my concerns for the /PTR not being equal to /A in this thread. I can't make changes to my flag system without PTR, it's too risky.
-
Exactly. It's impossible to test the scenario they're proposing here.
-
The current theory on slack (shared by dissi, nhahno, myself and others) is that you're purposefully pushing out the older/bigger players to make rooms for the new ones. That's how bad we feel this community has been managed in the last few months.
-
I agree with what tedivm said, it does feel like "being big" is severely being punished lately
-
As a smaller player who has barely managed to gain 3 rooms so far, these recent updates have sucked quite a bit, I'm already struggling to stay within my CPU limit at times, much less during the ~3 hour reset storms. Adding even more CPU cost just makes it even harder. I don't always have the time to spend to optimize my code, and refactoring to where optimizing and improving is easier is that much harder due to sudden changes. I use flags to both mark future building locations as a visual tool, and to mark rooms for claiming, parking spots for idle creeps, etc. But judging by these changes, flags should only be used for debugging! This makes them virtually useless to me as just having them causes massive increase in CPU. For someone as small as me and low GCL, 1-2 CPU can make all the difference when thats 2-4% of my total CPU.
-
The fact that you guys have time to do this but won't even respond to my request for a larger bucket (due to the massive increase in global resets, plus the garbage collection costs) is disconcerting. I don't even know how we're supposed to handle power creeps on top of this.
Seriously something needs to be done to get more community involvement going here.
-
Artem, this type of game attracts the creative minds. You impose limits, we merely see obstacles. If you kick people back down every time they come up with creative solutions for a problem, then it's going to alienate those players that are actually passionate about the game. One would think that's the sort of player you want to actually keep around.
I'm only here for 2 weeks but in that time I've seen a lot of goalposts being moved already. Some for the better, some questionable.
For example, being a new player, I now feel quite disadvantaged by the recent changes to resource harvesting, and the pending powercreep requirement for remote mining, when the veteran players are entrenched due to their existing wealth of resources and power.
This flag issue doesn't seem to be handled too well either.
Perhaps instead of heavyhanded nerfing and kneejerk reactions to people using the toys in your sandbox for something you didn't expect them to (something you should expect given the nature of the game), work with the community to address problems in a way that doesn't repeatedly invalidate the work of those that spend countless hours and their money on your game.
-
For the record, i have about 7000 flags. I use them primarily to mark locations of buildings, with a focus on planning and enforcement of buildings. What that means to me is that a certain flag marks a location where a structure should exist, pending a RCL precondition, and then should permanently exist thereafter. This allows me to place structures "in advance" and then build or rebuild them later by marking the location and using the color code of the flag as information for my management. I also use flags as spawning demand "tickets", where a flag is used to request a creep to come "do something" at a location.
The flags documentation states
Flags can be used to mark particular spots in a room.
Having thought this over more, I'm not sure what it is I am doing wrong with flags that I would need to incur a 30++ cpu penalty in the next two weeks. I am marking locations in my empire for things to be built, locations of interest that allow me to navigate between rooms, and I am marking locations for creeps to go do work. If the Flag object is too expensive on the server, provide me with a drop-in alternative, or allow me to build the flag objects myself. I'll implement the cache I suggested for myself, if you let me. That will both reduce load on the server, and I can keep my flags. You've had multiple suggestions from a few people, including myself, on how to reduce server. Can you please address those suggestions even as stop-gap solutions until there are alternative or better options in place?
-
Since this is separate from Memory, would it be possible to write the server end to use a more efficient method for storing flags?
I can't exactly profile the current JSON-serialization for the flags since it's PTR, but if, say, Protocol Buffers were used instead of the custom string serialization for storing flags, I'm pretty sure it'd take both less CPU and less memory to process them. In the past when I've worked with data sets with very defined formats (like name,x,y,roomName as opposed to the open-ended Memory), Protocol Buffers has greatly sped up serializing and deserializing, as well as disk usage by data sets because of the structure of the data format. Using this, or another bit-crunching serialization method would certainly still give the CPU benefit of using flags over memory that there has been in the past, and wouldn't tax the servers as much with memory or CPU either.
Since flags are such a nice way to store script information in a directly-editable way, having them as viable as possible to use would be nice, for both the Screeps team, and screeps users.
In protobuf, something as simple as this could be used for storing flags - in a way fast to access, and deserializable by both the server and the user interface:
syntax = "proto2";
enum Color {
RED = 1;
PURPLE = 2;
BLUE = 3;
CYAN = 4;
GREEN = 5;
YELLOW = 6;
ORANGE = 7;
BROWN = 8;
GREY = 9;
WHITE = 10;
}
message Flag {
required string name = 1;
required Color color = 2;
required uint32 x = 3;
required unit32 y = 4;
required uint32 room_x = 5;
required uint32 room_y = 6;
}
message UserFlags {
repeated Flag flags = 1;
}The binary representation would be much more compressed, and in Protocol Buffers the deserialization code (pre-compiled using protoc for each message) knows exactly when each field starts/stops, and can just read the message directly without needing to separate a string in any place, or allocate anything but the final result in the middle of parsing. Something like the following could be used to parse it. I'll try and do profiling on this along with the code you posted, because I feel that something like this could really benefit the server.
let flags = require('proto_flags');
function serializeFlags(flagsObject) {
let flags = _.values(flagsObject);
let outputMessage = new flags.UserFlags();
for (let i = 0; i < flags.length; i++) {
let inputFlag = flags[i];
let outputFlag = outputMessage.addFlag();
outputFlag.setName(inputFlag.name);
outputFlag.setColor(inputFlag.color);
outputFlag.setSecondarycolor(inputFlag.secondaryColor);
outputFlag.setRoom(inputFlag.pos.roomName);
outputFlag.setX(inputFlag.pos.x);
outputFlag.setY(inputFlag.pos.y);
}
return outputMessage.serializeBinary()
}
function deserializeFlags(inputBinary) {
let flags = {};
let roomFlags = {};
let input = flags.UserFlags.deserializeBinary(inputBinary).getFlagList();
for (let i = 0; i < input.length; i++) {
let inputFlag = input[i];
let flag = new Flag(
inputFlag.getName(),
inputFlag.getColor(),
inputFlag.getSecondarycolor(),
new RoomPosition(inputFlag.getX(), inputFlag.getY(), inputFlag.getRoom()),
);
let room = inputFlag.getRoom();
if (room in roomFlags) {
roomFlags[room].push(flag);
} else {
roomFlags[room] = [flag];
}
flags[inputFlag.getName()] = flag;
}
}
-
Wall of text incoming.
As I previously stated I consider flags(as it is now) to be a mechanism that can be abused at the expense of the whole community.
So it MUST be nerfed one way or another. E.G. my previous example, a 'free' 10 cpu user could fuck the tick time for everyone by covering ALL the rooms in the world with flags.This being said, here is a couple of suggestions:
* About PTR: It should be possible for anybody to test code in PTR.
Proposal: Anybody should be able to register for a session of 12 hours on ptr every 48 hours. (Reduce that time if you fear overcrowding)
On activation the state of all the game objects of the player should be copied on ptr.
(structures, creeps, flags, memory)
Two players could then also test combat strategy there, but with a slower pace.* About flags:
a) Make it part of the Memory with a default implementation that we can surcharge so we benefits from our own optimization.
And make the memory scale with GCL with an higher limit.
something like 500k + 100k per GCL.b) Alternatively, keep it free but make the amount of flags scale per GCL.
E.G. 100 or 200 per GCL.c) Even better replace that with an api for graphical hint with a default implementation that we can surcharge
but then make the memory scaling proposed in a)
(as proposed by Dissi)* Optimize your engine.
This may look pedantic, but if your engine is written mostly in js and with a programming scheme similar to what we can see by looking at prototypes in the console there are a LOT of potential for optimization.
I would be in favor of replacing big parts of the server side logic by native code, but hell, even in js, there a lot of hanging fruits.
Don't get me wrong, I don't intend to criticize nor underestimate your coding capabilities.
I feel like you are hitting some scaling wall and just didn't have time to do this.
And my theory is that some of the current rebalance are also CPU sink of some sort in order to help with that.
Hopefully the OSS will allow us to help you with that. Assuming you'll reintegrate PR in the main code@tedivm
Please cool down a bit, you are an important part of the community, and your opinion matter a lot to us. (at least to me)
It doesn't help to go all UPPERCASE on the devs, I completely understand that in your particular position (and N00bish and Anisoptera) this is a VERY hard pill to swallow, but consider that as the devs already proved, the proposal on PTR is usually not definitive.
So stay constructive, we will find a way(PS: If you leave, can I use your avatar ?)
-
I just want to ask all of you to offer some alternative solution when you criticize what we offer.
The current situation with flags is very dangerous because of the reasons which not only we can foresee, here are some players telling the same in this thread. Free-to-use flags are ruining the spirit of this game, where you are supposed to optimize. And this is very abusable, you can actually break the game completely if you wish by generating dozens of thousands of flags. The current game engine will not be able to parse them witin 3 seconds tick. Offer the alternative how to solve this issue, we're open to listen, really.
As to "nobody uses flags as memory" - if it was like that, we were not doing this change. Currently there are flags with names kilobytes in length.
Can’t we get any buffs in CPU or anything? We’re just expected to “deal with this increase in cpu, you got 2 weeks”. It took about 4 weeks to reduce my CPU by 20. Now 50% of that goes back to flags, I’d like to influence how they’re made.
This game has more breaking changes pushed per month than my actual job that I get paid for, and I get more notice of those changes and more opportunity to fix my code to comply with the changes. Two weeks? Are you serious?
We can extend this period if needed, it’s not a problem.
Not only that, but they’re refusing to give us a proper platform to test these changes, forcing us to do so in production.
You can use PTR to measure your flags usage, it seems to be enough here. Anyway, we can try to copy the world again, but ticks will be more like 2-3 minutes instead of 10 seconds.
-
Voronoi-
Honestly, I may have just hit a breaking point with the amount of crap that's been shovelled on us lately. It really hurt that they broke my code for hours because of a bug fix they didn't test, and that they had no real solution to making sure that didn't happen in the future. It upped the stress level of this game significantly knowing that at any point my code can break and there is nothing I can do to prevent this. The game is now a 24/7 on call game which is not what it was supposed to be.
Then on top of that they keep making decisions that basically screw people who have been playing for awhile. Their documentation says that flags can be used in this way, and they know that people have. So they break PTR and then announce changes that are going to destroy the work that people have been putting, in at least my case, over a year of work on. Oh, and we have two weeks to deal with that.
They are failing at working with the community. They keep announcing what appears to be knee jerk reactionary changes, they refuse to share data about why they're making those changes (because sharing that data would take time), they're delaying things like the open source server (which would actually help them, in the sense that others would be able to help work on the game with them)- but more importantly *they keep breaking the game*.
For context, which I think a lot of people are missing, a lot of people who play this game want to play an automated game. We enjoy the challenge of things like automated building placement, and in general want to automate everything we can. Flags are an amazing tool for this- not just because we're trying to offset memory usage, but because they were literally designed to let us tie information and location together. Further, the devs seemed to encourage this- I've posted pictures of my automated flag programs before, and the devs seemed to notice people were using them this way and added the ability to choose multiple colors with flags (allowing subcategorization).
So they're literally destroying an entire way of playing this game that many people have gathered around. They're doing it with two weeks notice. They're doing it even though their documentation never said anything about our methods being wrong, and despite the fact that they have to have known we were doing this.
On top of that they're doing it with a shitty implementation. They're making us pay for accessing every flag in every room, even if we only need one. Thats horrible. If they want to introduce these limits they should at least do it in a sane way- allow us to lazy load specific flags we need for instance, or only load flags from rooms where the programs is looking for flags. This would probably take work though, and so they're instead dumping this shitty implementation on us and forcing us to work around it.
While I can see something like putting a limit on flags in place, it will greatly limit the game. That being said I'd be willing to swallow it if it was tied to GCL, reasonably high (I currently use 600ish flags per room for planning) and we had like six months notice.
What I can't do is keep playing a game where the goalposts move, where our code can be broken on us at any time without notice, and where the devs will make massive game breaking changes with nothing even resembling reasonable notice or input from the community.
-
You’ve had multiple suggestions from a few people, including myself, on how to reduce server.
I would be in favor of replacing big parts of the server side logic by native code, but hell, even in js, there a lot of hanging fruits.
It is not about server side logic. Your game script should be provided with real Flag objects, it is what API conventions promise. In order to provide you with a bazillion of flags (which are free), it has to create a bazillion of Javascript objects.
the proposal on PTR is usually not definitive.
Exactly, proposals is what the PTR forum is for.
-
Art, I'm not arguing against putting a limit on the names of flags. I'm arguing about you dumping the CPU usage on us.
I did a quick check and I don't think i have anything higher than 55 characters in any of my flag names, so that change should not have any affect on me.
-
For the case with flag names being several KB, restricting the length would help that. (I would say 50characters should be plenty, at least for my uses)
For PTR, maybe have an option where it imports the user's rooms when the user activates PTR? That way the entire world doesn't need to be cloned.