Hacker News new | ask | show | jobs
by TOGoS 1090 days ago
The Factorio team is pretty chill about stuff, generally, which is why they make the game so moddable in the first place. The only time I remember them having to take any legal action was to deal with someone reselling stolen keys or something. It's understood that anything cool the community does is good for Factorio.

> i would absolutely love to see the original source code for

As someone who's seen the source code, I'd say it's relatively good code, but nothing particularly amazing. C++ with multiple inheritance, game objects doing method calls to each other in multiple phases, and a good dose of "maybe not the best way to do this but it works and we're not changing it now" code. What keeps it all running as well as it does is a comprehensive set of automated tests, and Rseding getting on your case any time you make a PR with less-than-optimal code. The interesting bits are the algorithms, which are covered by the Friday Facts.

1 comments

> What keeps it all running as well as it does is a comprehensive set of automated tests

"Let's game it out enters the chat"

Really though super cool to hear a perspective from someone with inside knowledge!

I'd be impressed if they managed to find any bugs, it's probably one of the least buggy games I've encountered (the speedruns for example contain no glitches at all).
This is underselling how un-buggy Factorio is. Just read the bugfix section of the previous releases: https://wiki.factorio.com/Version_history/1.1.0

“ Fixed a crash when downgrading ghost of assembling machine when target machine cannot craft recipe due to missing pipes. ”

“ Fixed a crash when removing modded pipe-to-ground that connects to a shifted pipe-to-ground. ”

“ Fixed that solar panels on multiple surfaces would all produce electricity based on a daytime of one of the surfaces when they were part of a single electric network with a script created wire between surfaces “

“ Fixed a crash when moving blueprint book to blueprint library when there is also another book that will get under the cursor and tooltips are showing “

“ Fixed a crash related to teleporting spider vehicles with burner energy sources between surfaces. “

And so on. There was a blog post a while back that claimed they had fixed over 8,800 reported bugs and after more than four years of development they had reached 0 outstanding bugs.

Particularly notable is that many of the bugs they're fixing can only be triggered by mods. (This is the case for at least half of the ones in your example -- "modded pipe-to-ground" is obviously mod-only, and neither "solar panels on multiple surfaces" nor "spider vehicles with burner energy sources" are features present in the base game.)