Distributing Open Source P3 Projects

The P3 SDK is available to download in the Support section of the Multimorphic website. A free registration is required.

The P3 platform is open, meaning anybody can write applications for it, but it is not open source. The SDK itself is distributed as multiple compiled DLLs.

The SDK also contains a sample application which is open source, meaning you can see the source code and compile it yourself.

Open source does not mean you can do whatever you want with it. You still have to obey the license terms. Many open source projects are distributed under a liberal license, but these are not synonymous.

The P3 SDK is distributed under an implicit license, which basically means: Multimorphic reserves all rights and you can’t do anything with it.

We can assume the intention is to let people freely write P3 applications using the SDK, but that does not give you any more rights. Licensing is a complex matter and it’s understandable Multimorphic does not want the competition to benefit from their effort. This is not purely hypothetical, since this is precisely what happened to Multimorphic with one of their early products.

The licensing will eventually be figured out, but what do we do in the meantime?

The problem of distributing the compiled DLLs is easily solved. Just don’t distribute the compiled DLLs and tell the users to copy the DLLs from the sample application. Unfortunately, things are more complicated.

The boundary between the SDK and the sample application is somewhat blurry. To keep the SDK flexible and adaptable, a large portion of boilerplate code is visible in the sample application. The boilerplate code is needed in every P3 application, which means a large portion of the sample application must be copied in the open source project. That clearly breaks the license.

The standard approach is to distribute the project as a patch. For example, the Unix diff command can create a patch and the Unix patch command can apply it. Semantically, the patch only contains the differences, but there are still parts of the source in the patch. There are options to reduce the offending data but there will always be some present.

Since I could not find a suitable patch tool, I settled to write one myself.

P3Distrib is a pair of utilities to create and apply patches to distribute P3 Unity projects.

P3Distrib tries very hard not to copy any content from the source because:

- The comparison is done at the character level

- It does not store any surrounding context

- It does not store a pre-image of deleted text

This gives us what we want. The only caveat is we now need to apply the patch against an unmodified copy of the source.

Note: P3Distrib could detect modifications to the source by using hashes, though that’s not implemented in the first version. In this version, if you apply a patch against a modified copy of the source, it will likely silently succeed and produce garbage as output.

P3Distrib is distributed in source form. Download it here. The Readme gives instructions how to compile the code, create a patch and apply it later to recreate the modified project.

Your modified project is your work and you can (presumably) apply any license to it.

Be aware, the output of applying the patch will contain portions of the source project and that’s still governed by the original license. You must make that clear in your documentation to avoid confusion between the two licenses.

Does this completely solve our problem? Apparently it does, but we are still on shaky legal grounds. It can be argued the modified project is a derivative work of the original and nowhere does it say you are allowed to do this.

My advice to distribute an open source P3 project is:

What about the P3 applications distributed in the P3 on-line store? In that case, the developer signed an agreement with Multimorphic and that covers the necessary licensing.