Source code access?

Post all other topics which do not belong to any other category.
Post Reply
DarkShadow44
Filter Inserter
Filter Inserter
Posts: 275
Joined: Thu Jun 01, 2017 12:05 pm
Contact:

Source code access?

Post by DarkShadow44 »

Hello there,

Factorio is one of my all time favorite games, and the best optimized I've encountered. I love your hands-on approach with the FFF, and would like to dive deeper into the secrets of optimization. Would probably make for a great opportunity to learn...
Is there a way for 3rd parties (like me) to get access to the code without being hired by Wube? Of course I'd sign an NDA, and wouldn't need to see the expansion branch.
What would be needed to be considered worthy of that privilege?

Apart from learning I'd like to play around with the fluid system that was proposed but never added. And see if there's something that can be done for big modded bases like PyMods or SpaceExploration. And maybe add a few tweaks/hacks for personal use...
I mean, I'd love to help fix issues and stuff as well, but I'm not sure how that could work.

- Dark

Koub
Global Moderator
Global Moderator
Posts: 7175
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Source code access?

Post by Koub »

I think the best way is by using the general contact email on this page : https://factorio.com/support/contact.
And to try to convince Wube they should grant you the access to their source code :).
Koub - Please consider English is not my native language.

User avatar
ptx0
Smart Inserter
Smart Inserter
Posts: 1507
Joined: Wed Jan 01, 2020 7:16 pm
Contact:

Re: Source code access?

Post by ptx0 »

DarkShadow44 wrote:
Sun Nov 28, 2021 6:40 am
Is there a way for 3rd parties (like me) to get access to the code without being hired by Wube? Of course I'd sign an NDA, and wouldn't need to see the expansion branch.
What would be needed to be considered worthy of that privilege?
good luck, even Bobingabout doesn't have source access anymore. they're pretty strict about it nowadays. either that or it's a Boys' Club, one which I am not in, despite being able to contribute.

DarkShadow44
Filter Inserter
Filter Inserter
Posts: 275
Joined: Thu Jun 01, 2017 12:05 pm
Contact:

Re: Source code access?

Post by DarkShadow44 »

ptx0 wrote:
Sun Nov 28, 2021 4:45 pm
good luck, even Bobingabout doesn't have source access anymore. they're pretty strict about it nowadays. either that or it's a Boys' Club, one which I am not in, despite being able to contribute.
Mhh I see, so chances are bad.. Maybe related to the upcoming expansion, so they want to maximize secrecy.
Koub wrote:
Sun Nov 28, 2021 7:49 am
I think the best way is by using the general contact email on this page : https://factorio.com/support/contact.
And to try to convince Wube they should grant you the access to their source code :).
I already sent them a mail about a month ago, but didn't get an answer. Not sure if the mail simply landed in spam (wouldn't be the first time with my mail provider), or whether I should take the silence as rejection.

Koub
Global Moderator
Global Moderator
Posts: 7175
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Source code access?

Post by Koub »

DarkShadow44 wrote:
Tue Nov 30, 2021 3:36 pm
I already sent them a mail about a month ago, but didn't get an answer. Not sure if the mail simply landed in spam (wouldn't be the first time with my mail provider), or whether I should take the silence as rejection.
Whether it's the former or the latter, I think, like ptx0, that the chances the devs give access to their source code to anybody not part of Wube are highly unlikely at best.
Koub - Please consider English is not my native language.

DarkShadow44
Filter Inserter
Filter Inserter
Posts: 275
Joined: Thu Jun 01, 2017 12:05 pm
Contact:

Re: Source code access?

Post by DarkShadow44 »

Koub wrote:
Tue Nov 30, 2021 6:07 pm
Whether it's the former or the latter, I think, like ptx0, that the chances the devs give access to their source code to anybody not part of Wube are highly unlikely at best.
Probably, but since the chance seems to exist, I figured I could ask what's required. :)

adam_bise
Filter Inserter
Filter Inserter
Posts: 346
Joined: Fri Jun 08, 2018 10:42 pm
Contact:

Re: Source code access?

Post by adam_bise »

There is just no way they would hand over their source code. This is a closed source, for-profit product and doing so would be willingly casting all their work into the wind.

DarkShadow44
Filter Inserter
Filter Inserter
Posts: 275
Joined: Thu Jun 01, 2017 12:05 pm
Contact:

Re: Source code access?

Post by DarkShadow44 »

adam_bise wrote:
Fri Dec 03, 2021 3:49 am
There is just no way they would hand over their source code. This is a closed source, for-profit product and doing so would be willingly casting all their work into the wind.
You do know that some modders already have access? It's not like you can do anything with the source code, that's what the NDA is for.
I don't want the sources for nefarious purposes, only to learn from and play with it. That's what programmer fans of the game want. :lol:

blazespinnaker
Filter Inserter
Filter Inserter
Posts: 665
Joined: Wed Sep 16, 2020 12:45 pm
Contact:

Re: Source code access?

Post by blazespinnaker »

It's very unlikely that they would give out access, and it has nothing to do with intellectual property (or at least shouldn't), but rather they probably don't want to reveal what is likely a lot of messy spaghetti and snarled code. Also, it makes it easier to develop exploits into multi user games.

The whole notion that there is some super secret sauce to source code is, frankly speaking, ludicrous. Plenty of companies have OS'd their code and generally the collective reaction is a shrug.

That aside, building an engine that could handle something like the scale and size of factorio does sound sort of interesting.

Rust has some great performance characteristics and might be an ideal way to go, though likely C/C++ with embedded assembly would probably be fastest. Optimizing compilers and branch prediction do wonders nowadays though, so sometimes it's best just to leave it up to underlying archs.

