Castle-editor as a modding tool

This comes to mind as I am thinking to include castle-editor (with custom components of course) as a modding tool for my game. Since the editor’s source code is GPL >= 2, that means if I statically linking it with my game’s custom components it would ‘infect’ my entire game’s source code.

I like games that can be modded so this is something I was thinking a bit, but I didn’t decided yet. Some of my concerns are about the compile and run and that it will ask for compile the editor when custom components are present.

Maybe changing the editor sources to deactivate some the functionality will fix it.

Our editor is indeed (strict) GPL, which means that if you distribute modified version of the editor, you need to distribute also the source code of the modified editor version. You cannot distribute a proprietary (closed source) fork of the editor.

I decided to do this to prevent proprietary forks of the editor. This is the same decision as FPC compiler, or Lazarus IDE. It is done to protect us from bad actors (who, if editor would be on more permissive license, could abuse the situation to create a proprietary fork of the editor, competing with our original – adding small proprietary features while benefiting from many years of our open-source work). I understand it also prevents from some legitimate uses (in your case, you want a MODding tool for your game, of course a perfectly reasonable thing), but I don’t want to loosen our licensing in this case.

Solutions:

  • Consider making your custom editor (MOD tool) open-source too.

  • Or, do not use our editor as a basis for your MOD tool. Instead “roll your own” using CGE components. You have tools in CGE to develop various editor-like operations too. See how inspector (F8, https://www.youtube.com/watch?v=5jBdPdj75yk ) displays the hierarchy and object inspector “in game”. We also expose CastleTransformManipulate to enable selecting/moving/rotating/scaling transformations (our inspector F8 should eventually use it too). So you have some “building blocks” to make your own editor using CGE UI.

P.S. Just to be clear, because such threads often bring people asking: You can develop proprietary (closed source) applications using the Castle Game Engine. The engine core is on “LGPL with static linking exception” license, see License | Manual | Castle Game Engine . The question and answer above are specifically about forking the editor.

Actually, it’s not about forking the editor (because no changes are made to the editor’s source code in this case). It’s just that once the editor is compiled with custom components, which are of course also used by the game, then the entire game’s source code becomes subject to GPL as well. It would be nice to have an exception for custom components IMO.

Edit: In case you don’t want to add such exception, my other solution would be to create a fork that make the calls to CGE / custom components via dynamic libraries (.dll/.so). This way would completely avoid the whole GPL issue affecting my game’s source code. The changes to the editor will be open-sourced as it should :slight_smile:

Oh, I agree it would be nice if our license allowed your use-case.

But I don’t want to change the license in this case — there’s too big chance I would write something that doesn’t “make sense legally”. And I don’t want to complicate our licensing more – saying “CGE editor is GPL” is simple, saying “CGE editor code is GPL, unless in this case when it’s LGPL” is getting more complicated.

I believe Lazarus IDE is in the same category, and they also decided to keep Lazarus IDE as GPL. The LCL is LGPL (like CGE), so you can make proprietary applications using LCL. But if you modify the Lazarus IDE (even if only to add your new components or otherwise change the IDE through public interfaces for plugins) then if you distribute the resulting “new Lazarus IDE” → you must distribute also sources of everything you linked into the IDE.

As for forking – well, I understand your intention is not to fork the CGE editor in this case, but use it as a tool for your game. And you only want to link additional components into the existing editor code. But GPL deliberately says any “linking together with GPL” implies that resulting product must indeed be considered on GPL, because it could be used to modify how the product works.

Note that it’s not that “entire game source code” must be open-sourced. Only the things you use inside the “modified CGE editor”, like your custom components, must be open-sourced. But I guess that it can pull, as dependencies, a lot of your code.

This makes sense, OK. I’m afraid I indeed don’t want to change our licensing, so if you wish → you can go this route. Note that you also have 2 solutions I mentioned earlier – 1. you can consider making your code open-source, 2. you can build your own “editor-like functionality” using the things in CGE “core”, display own hierarchy, object inspector, use CastleTransformManipulate etc.