Friday Facts #251 - A Fistful of Frames

Regular reports on Factorio development.
TreefrogGreaken
Inserter
Inserter
Posts: 27
Joined: Thu May 04, 2017 12:07 pm

Re: Friday Facts #251 - A Fistful of Frames

Post by TreefrogGreaken » Mon Jul 16, 2018 12:18 pm

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
Long Handed Inserter
Long Handed Inserter
Posts: 55
Joined: Fri Apr 27, 2018 1:29 pm

Re: Friday Facts #251 - A Fistful of Frames

Post by Amarula » Mon Jul 16, 2018 2:15 pm

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?

User avatar
Oktokolo
Filter Inserter
Filter Inserter
Posts: 318
Joined: Wed Jul 12, 2017 5:45 pm

Re: Friday Facts #251 - A Fistful of Frames

Post by Oktokolo » Mon Jul 16, 2018 7:32 pm

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

Re: Friday Facts #251 - A Fistful of Frames

Post by SN222 » Tue Jul 17, 2018 2:02 pm

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. :)
Attachments
IMG_0529.JPG
IMG_0529.JPG (91.95 KiB) Viewed 959 times

Paul17041993
Inserter
Inserter
Posts: 31
Joined: Fri Nov 25, 2016 4:26 am

Re: Friday Facts #251 - A Fistful of Frames

Post by Paul17041993 » Wed Jul 18, 2018 1:02 am

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

Re: Friday Facts #251 - A Fistful of Frames

Post by mbernardi » Wed Jul 18, 2018 6:41 am

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: 743
Joined: Thu Jul 31, 2014 5:34 am

Re: Friday Facts #251 - A Fistful of Frames

Post by cpy » Wed Jul 18, 2018 12:07 pm

When will we get this new render engine to game?

Koub
Global Moderator
Global Moderator
Posts: 3743
Joined: Fri May 30, 2014 8:54 am

Re: Friday Facts #251 - A Fistful of Frames

Post by Koub » Wed Jul 18, 2018 1:28 pm

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: 40
Joined: Mon Jun 06, 2016 8:56 am

Re: Friday Facts #251 - A Fistful of Frames

Post by Dergonic » Wed Jul 18, 2018 1:38 pm

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: 577
Joined: Mon Apr 04, 2016 9:48 pm

Re: Friday Facts #251 - A Fistful of Frames

Post by nuhll » Wed Jul 18, 2018 2:11 pm

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
Tomik
Fast Inserter
Fast Inserter
Posts: 180
Joined: Mon Apr 18, 2016 3:30 pm

Re: Friday Facts #251 - A Fistful of Frames

Post by Tomik » Wed Jul 18, 2018 8:02 pm

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!
ImageImage

Maugan
Manual Inserter
Manual Inserter
Posts: 2
Joined: Wed May 16, 2018 7:43 pm

Re: Friday Facts #251 - A Fistful of Frames

Post by Maugan » Wed Jul 18, 2018 8:06 pm

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: 5912
Joined: Fri May 09, 2014 1:01 pm

Re: Friday Facts #251 - A Fistful of Frames

Post by bobingabout » Thu Jul 19, 2018 8:03 am

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.

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 3232
Joined: Sun Jan 11, 2015 2:09 pm

Re: Friday Facts #251 - A Fistful of Frames

Post by Klonan » Thu Jul 19, 2018 1:34 pm

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: 2484
Joined: Mon Sep 05, 2016 9:10 am

Re: Friday Facts #251 - A Fistful of Frames

Post by mrvn » Thu Jul 19, 2018 1:53 pm

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: 2279
Joined: Tue Jul 12, 2016 9:03 am

Re: Friday Facts #251 - A Fistful of Frames

Post by eradicator » Thu Jul 19, 2018 2:03 pm

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 ;).

User avatar
Light
Filter Inserter
Filter Inserter
Posts: 401
Joined: Mon Oct 10, 2016 6:19 pm

Re: Friday Facts #251 - A Fistful of Frames

Post by Light » Fri Jul 20, 2018 7:15 am

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: 17
Joined: Fri Dec 15, 2017 9:54 pm

Re: Friday Facts #251 - A Fistful of Frames

Post by Vandroiy » Fri Jul 20, 2018 9:22 am

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: 31
Joined: Fri Nov 25, 2016 4:26 am

Re: Friday Facts #251 - A Fistful of Frames

Post by Paul17041993 » Fri Jul 20, 2018 10:35 am

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: 2675
Joined: Thu Jun 11, 2015 1:35 pm

Re: Friday Facts #251 - A Fistful of Frames

Post by posila » Fri Jul 20, 2018 4:37 pm

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”