KirkMcDonald / kirkmcdonald.github.io

Simple web-based calculator for the game Factorio.
Apache License 2.0
547 stars 146 forks source link

Improve rocket launch timing/number of silos calculation #86

Closed Thel89 closed 5 years ago

Thel89 commented 6 years ago

Currently, to produce 1000 science/minute, the calculator suggests you need one rocket silo (x4 P3 modules), with 7 beacons/13 S3 modules: https://kirkmcdonald.github.io/calc.html#rp=4&cp=4&items=space-science-pack:r:1000&ignore=low-density-structure,rocket-fuel,rocket-control-unit,satellite&modules=rocket-part:p3:p3:p3:p3;s3:13

This is incorrect - it's not possible to launch 1 RPM from one silo in a vanilla game, even with 20 beacons (40 S3 modules) around one silo - https://www.youtube.com/watch?v=Tu8hR5t3KCk times it at 1:01 (I don't have a precise tick count, sorry).

https://wiki.factorio.com/Rocket_silo says the rocket launch animation is 2475 ticks, unaffected by speed beacons. Can that be factored into the 'number of silos needed' calculation?

KirkMcDonald commented 6 years ago

Short answer: Yes, this is something I can do.

Finding a useful way to present this information is something I've thought about, off and on, for a while.

The situation is strange: There are, in effect, two recipes happening in the one building at the same time. One is the rocket part recipe, and the other is the rocket launch itself, which produces space science.

Currently, the calculator doesn't try to model anything about the rocket launch recipe, other than its inputs and outputs. Mathematically, we could model the rocket launch as a recipe which is not affected by modules, and whose crafting time is equal to the length of the launch animation. But it's the "serialized" nature of the two recipes that throws the rocket silo count off. That is, the silo alternates between making 100 rocket parts and then launching a rocket, and each of these takes a certain amount of time, and the calculator is not (currently) wired up in such a way that it can account for this.

I can think of a number of ways of presenting this information, but I think it will be best to start with the simplest: Adjust the silo count for rocket parts to account for the time of the launch animation. From there, it would probably make sense to use the same number for the rocket launch recipe itself, which would in turn allow specifying a factory count when you choose space science from the target list.

KirkMcDonald commented 5 years ago

Done in e6fd1cfc8c9c2e942b93c58ce827f2995489607c.