Friday Facts #251 - A Fistful of Frames

Regular reports on Factorio development.
TreefrogGreaken
Long Handed Inserter
Long Handed Inserter
Posts: 60
Joined: Thu May 04, 2017 12:07 pm
Contact:

Re: Friday Facts #251 - A Fistful of Frames

Post by TreefrogGreaken »

Loving the benchmarks!

Would love to see this as a part of the game. Think Factorio would make a great tool for benching CPUs, would be nice so we Factorioneers could compare our PCs :D
Amarula
Filter Inserter
Filter Inserter
Posts: 542
Joined: Fri Apr 27, 2018 1:29 pm
Contact:

Re: Friday Facts #251 - A Fistful of Frames

Post by Amarula »

TreefrogGreaken wrote: so we Factorioneers
Factorioneer is good, relates to starting off with very little and building a home like the pioneers...
Given that the game is ostensibly all about the rocket launch, I think Factorionaut might be better :D
Anybody else have a name you use?
My own personal Factorio super-power - running out of power.
User avatar
Oktokolo
Filter Inserter
Filter Inserter
Posts: 884
Joined: Wed Jul 12, 2017 5:45 pm
Contact:

Re: Friday Facts #251 - A Fistful of Frames

Post by Oktokolo »

Amarula wrote:
TreefrogGreaken wrote: so we Factorioneers
Factorioneer is good, relates to starting off with very little and building a home like the pioneers...
Given that the game is ostensibly all about the rocket launch, I think Factorionaut might be better :D
Anybody else have a name you use?
This game is all about conquering an unknown planet by force to grab resources from the natives to feed an ever-increasing factory, constantly requiring more and more resources and destroying the environment by pollution. Most players do not leave the planet after getting to the space age. So it probably is the most american game ever made.
I always think of myself more as some military guy having access to some glitterworld tech that makes it possible to "hand"-craft the stuff needed to get a fully autonomous base going that provides the needed military and research to secure and advance a global mining operation.
They selected me because i would just do what needs to be done without breacking down due to loneliness or moral conflicts. Most citizen of the united planets do not know where all the resources for our huge war fleet come from - and they don't want to know...
So i get dropped on a planet in my autonomous high-tech space suit and conquer another world as a source for precious resources (the fauna and flora obviously does not count as resource) to feed our eternal fight to bring our freedom, democracy and prosperity to all the worlds of the universe. We are human and i am a conqueror.
Would i be no conqueror, i would be a locust - and who wants to be that... ;)
SN222
Manual Inserter
Manual Inserter
Posts: 1
Joined: Tue Jul 17, 2018 1:51 pm
Contact:

Re: Friday Facts #251 - A Fistful of Frames

Post by SN222 »

If you are in Prague this summer, and wanting to satiate your Factorio cravings...
No! Bad timing. I visited Prague last month June 30th with my girlfriend.
I even convinced here of visiting your office:
Factorio Fanboy incoming...
Anyway, breathtaking city.
Pls consider another party event (maybe for 1.0?), we would love to participate. :)
Paul17041993
Inserter
Inserter
Posts: 36
Joined: Fri Nov 25, 2016 4:26 am
Contact:

Re: Friday Facts #251 - A Fistful of Frames

Post by Paul17041993 »

Jap2.0 wrote:
Paul17041993 wrote:Now to upgrade the entire sprite system to openCL, and probably everything else eventually...

On a more serious note, has vulkan been considered as an even better latency and performance jump for modern hardware? particularly integrated GPUs and/or in laptops where less CPU use has a positive impact on battery life, as well as better performance in general. AMD has a simplified vulkan front-end you could use which should work on all hardware and platforms (other than OSX).
Yeah, they're planning on adding support for other APIs eventually - see FFF 244 (and the associated forum thread).
Silly me not noticing vulkan was confirmed a few posts above as well, thanks mate.
Please be sure you've googled your question before asking me about code... :T
mbernardi
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Jan 29, 2018 1:19 pm
Contact:

