Search found 263 matches

by pleegwat
Sat Sep 16, 2017 12:14 pm
Forum: News
Topic: Friday Facts #208 - Tips and tricks improvement
Replies: 58
Views: 25715

Re: Friday Facts #208 - Tips and tricks improvement

Regarding the problem that no-one reads the tips and tricks, one possible solution is to add a tip to the loading screen at the start of the game. (Obviously I'm meaning a different tip each time the game loads). +1, putting tips on a loading screen is standard game design now. Our loading screen i...
by pleegwat
Sun Sep 10, 2017 10:24 am
Forum: News
Topic: Friday Facts #199 - The story of tile transitions
Replies: 51
Views: 27867

Re: Friday Facts #199 - The story of tile transitions

That solves the landfill cheat, but that's just as easily solved by deducting multiple landfill if the tile correction logic needs to add additional land tiles.

You still need tile correction logic during normal world generation.
by pleegwat
Fri Sep 08, 2017 7:57 pm
Forum: News
Topic: Friday Facts #207 - Lua noise specification
Replies: 45
Views: 24875

Re: Friday Facts #207 - Lua noise specification

It seems to me that a relatively easy way to resolve would be to use something like a 4-way flood fill algorithm starting at the player start location and use it to count land tiles surrounding the player above sea level. Maybe allow the player to set the value. For example a value of 40,000 would ...
by pleegwat
Fri Sep 01, 2017 4:34 pm
Forum: News
Topic: Friday Facts #205 - Teaching the things that everybody knows
Replies: 110
Views: 49469

Re: Friday Facts #205 - Teaching the things that everybody knows

And underground belt upgrades aren't bidirectional either.
by pleegwat
Thu Aug 24, 2017 5:08 pm
Forum: News
Topic: Friday Facts #204 - Another day, another optimisation
Replies: 93
Views: 40152

Re: Friday Facts #204 - Another day, another optimisation

@Max, you don't want to do that. The cost of the unaligned access of your double member (especially if it happens to cross a cache line boundary) is more expensive than the extra bandwidth used from padding.
by pleegwat
Sun Aug 20, 2017 11:32 am
Forum: News
Topic: Friday Facts #201 - 0.15 Stable, but not really
Replies: 148
Views: 52920

Re: Friday Facts #201 - 0.15 Stable, but not really

Regarding optimisations, have you considered using database techniques to optimise out that huge annoyance that is Autosave? A large production database cannot afford to lock up for several minutes every few minutes to write everything to disk; if you use an approach like the redo log stuff in Orac...
by pleegwat
Sun Aug 20, 2017 11:30 am
Forum: News
Topic: Friday Facts #200 - Plans for 0.16
Replies: 129
Views: 65755

Re: Friday Facts #200 - Plans for 0.16

I do agree with you that mrvn's table of waypoints idea sounds a lot like a n^2 problem. That's just space. Computationally, it's travelling salesman, which is NP. I'd hazard it's probably cheaper computationally and more effective to route within the coverage area instead of between explicit robop...
by pleegwat
Sat Aug 19, 2017 10:26 am
Forum: News
Topic: Friday Facts #204 - Another day, another optimisation
Replies: 93
Views: 40152

Re: Friday Facts #204 - Another day, another optimisation

If that pointer is being accessed often, then it is probably in cache. That means the extra indirection itself is relatively cheap, especially if doing things that way results in code that generates more cache hits and lower overall cache misses. But it's still one extra memory region, taking up va...
by pleegwat
Fri Aug 18, 2017 9:02 pm
Forum: News
Topic: Friday Facts #204 - Another day, another optimisation
Replies: 93
Views: 40152

Re: Friday Facts #204 - Another day, another optimisation

Have the developers ever defined what they mean by "large bases" and "mega bases"? It would be useful to know (in terms of number of entities/factories/bots/belts) when reading about how these optimizations are tested and measured. Excellent point. Some people might think a rock...
by pleegwat
Fri Aug 18, 2017 8:21 pm
Forum: News
Topic: Friday Facts #204 - Another day, another optimisation
Replies: 93
Views: 40152

Re: Friday Facts #204 - Another day, another optimisation

I don't know your code of course, and I'm hampered because my experience is C not C++. Depending on the list and the type of removals, I'd wonder if you really need to delete them or can just mark them inactive. If a new entity gets placed on the map (or one gets removed), then yes the list needs t...
by pleegwat
Fri Aug 18, 2017 7:50 pm
Forum: News
Topic: Friday Facts #204 - Another day, another optimisation
Replies: 93
Views: 40152

Re: Friday Facts #204 - Another day, another optimisation

You guys are using... linked lists?... Why, oh why do you use linked lists? It is supposed to be common knowledge that in almost all situations even a straight vector is better. At the very least something like C++'s deque would be better. Tell me how you'd get: O(1) time to turn an entity on/off a...
by pleegwat
Fri Aug 18, 2017 7:28 pm
Forum: News
Topic: Friday Facts #204 - Another day, another optimisation
Replies: 93
Views: 40152

Re: Friday Facts #204 - Another day, another optimisation

Very many entities will be aware ahead of time when they will next need to do work. An assembler doesn't need to do a thing for X ticks until its craft is done. An inserter is doing nothing for Y ticks until its swing is complete. Etc. Even an inserter hovering over a belt can predict to some degre...
by pleegwat
Fri Aug 18, 2017 7:04 pm
Forum: News
Topic: Friday Facts #204 - Another day, another optimisation
Replies: 93
Views: 40152

Re: Friday Facts #204 - Another day, another optimisation

A linked list of multiply-inheriting classes? I'd have expected an array of structs. I'm surprised to. I'd have expected C++ to handle virtual function calls and inheritance at compile-time, but apparently things are setup so that some of the required class structure isn't known until run-time? Thi...
by pleegwat
Fri Aug 18, 2017 6:18 pm
Forum: News
Topic: Friday Facts #204 - Another day, another optimisation
Replies: 93
Views: 40152

Re: Friday Facts #204 - Another day, another optimisation

A linked list of multiply-inheriting classes? I'd have expected an array of structs.
by pleegwat
Sat Aug 12, 2017 5:05 pm
Forum: News
Topic: Friday Facts #203 - Logistic buffer chest
Replies: 152
Views: 71221

Re: Factorio Friday Friday Facts #203 - Logistic buffer chest

Let's imagine the following scenario: Bots are removing/placing rails which changes the rail network causing rerouting. On your beefy 8-core machine the recalculation happens immediately, a train repaths and goes his merry way. A bot places another rail piece. On your friend's lowly 2-core machine,...
by pleegwat
Tue Aug 01, 2017 3:47 pm
Forum: News
Topic: Friday Facts #201 - 0.15 Stable, but not really
Replies: 148
Views: 52920

Re: Friday Facts #201 - 0.15 Stable, but not really

Since this magic free copying ability doesn't even exist, you would actually be adding more work so saving would be more painful overall. I never said the fast copy would be free, I said it would be many times faster than the existing copy, allowing the pause time to be reduced by that same factor,...
by pleegwat
Mon Jul 31, 2017 4:40 pm
Forum: News
Topic: Friday Facts #201 - 0.15 Stable, but not really
Replies: 148
Views: 52920

Re: Save in the background

I'm always annoyed when trying to do something and the saving dialog pops up. And the more you play the larger the problem becomes because saving takes longer on larger factories. Why not save in the background in a separate thread and let the game keep running? "All" this would need to d...
by pleegwat
Fri Jul 28, 2017 4:49 pm
Forum: News
Topic: Friday Facts #201 - 0.15 Stable, but not really
Replies: 148
Views: 52920

Re: Friday Facts #201 - 0.15 Stable, but not really

Some thoughts on save performance. Firstly, you mentioned a few weeks ago that you were looking into optimizing data structures for item stacks to make certain frequent operations faster. Similar updates may benefit save performance as it needs to go through a lot of data structures. Secondly, you m...
by pleegwat
Sun Jul 09, 2017 10:05 am
Forum: News
Topic: Friday Facts #198 - Rail segment visualisation
Replies: 116
Views: 68807

Re: Friday Facts #198 - Rail segment visualisation

Yet another reason of choosing other hash function: We have only 64bit version of the game, and in 64bit process the CPU can hold 64bits at once in a single register. So by choosing other 64bit hash function you will still be able to compare hash values like numbers (not arrays). This. An algorithm...
by pleegwat
Fri Jul 07, 2017 7:52 pm
Forum: News
Topic: Friday Facts #198 - Rail segment visualisation
Replies: 116
Views: 68807

Re: Friday Facts #198 - Rail segment visualisation

With the T-ends on the rail indicators, they don't really need to be different colors. What is important is the clarity of separation between blocks. Another suggestion for the graphic is to have a rectangular box of the same width as the T you showed, again all the same color. Disagree. Let's take...

Go to advanced search