Alt-F4 #53 - Laziness through Automation

Post all other topics which do not belong to any other category.
AlternativeFFFF
Long Handed Inserter
Long Handed Inserter
Posts: 58
Joined: Fri Aug 28, 2020 12:07 pm
Contact:

Alt-F4 #53 - Laziness through Automation

Post 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/
mrvn
Smart Inserter
Smart Inserter
Posts: 5842
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Alt-F4 #53 - Laziness through Automation

Post 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.
User avatar
mrudat
Fast Inserter
Fast Inserter
Posts: 248
Joined: Fri Feb 16, 2018 5:21 am
Contact:

Re: Alt-F4 #53 - Laziness through Automation

Post 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.
mrvn
Smart Inserter
Smart Inserter
Posts: 5842
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Alt-F4 #53 - Laziness through Automation

Post 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)
Post Reply

Return to “General discussion”