Friday Facts #281 - For a Few Frames More

Regular reports on Factorio development.
User avatar
dog80
Filter Inserter
Filter Inserter
Posts: 289
Joined: Thu Dec 08, 2016 11:57 pm
Contact:

Re: Friday Facts #281 - For a Few Frames More

Post by dog80 »

Acid_Burn9 wrote: Sat Feb 09, 2019 8:40 am Turret range visualization optimized? Great, but look at this!
That's what really should be optimized lol.
This is the same principle i think this will be better then as well
posila
Factorio Staff
Factorio Staff
Posts: 5409
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Friday Facts #281 - For a Few Frames More

Post by posila »

Acid_Burn9 wrote: Sat Feb 09, 2019 8:40 am Turret range visualization optimized? Great, but look at this!
That's what really should be optimized lol.
dog80 wrote: Sat Feb 09, 2019 9:14 am This is the same principle i think this will be better then as well
This particular performance issue was also fixed, but differently: 60659
Since roboport ranges are rectangular, it's pretty cheap to find union of rectangles on CPU and draw it without any overdraw. We were already doing that in normal view, but weren't in map view.
User avatar
Acid_Burn9
Inserter
Inserter
Posts: 34
Joined: Sat Feb 09, 2019 8:17 am
Contact:

Re: Friday Facts #281 - For a Few Frames More

Post by Acid_Burn9 »

posila wrote: Sat Feb 09, 2019 9:36 am This particular performance issue was also fixed, but differently: 60659
Since roboport ranges are rectangular, it's pretty cheap to find union of rectangles on CPU and draw it without any overdraw. We were already doing that in normal view, but weren't in map view.
Good to hear that.

Also was wondering is there any plans to rework this part of the UI? Im not able to see everything, stored in my network. It just goes below the screen. Making UI smaller isnt helping much - everything becomes too small. Maybe some slider to let us scroll this list or something like that?
Attachments
Снимок экрана (419).png
Снимок экрана (419).png (1.32 MiB) Viewed 8478 times
posila
Factorio Staff
Factorio Staff
Posts: 5409
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Friday Facts #281 - For a Few Frames More

Post by posila »

Light wrote: Fri Feb 08, 2019 10:49 pm Vanilla without mods loaded in 15 seconds by default and became 7 seconds with the cache enabled. The atlas cache was then created as a 2.38GB file in the Factorio folder.

Enabling my mods it went from 1:37 load time to 1:13. The atlas cache file was 5.94GB.

Those who use mods would need the most improvement compared to the slimmer vanilla. However, given the large file it creates just for a rather lackluster improvement, I'd be hard pressed to recommend that being active by default unless you're getting 5 minute load times (mostly due to sprites) and have an SSD to make the process remotely worthwhile.
Philip017 wrote: Sat Feb 09, 2019 12:39 am vanilla with out mods for me 18 seconds to launch with out cache, with cache 5 seconds.
the file 'atlas-cache.dat' consumes 2.38gb on my drive, located at '%appdata%/factorio' i feel it is easily sacrificed for 13 seconds of launch time.
an option to enable this, in the options menu under graphics, would be nice instead of digging into the config file i never knew about till today.
if this option was enabled by default then more disk space would be used true, however imo most people i doubt they would even notice it missing. but anyone that launches the game repeatably will notice the launch speed difference, if they only knew about it.
quyxkh wrote: Sat Feb 09, 2019 1:25 am On my HDD box:

cold OS cache, no sprite atlas, seablock, Sprites Loaded at 32.164 sec. Hot cache, 19.923 sec.
cold OS cache, sprite atlas, seablock, Sprites Loaded at 39.854 sec. Hot cache, 13.933 sec.

cold OS cache, no sprite atlas, vanilla, Sprites Loaded at 23.098 sec. Hot cache, 12.269 sec.
cold OS cache, sprite atlas, vanilla, Sprites Loaded at 25.036 sec. Hot cache, 7.110 sec.
I added the option few years ago for development purposes. Back than the game was loading for over 20 seconds on our computers and it was kind of tidious to wait when we were launching the game tens or maybe even 100 times a day.
My tests showed the game loads pretty much at the same time with atlas-cache enabled but cold filesystem cache, as without atlas-cache, so I decided it wasn't really worth polishing and supporting the feature. From my perspective, people launch the game multiple times in a row (to get benefit from atlas cache being in filesystem cache) are either installing/reconfiguring mods - so their loading time would get worse, as the game would have to build new atlases due to configuration changes AND in addition save the atlases to disk. Or, they are modders who are working on a mod, and they will hopefully find out about the option from wiki or from other mod developers.

