A lot of game developers are working a decade or two behind modern programming practices, especially in C++. So it might well be that Rseding91 doesn't know about dependency injection or that's something not widely known (and therefore not welcome) at wube.Qon wrote: ↑Sat Apr 13, 2024 6:56 amWell, do you think Rseding91 doesn't know or considered and rejected the things you suggested, when it was first designed? Or maybe he and the team had different goals with the system and more insight into how the tradeoffs would affect the product, which means that they saw that your solution brought more issues than beneits?
"Established solution" works great for standard cookie cutter games, which Factorio is not. Inflexibility is a strength when it leads to reliable and performant systems that handle large amounts of data. And Factorio has become amazing because it is taking advantage of these strengths. Other games would have a series of levels for designing and running each system by itself.
Also, it's a bit weird to suggest completely restructuring the entity system architecture for a mod that can probably already be made with some workarounds if you try a little bit more, when it would give massive amounts of work to Wube and worsen their vanilla product.
But what I wrote was:
A non-rotating type is just one with only 1 direction. Other entities might have 2 so you can turn them 180°. Most do have 4 with a 90° rotation and then there are rails with 8 directions and 45° rotation. Trains have 16 directions so they look better in curves, right?
So my question was: With entities with variable number of directions why is 1 a special case at all?
And the followup: Weather he knows about dependency injection or not and why it wasn't used.
I didn't ask them to change the game to use dependency injection when they didn't. It's kind of hard to do that after the code has been written. It's a fundamental design decision, not something you can just change. I asked why they made the choices they did.