Re: Friday Facts #251 - A Fistful of Frames

Post by mbernardi »

Does anybody know if there is going to be some merch to buy or some dev to say hello on the NTK library?

I'm visiting Prague the 23rd and I'm considering going to the library a minute (I only have one day to visit the city so I don't have much time)
User avatar
cpy
Filter Inserter
Filter Inserter
Posts: 839
Joined: Thu Jul 31, 2014 5:34 am
Contact:

Re: Friday Facts #251 - A Fistful of Frames

Post by cpy »

When will we get this new render engine to game?
Koub
Global Moderator
Global Moderator
Posts: 7774
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Friday Facts #251 - A Fistful of Frames

Post by Koub »

cpy wrote:When will we get this new render engine to game?
Somewhere within 0.17.x
Koub - Please consider English is not my native language.
Dergonic
Inserter
Inserter
Posts: 44
Joined: Mon Jun 06, 2016 8:56 am
Contact:

Re: Friday Facts #251 - A Fistful of Frames

Post by Dergonic »

Koub wrote:
cpy wrote:When will we get this new render engine to game?
Somewhere within 0.17.x
And when will we get 0.17 ?


... No don't hit, I'm already outside ...
nuhll
Filter Inserter
Filter Inserter
Posts: 937
Joined: Mon Apr 04, 2016 9:48 pm
Contact:

Re: Friday Facts #251 - A Fistful of Frames

Post by nuhll »

This really doesnt tell me much.

Ok, it seems nearly double so fast. But how much FPS is it? Thats something that normal users care about.
User avatar
Durabys
Fast Inserter
Fast Inserter
Posts: 236
Joined: Mon Apr 18, 2016 3:30 pm
Contact:

Re: Friday Facts #251 - A Fistful of Frames

Post by Durabys »

Klonan wrote:
Tomik wrote:
How long will the LANfest take? Will it end before midnight or in the morning? When please. Thanks.
The library closes at 22:00, so it will have to end then

I am not sure how long we will stay there
Thanks!
Maugan
Manual Inserter
Manual Inserter
Posts: 2
Joined: Wed May 16, 2018 7:43 pm
Contact:

Re: Friday Facts #251 - A Fistful of Frames

Post by Maugan »

Good Grief, you guys are such enormous nerds!

I'm not going to pretend I understood much of this but it was a really interesting read anyways. I think it's really neat to get "under the hood" development insights like this.
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Friday Facts #251 - A Fistful of Frames

Post by bobingabout »

Dergonic wrote:And when will we get 0.17 ?
when it's ready.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5266
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Friday Facts #251 - A Fistful of Frames

Post by Klonan »

mbernardi wrote:Does anybody know if there is going to be some merch to buy or some dev to say hello on the NTK library?

I'm visiting Prague the 23rd and I'm considering going to the library a minute (I only have one day to visit the city so I don't have much time)
We won't have any merchandise to sell at the library, but we will be there playing the game from 16:00, you can come say hello
mrvn
Smart Inserter
Smart Inserter
Posts: 5844
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Friday Facts #251 - A Fistful of Frames

Post by mrvn »

So 16:00 - 22:00. That will make it hard to start a rocket but not impossible.
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5207
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Friday Facts #251 - A Fistful of Frames

Post by eradicator »

mrvn wrote:So 16:00 - 22:00. That will make it hard to start a rocket but not impossible.
The correct thing to do would be to go there in the morning, so that you can launch the welcoming fireworks at exactly 16:00 ;).
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
User avatar
Light
Filter Inserter
Filter Inserter
Posts: 678
Joined: Mon Oct 10, 2016 6:19 pm
Contact:

Re: Friday Facts #251 - A Fistful of Frames

Post by Light »

mrvn wrote:So 16:00 - 22:00. That will make it hard to start a rocket but not impossible.
Achievement: Launched a rocket in under 6 hours at Prague.

Prepare your blueprints ahead of time and you should be fine.
Vandroiy
Burner Inserter
Burner Inserter
Posts: 18
Joined: Fri Dec 15, 2017 9:54 pm
Contact:

Re: Friday Facts #251 - A Fistful of Frames

Post by Vandroiy »

posila wrote:It seems to me you implemented a particle system, and articles about particle systems were great source of information for us, but we have needs for more generic sprite drawing. For example we need to be able to control per sprite scale (independently for x and y axis), rotation, arbitrary cut-out from any sprite, and tint. Need to change blend modes and effects per sprite, etc. So I don't even dream to be able to compare ourselves with particle systems.
I actually have most of these. Per sprite scale: check, rotation: check, arbitrary cut-out: not sure what you mean, but sprite selection is texture page and any rectangle from it, tint: check (if it refers to the ability to multiply a color into the whole thing). To be able to batch everything, all sprites get drawn with these features.

Change blend mode and effects: well, of course you cannot change shaders or global GPU state or something. But that's generally not possible when batching, is it?

It's strange to me to call my hybrid "only" a particle system, because it has draw-enqueue methods for particles and non-particles, where the latter upload most of their drawing data anew each frame. It renders both combined via batched draw calls (plus similarly batched compute shader calls to mass-copy uploaded changes into place in VRAM).
Paul17041993
Inserter
Inserter
Posts: 36
Joined: Fri Nov 25, 2016 4:26 am
Contact:

Re: Friday Facts #251 - A Fistful of Frames

Post by Paul17041993 »

Vandroiy wrote:But that's generally not possible when batching, is it?
Only if you do separate batch queues/objects for each alpha stage, which is a pretty common method. With vulkan/compute however you can do some custom shenanigans depending on what you want, particularly if you make use of concurrent buffer baking in some way.(eg; draw the non-overlapping ground tiles into the main buffer all at the same time, alpha in the context of compute is simply an if-block with a buffer read)
Please be sure you've googled your question before asking me about code... :T
posila
Factorio Staff
Factorio Staff
Posts: 5341
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Friday Facts #251 - A Fistful of Frames

Post by posila »

Vandroiy wrote:It's strange to me to call my hybrid "only" a particle system, because it has draw-enqueue methods for particles and non-particles, where the latter upload most of their drawing data anew each frame. It renders both combined via batched draw calls (plus similarly batched compute shader calls to mass-copy uploaded changes into place in VRAM).
You didn't say what was purpose of what you did, or how it was used, and from the description it seemed like particle system to me. I don't think particle systems are easy to do, they just usually have more focused purpose than general 2D rendering engine, so the best possible solution for one might not perform well enough or other. We are not making general 2D rendering engine, though, we are making it very specific for Factorio, which opens up more optimization opportunities. We have not benchmarked what is maximum number of sprite it draw in general.
Vandroiy wrote:Change blend mode and effects: well, of course you cannot change shaders or global GPU state or something. But that's generally not possible when batching, is it?
Point I was trying to make is I don't even hope to compete with you in maximum number of CPU-pushed sprites per frame, because we currently have several hundred draw calls, as opposed to just a few draw calls in whatever you were doing (when I was assuming you were talking about particle system).

You said you were confused the topic was performance on 25k sprites. I wanted to explain why we showed benchmark of game scene with 25k sprites (because it represent normal gameplay), that the engine can push up to 300k sprites per frame on modern hardware and that it probably is not comparable with whatever you did. In the original article, I have already acknowledged that what you described (or something similar) is probably the best way to draw sprites
It seems the best way to do point sprites is to use a constant buffer or texture buffer to pass point data to a vertex shader, and expand points into quads there. But at this time we already have all the optimizations mentioned in the first part, and the CPU part of rendering is now fast enough that we have put the point sprite idea on ice the for time being.
You probably used SSBO instead of texture buffer, but that is not available to use because we are targeting OpenGL 3.3
Post Reply

Return to “News”