In terms of a core datastructure, that's an interesting question. Multi core utilization would be something to think about, I believe there are likely improvements over wubes engine to be done there. Smarter cpu cache utilization would be involved. Wube talks a little about it here - https://www.factorio.com/blog/post/fff-215

I think the idea generally was to make the DS such that each chunk is an independent entity with regards to memory / cache, so cpu cores could partition them up and process them all in parallel. Maybe they are doing that for the next version.
OptimaUPS Mod, pm for info.

User avatar
ptx0
Smart Inserter
Smart Inserter
Posts: 1507
Joined: Wed Jan 01, 2020 7:16 pm
Contact:

Re: Source code access?

Post by ptx0 »

blazespinnaker wrote:
Sat Dec 04, 2021 7:38 am
It's very unlikely that they would give out access, and it has nothing to do with intellectual property (or at least shouldn't), but rather they probably don't want to reveal what is likely a lot of messy spaghetti and snarled code.
really its about this. only recently have they even started unit testing their stuff and they're using the outdated bad ideas from Uncle Bob to "fix" the mistakes they've made.

there's some public code on Github Gists that has selectively been published and from that, it's pretty scary looking. but makes sense why they reject so many proposed optimisations and features, because the code would require a major refactor for it.

DarkShadow44
Filter Inserter
Filter Inserter
Posts: 275
Joined: Thu Jun 01, 2017 12:05 pm
Contact:

Re: Source code access?

Post by DarkShadow44 »

ptx0 wrote:
Sat Dec 04, 2021 7:24 pm
blazespinnaker wrote:
Sat Dec 04, 2021 7:38 am
It's very unlikely that they would give out access, and it has nothing to do with intellectual property (or at least shouldn't), but rather they probably don't want to reveal what is likely a lot of messy spaghetti and snarled code.
really its about this. only recently have they even started unit testing their stuff and they're using the outdated bad ideas from Uncle Bob to "fix" the mistakes they've made.
Huh, I'd assume it's mostly about IP. Isn't that usually the reason code is secret?
blazespinnaker wrote:
Sat Dec 04, 2021 7:38 am
The whole notion that there is some super secret sauce to source code is, frankly speaking, ludicrous. Plenty of companies have OS'd their code and generally the collective reaction is a shrug.
True. Although you got to admit it's quite impressive at what level of performance the game works. Not to mention, modifying source is a lot easier than assembly. :lol:
blazespinnaker wrote:
Sat Dec 04, 2021 7:38 am
In terms of a core datastructure, that's an interesting question. Multi core utilization would be something to think about, I believe there are likely improvements over wubes engine to be done there. Smarter cpu cache utilization would be involved. Wube talks a little about it here - https://www.factorio.com/blog/post/fff-215

I think the idea generally was to make the DS such that each chunk is an independent entity with regards to memory / cache, so cpu cores could partition them up and process them all in parallel. Maybe they are doing that for the next version.
I'd definitely like to see that! Could take the scalability to a whole other level. Although it would probably need a few breaking changes for best results...

PaszaVonPomiot
Long Handed Inserter
Long Handed Inserter
Posts: 71
Joined: Fri Dec 29, 2017 1:50 pm
Contact:

Re: Source code access?

Post by PaszaVonPomiot »

In general video game developers don't share their code because if leaked to public it could be used to create a clone of the game or cheats. Although there is some rationale to make it open source like in example of Barotrauma. However nobody can expect from WUBE that they will share their code.

DarkShadow44
Filter Inserter
Filter Inserter
Posts: 275
Joined: Thu Jun 01, 2017 12:05 pm
Contact:

Re: Source code access?

Post by DarkShadow44 »

PaszaVonPomiot wrote:
Sat Jan 01, 2022 9:54 pm
In general video game developers don't share their code because if leaked to public it could be used to create a clone of the game or cheats.
Well, that's where NDA comes in, no?

FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2483
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: Source code access?

Post by FuryoftheStars »

DarkShadow44 wrote:
Sat Jan 01, 2022 9:58 pm
PaszaVonPomiot wrote:
Sat Jan 01, 2022 9:54 pm
In general video game developers don't share their code because if leaked to public it could be used to create a clone of the game or cheats.
Well, that's where NDA comes in, no?
Well, unless they spend the money to track down and prove who violated the NDA… and even then, I’m sure there are plenty of measures that can be taken to make that more difficult to do (read, more costly for Wube), and possibly even impossible.
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles

blazespinnaker
Filter Inserter
Filter Inserter
Posts: 665
Joined: Wed Sep 16, 2020 12:45 pm
Contact:

Re: Source code access?

Post by blazespinnaker »

PaszaVonPomiot wrote:
Sat Jan 01, 2022 9:54 pm
In general video game developers don't share their code because if leaked to public it could be used to create a clone of the game or cheats. Although there is some rationale to make it open source like in example of Barotrauma. However nobody can expect from WUBE that they will share their code.
If you were going to 'clone' factorio, I don't think you'd bother copying their source code as you'd be at risk for copyright violation (easily proven by duplicated bugs), and any effort to reskin it would be wasted, not to mention the liability.

You can already "clone" factorio by just copying the game, removing whatever copy protection is on it, and than reselling it as your own.

If you were trying to compete with Factorio, the only rational approach is just to code it from ground up. This is not rocket science and Wube has already shown the way.

The real intellectual property of Wube is not the source code, but rather the lead game designers, engineers and artists. They are the IP.
OptimaUPS Mod, pm for info.

Post Reply

Return to “General discussion”