So what I mean by polish. If I install 1 GB game on my D: drive, it is unacceptable for it to generate 2+ GB file on my system drive (and quite questionable why it needs so much extra space, in the first place). So, the should be also option to choose where do you want to have it. (We can't really save it always to the Factorio folder, because if you install DRM-free version to Program Files, the game would need to run with administrator rights). The feature needs to handle out-of-space errors gracefully, and other possible IO errors. What if mods blow the cache up over 4GB? Can I assume it is always possible to have files larger than 4GB, or do I need to handle that and split the cache to multiple files? Furthermore, some graphics drivers just crash when I try to load atlases directly from the cache, so we would need to workaround that also.
quyxkh wrote: Sat Feb 09, 2019 1:25 am Time to read the seablock atlas from disk is 22.5s. The time to decompress a `zstd -1`'d seablock atlas from disk to tmpfs (basically, ram disk) is 6 seconds flat. I'll keep saying it: `zstd -1`ing the atlas caches would get a really dramatic startup-speed boost, even on SSDs.
I've remembered your original post and did some tests. Vanilla atlases with high quality texture compression enabled shrink down from 1 GB to ~350 MB, which is not such an outrageous size to store in AppData; + it could be good to use zstd to compress RAM copy of virtual atlas tiles for texture streaming. But that is more speed sensitive use case so perhaps even faster compression (i.e. LZ4) would be needed for that.
luc
Fast Inserter
Fast Inserter
Posts: 229
Joined: Sun Jul 17, 2016 9:53 pm
Contact:

Re: Friday Facts #281 - For a Few Frames More

Post by luc »

Acid_Burn9 wrote: Sat Feb 09, 2019 10:22 am is there any plans to rework this part of the UI? Im not able to see everything, stored in my network. It just goes below the screen. Making UI smaller isnt helping much - everything becomes too small. Maybe some slider to let us scroll this list or something like that?
Yeah this is a bug that should long have been fixed. Now that they UI seems to be completely overhauled (maybe not the icons, but at least all the panels should be), I do expect they found a solution for it. A scrollbar would be hard because the panel usually disappears when you stop hovering, so they probably found something else.

Just to make sure: do you know about the logistics network screen? It's opened by pressing L by default. You can scroll and even search in that menu.
User avatar
Acid_Burn9
Inserter
Inserter
Posts: 34
Joined: Sat Feb 09, 2019 8:17 am
Contact:

Re: Friday Facts #281 - For a Few Frames More

Post by Acid_Burn9 »

luc wrote: Sat Feb 09, 2019 10:42 am Just to make sure: do you know about the logistics network screen? It's opened by pressing L by default. You can scroll and even search in that menu.
Yes i do. But it still not that convenient as the panel we are talking about.
luc
Fast Inserter
Fast Inserter
Posts: 229
Joined: Sun Jul 17, 2016 9:53 pm
Contact:

Re: Friday Facts #281 - For a Few Frames More

Post by luc »

JD-Plays wrote: Sat Feb 09, 2019 2:09 am Can we please have that [sprite atlas cache feature] as a toggle option inside the new and improved GUI?
Does it improve startup speed for you? Note that you should try with a cold filesystem cache to simulate how one would usually start it. The operating system keeps anything it reads from disk (or ssd) in memory until it needs the space for something else (that's why more RAM makes your computer faster instead of only allowing you to open more programs at the same time), so if the atlas is already partially (or fully) in memory, then factorio will obviously start faster. But (as posila said), how often do you start factorio when you were playing it recently enough for it still to be in cache? If you want to test if it makes a difference when the OS did not yet cache it, the easiest way is probably to reboot in between to ensure a cold cache:

1. Enable cache in config
2. Start factorio so it can build the cache
3. Reboot and wait a certain time after logging in, until you think it's done loading everything (e.g. 60 seconds)
4. Start factorio and look in the log file how long it took
5. Disable the cache in config
6. Reboot and wait the same amount of time after logging in
7. Start factorio and look in the log file how long it took

So now you have exactly *one* test case for each scenario, which isn't great. If you want to do slightly better science:

8. Reboot and wait the same amount of time after logging in
9. Start factorio and look in the log file how long it took

Now you have two test cases for one of them, so you have some estimate of the variability. Let's say the results of steps 7 and 9 were 12 seconds and 13.5 seconds, so you can safely assume that 1.5 seconds is just random and not the result of any change you made. Knowing that, step 4 should have resulted in significantly more than 1.5 seconds before you can safely say it really made a difference. And then you have to wonder if that difference is even large enough to warrant the extra disk space (which can be gigabytes for some people).

For me, it hardly improves startup time even with a warm cache (no reboots). The improvement is close to the usual variation, and I haven't even tested with a cold cache (it was already clear to me that it's not worth it).

Acid_Burn9 wrote: Sat Feb 09, 2019 10:49 am
luc wrote: Sat Feb 09, 2019 10:42 am Just to make sure: do you know about the logistics network screen? It's opened by pressing L by default. You can scroll and even search in that menu.
Yes i do. But it still not that convenient as the panel we are talking about.
Agreed!
AndrewIRL
Fast Inserter
Fast Inserter
Posts: 240
Joined: Fri Mar 24, 2017 2:17 pm
Contact:

Re: Friday Facts #281 - For a Few Frames More

Post by AndrewIRL »

We also included a result from one high-performance GPU (GeForce GTX 980 4GB), but this was ran in 4K resolution (3840x2160) as opposed to FullHD.
This is particularly relevant to me as a 980 GTX (non-Ti) on 4K is exactly what I run. Good benchmark choice. Glad to see high res will still be viable for me.
TackleMcClean
Burner Inserter
Burner Inserter
Posts: 11
Joined: Fri Jan 25, 2019 8:10 pm
Contact:

Re: Friday Facts #281 - For a Few Frames More

Post by TackleMcClean »

Acid_Burn9 wrote: Sat Feb 09, 2019 10:22 am Also was wondering is there any plans to rework this part of the UI? Im not able to see everything, stored in my network. It just goes below the screen. Making UI smaller isnt helping much - everything becomes too small. Maybe some slider to let us scroll this list or something like that?
You can also press L meanwhile.
I agree though, that list/preview makes only sense for a short while (when your stock is low). Once you put lots of stuff in the network it becomes unviewable.

Not sure how this works together with multiple different networks (hitting L, I mean).
User avatar
Yokmp
Inserter
Inserter
Posts: 29
Joined: Tue Aug 23, 2016 10:30 am
Contact:

Re: Friday Facts #281 - For a Few Frames More

Post by Yokmp »

posila wrote: Sat Feb 09, 2019 10:23 am So what I mean by polish. If I install 1 GB game on my D: drive, it is unacceptable for it to generate 2+ GB file on my system drive (and quite questionable why it needs so much extra space, in the first place). So, the should be also option to choose where do you want to have it. (We can't really save it always to the Factorio folder, because if you install DRM-free version to Program Files, the game would need to run with administrator rights). The feature needs to handle out-of-space errors gracefully, and other possible IO errors. What if mods blow the cache up over 4GB? Can I assume it is always possible to have files larger than 4GB, or do I need to handle that and split the cache to multiple files? Furthermore, some graphics drivers just crash when I try to load atlases directly from the cache, so we would need to workaround that also.
I tested it with my Bob&Angel Installtion (I used the zip from the Download Section) and it went from "Well, let's take a nap" to "Warp 10" on a pretty old SSD.
I think it is worth the time to polish this feature. Especially for People with huge Mods/Modpacks installed.
Maybe it's possible to make it somehow exclusive for Mods or even optionally only large Mods?
User avatar
5thHorseman
Smart Inserter
Smart Inserter
Posts: 1193
Joined: Fri Jun 10, 2016 11:21 pm
Contact:

Re: Friday Facts #281 - For a Few Frames More

Post by 5thHorseman »

Acid_Burn9 wrote: Sat Feb 09, 2019 10:49 am
luc wrote: Sat Feb 09, 2019 10:42 am Just to make sure: do you know about the logistics network screen? It's opened by pressing L by default. You can scroll and even search in that menu.
Yes i do. But it still not that convenient as the panel we are talking about.
With convenience comes lack of features. With more features comes more inconvenience.
Quarnozian
Inserter
Inserter
Posts: 32
Joined: Tue May 01, 2018 7:24 pm
Contact:

Re: Friday Facts #281 - For a Few Frames More

Post by Quarnozian »

The noisy BC3 compression reminds me of Radar View. :lol:

Good work on these optimizations. It's nice to see devs that care enough to bring the best quality graphics even to the lowliest of GPUs. I remember the days of trying to run games on a $40 gpu. Most of the games I played back then still ran terribly even on the absolute lowest settings if I kept it at 1080p resolution.
Fahrradkette
Inserter
Inserter
Posts: 45
Joined: Thu Aug 27, 2015 4:37 pm
Contact:

Re: Friday Facts #281 - For a Few Frames More

Post by Fahrradkette »

If one builds or buys a PC for Factorio to run megabases, how would the specs be weighted?

CPU
- frequency
- cores
- threads
- branch predicting / speculative execution (I'd build a Kernel with spectre mitigations turned off)

CPU caches
- latencies
- frequencies
- sizes
- associativies

Main memory
- latency
- frequency
- size

If disabling eye-candy is an option (sorry graphic designers), could one get away with not having a dedicated GPU without performance impact?
Sander_Bouwhuis
Filter Inserter
Filter Inserter
Posts: 292
Joined: Mon Dec 07, 2015 10:45 pm
Contact:

Re: Friday Facts #281 - For a Few Frames More

Post by Sander_Bouwhuis »

1.
As a GTX-660 owner I'm glad to see this benchmark and seeing it remains (more) playable in v0.17.

2.
I also turned on the cache to disk feature to speed things up. My mother-in-law's computer (I gave her my old computer) really started quite a bit faster with the cache file on (I put an SSD in her machine). So, thanks for that!
luc
Fast Inserter
Fast Inserter
Posts: 229
Joined: Sun Jul 17, 2016 9:53 pm
Contact:

Re: Friday Facts #281 - For a Few Frames More

Post by luc »

Fahrradkette wrote: Sat Feb 09, 2019 5:44 pmIf disabling eye-candy is an option (sorry graphic designers), could one get away with not having a dedicated GPU without performance impact?
I would also really like such an option. Currently, my game runs at about 25-28fps (so everything moves at less than 50% speed) which is a pretty big pain in the bum. I turn off science and only let a few things run on demand (like robot frames, modules, etc.), and that way I can reach just barely 60fps. (A new game runs fine, of course.) If I could just configure it to drop two out of three frames and have the engine run at 60Hz and my screen updating at 20Hz, that would be fine.

A simple graphics mode would probably also help a lot, a little like "simple items" in OpenArena. This is what crates normally look like: https://vignette.wikia.nocookie.net/ope ... rson_1.jpg And these are the simple items: https://vignette.wikia.nocookie.net/ope ... tems_1.jpg From the 3d models, it should be possible to algorithmically take a few defining lines (compile-time) and make svg files from them (a lot of sprites can fit in a few kilobytes), and you can enable them by starting `factorio.exe --potato-mode=enabled`, that would help a lot for people that either want to run really huge bases or those who really just have a potato as a computer.
WarpZone
Inserter
Inserter
Posts: 46
Joined: Mon Feb 13, 2017 9:39 pm
Contact:

Re: Friday Facts #281 - For a Few Frames More

Post by WarpZone »

What if we like using the older, low-rez textures for nostalgia reasons?
Zavian
Smart Inserter
Smart Inserter
Posts: 1650
Joined: Thu Mar 02, 2017 2:57 am
Contact:

Re: Friday Facts #281 - For a Few Frames More

Post by Zavian »

luc wrote: Sat Feb 09, 2019 8:15 pm
Fahrradkette wrote: Sat Feb 09, 2019 5:44 pmIf disabling eye-candy is an option (sorry graphic designers), could one get away with not having a dedicated GPU without performance impact?
I would also really like such an option. Currently, my game runs at about 25-28fps (so everything moves at less than 50% speed) which is a pretty big pain in the bum. I turn off science and only let a few things run on demand (like robot frames, modules, etc.), and that way I can reach just barely 60fps. (A new game runs fine, of course.) If I could just configure it to drop two out of three frames and have the engine run at 60Hz and my screen updating at 20Hz, that would be fine.

A simple graphics mode would probably also help a lot, a little like "simple items" in OpenArena. This is what crates normally look like: https://vignette.wikia.nocookie.net/ope ... rson_1.jpg And these are the simple items: https://vignette.wikia.nocookie.net/ope ... tems_1.jpg From the 3d models, it should be possible to algorithmically take a few defining lines (compile-time) and make svg files from them (a lot of sprites can fit in a few kilobytes), and you can enable them by starting `factorio.exe --potato-mode=enabled`, that would help a lot for people that either want to run really huge bases or those who really just have a potato as a computer.
The runs at 25-28 fps bit, but runs at 60 fps if you turn off science sounds like your base has got so large that your cpu is can only run it at 25-28ups, unless large sections of the base are inactive (eg science off, and backed up). A low detail graphics mode won't fix that. Read the following post viewtopic.php?f=7&t=3638#p299295. Then press f4, and enable show time usage. In order to run at 60 fps, the frame cycle time needs to be 16.6ms. If the update part of the game loops takes longer than this, then no amount of graphics optimisation can fix that. (Small possibility of your computer running out of graphics memory, and the graphics card storing textures in vram, and that causing memory contention that is slowing things down).
plepper1
Long Handed Inserter
Long Handed Inserter
Posts: 83
Joined: Tue May 23, 2017 4:25 pm
Contact:

Re: Friday Facts #281 - For a Few Frames More

Post by plepper1 »

Acid_Burn9 wrote: Sat Feb 09, 2019 10:49 am
luc wrote: Sat Feb 09, 2019 10:42 am Just to make sure: do you know about the logistics network screen? It's opened by pressing L by default. You can scroll and even search in that menu.
Yes i do. But it still not that convenient as the panel we are talking about.
OMG. How is that not in the startup tool tips?

Also: I can't wait for .17!
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Friday Facts #281 - For a Few Frames More

Post by bobingabout »

plepper1 wrote: Sun Feb 10, 2019 6:06 pm Also: I can't wait for .17!
Well, it wasn't announced this FFF about it being released, they said they would announce it at least a week before. However, it is still possible that it could be released by the end of the month if they announce it next week.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
User avatar
Philip017
Filter Inserter
Filter Inserter
Posts: 360
Joined: Thu Sep 01, 2016 11:21 pm
Contact:

Re: Friday Facts #281 - For a Few Frames More

Post by Philip017 »

posila wrote: Sat Feb 09, 2019 10:23 am
I added the option few years ago for development purposes. Back than the game was loading for over 20 seconds on our computers and it was kind of tidious to wait when we were launching the game tens or maybe even 100 times a day.
My tests showed the game loads pretty much at the same time with atlas-cache enabled but cold filesystem cache, as without atlas-cache, so I decided it wasn't really worth polishing and supporting the feature. From my perspective, people launch the game multiple times in a row (to get benefit from atlas cache being in filesystem cache) are either installing/reconfiguring mods - so their loading time would get worse, as the game would have to build new atlases due to configuration changes AND in addition save the atlases to disk. Or, they are modders who are working on a mod, and they will hopefully find out about the option from wiki or from other mod developers.

So what I mean by polish. If I install 1 GB game on my D: drive, it is unacceptable for it to generate 2+ GB file on my system drive (and quite questionable why it needs so much extra space, in the first place). So, the should be also option to choose where do you want to have it. (We can't really save it always to the Factorio folder, because if you install DRM-free version to Program Files, the game would need to run with administrator rights). The feature needs to handle out-of-space errors gracefully, and other possible IO errors. What if mods blow the cache up over 4GB? Can I assume it is always possible to have files larger than 4GB, or do I need to handle that and split the cache to multiple files? Furthermore, some graphics drivers just crash when I try to load atlases directly from the cache, so we would need to workaround that also.
well i can tell you i no longer have to take several deep breaths while i patiently wait for factorio to load, after i have closed and relaunched factorio now many times, it opens in under 2 seconds now, if i blink i miss it. i so wish this was an option in the menu, i would have clicked it along time ago, i have plenty of space on my drive. i install factorio on my C: that is a m2 nvme drive, and it saves it's files in the users folder that is also C: so i get a super speedy launch now. so i can't say enough about adding it to the launch options maybe in the graphics area.

as for polishing it, i would recommend that you try to split the files if there is issues, (bug reports), otherwise leave it alone. if you turn it on default you will get more feedback than if not. you can always give the warning: "Using this feature will add a graphics cache file that will consume a large amount of disk space." but anyone that loves the game will try it and if it works well for them they will appreciate it im sure as much as i do. if you have the time please consider this. thanks again for the great game.

now if only i didn't have to hold my hands together in frustration while the game pauses and takes 30 seconds to save my huge base. totally interrupting my train of thought, or biter attack. i brought this up before but no one seemed to think it was a great idea, but i would really love a 10 seconds to save notification somehow.
Post Reply

Return to “News”