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/
Alt-F4 #53 - Laziness through Automation
-
- Long Handed Inserter
- Posts: 58
- Joined: Fri Aug 28, 2020 12:07 pm
- Contact:
Re: Alt-F4 #53 - Laziness through Automation
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.
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
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.
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
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)