How to put the right licence on my game


I’m new here, I wish to build games and share my code with people for learning purpose. If I cannot use open sorce licence, how can I protect my work avoiding people copy it without mentioning my name?


IANAL, but you can use many open source licenses on your UE4 game code, but not copyleft ones (e.g., GPL or LGPL). The distinction is whether or not the license is ‘viral’: GPL and similar licenses require that all code linked into your executable also fall under the same license, which is incompatible with the engine code requiring a EULA for access, while other licenses only apply to the code that you place under that license. For example, the 3-clause BSD license states (emphasis mine):

BSD is just one example. MIT, zlib, and Apache are three other common ones worth googling. For totally unrestrictive licenses, there are CC0 and WTFPLv2, though there is some question of whether or not CC0 is appropriate for source code (you can also dual license, e.g., the nothings libraries are dual-licensed as public domain (for countries where it is possible to place something directly in the public domain) and MIT (for the US and worried lawyers)).

Note: This applies to your game code, any engine code you modify or provide is subject to the EULA license and copyright Epic and must only be provided to others who have also accepted the EULA (typically by creating a GitHub fork off the official project). If you’re not modifying the engine code, no worries on this front, just state your code was for version X of the engine and you don’t need to redistribute any of it.

Even more IANAL, but as a side note, I’d suggest questioning what the value is that you place on the code you are sharing versus the action of sharing it (e.g., what is your goal in sharing) and suggest picking the least restrictive license possible that meets your goals. If you’re teaching people and posting snippets of ‘here’s a neat function or material graph’ then the least restrictive license is going to see more people using the code, while if you’re posting an entire full game with assets and you don’t want people to asset flip it then maybe a more restrictive license makes more sense. The reality is presumably somewhere in between, so I can’t advise you on the specifics.

Michael Noland