Page 1 of 1

Alt-F4 #53 - Laziness through Automation

Posted: Fri Nov 26, 2021 1:37 pm
by AlternativeFFFF
For the very prime real estate of issue #53 of Alt-F4, grandmaster *Therenas* himself returns to grace us with another article. Following up his previous masterpieces that mostly talk about his own mods, here's more words about exactly those things. Those words explore the topic of automatically taking screenshots in Factorio. Although it's really only about 20% technical details, with 40% philosophy and 50% bad jokes. You read that right, it goes to 110%!

Continue reading: https://alt-f4.blog/ALTF4-53/

Re: Alt-F4 #53 - Laziness through Automation

Posted: Fri Nov 26, 2021 1:47 pm
by mrvn
A mod should have test cases for every configuration and run them as benchmark to see nothing broke on an update. And if you have that you might as well make screenshots from that. Or use interesting setups that you use as screenshot material as test cases first and then add special (uninteresting) setups to test the remaining code paths.

Either way if you add automated testing to your mod then screenshots can be easily made as a side effect. And you improve both the code quality and documentation.

Re: Alt-F4 #53 - Laziness through Automation

Posted: Sat Nov 27, 2021 7:59 am
by mrudat
From the point of view of maximum laziness; reuse the screenshot layouts for main menu scenarios and/or test cases?

Also, I think there's an option to tell factorio to load a map then run for n ticks; though I don't know if you can use graphics in that mode.

Re: Alt-F4 #53 - Laziness through Automation

Posted: Sat Nov 27, 2021 8:17 am
by mrvn
mrudat wrote:
Sat Nov 27, 2021 7:59 am
From the point of view of maximum laziness; reuse the screenshot layouts for main menu scenarios and/or test cases?

Also, I think there's an option to tell factorio to load a map then run for n ticks; though I don't know if you can use graphics in that mode.
There is:

Code: Select all

      --benchmark FILE          load save and run benchmark
      --benchmark-ticks N       number of ticks for benchmarking. Default is
                                1000 (default: 1000)