Hacker News new | ask | show | jobs
by DDSDev 1077 days ago
As a game dev, factorio has always been a title that I would absolutely love to see the original source code for.

Also, for anyone who’s first question was “how is this legal”:

“When asked about the legality of this whole endeavour, they showed great understanding and allowed the project to be released, provided it won’t be used for commercial purposes.”

4 comments

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.

> 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.)
There are some bits of Factorio source code on github — https://gist.github.com/Rseding91

and https://old.reddit.com/r/factorio/comments/13bsf3s/technical... is fascinating reading (things like: they used doubly linked lists, and multiple inheritance)

Factorio has a great dev blog. They don't show the code, but they go pretty in-depth on some challenges they have to overcome.

https://www.factorio.com/blog/

In fact this community Alt-F4 has started after the weekly FFFs stopped, because people were missing it so much !
Naively, I had the inverse question after reading that, how would this be illegal? Why must this be a labor of love? Use of Factorio IP seems limited to visual inspiration and file format parsing, and its clearly transformative (in the legal sense of the word)
Sometimes I think we're far too obsessed with legal. The developer is good to the community, the community is good to the developer. This seems like a much more productive relationship than arguing over what is legal.
"Visual inspiration" is generous. The models are a direct 1:1 copy of the in-game sprites, which sounds like a "derivative work" to me. IANAL.
In this instance, it would be more than "look and feel" and more "would a person assume this project is done by the original Factorio developers" — are they misleading the audience. They copied much of the UI from the Factorio site for instance — so if they wanted you could make the argument the intent is to mislead.
I think you’re confusing trademark and copyright. Trademark is about confusing the public. Copyright is about derivative works. It seems pretty clear to me that this is a derivative work, due to its direct copying of Factorio sprites.
The website UI is by the Alt-F4 team, not the FUE5 team, it's like seeing this discussion and then complaining that FUE5 'copied' Factorio's colour scheme, thinking they are also behind hackernews, lol.
I mean, nothing is clear in terms of "transformative" and never has been, but I absolutely agree with the overall point.