4

I'm independently developing a physics-based game using HTML5 canvas and JavaScript; I've used no external code at all (including physics or game engines), and my code is about 5000 lines in length. The development is almost complete, and now I want to release it.

I am planning to release the game as a paid app on the Chrome, Android, and Apple app stores, but I also want to release the code under an open source license - one which allows free reading and gleaning of ideas from my code, but does not allow more than a couple lines to be copied. Basically I want people who know where to look and how to use to find free code, and the general public to buy it, while preventing piracy or the development of a near copy.

Is this possible with an open source license?

What license should I use?

1
  • 7
    Note that "does not allow more than a couple lines to be copied" automatically means that your software will not be open source.. All OSI-approved licenses (which is pretty much what "open source" means) require that the code may be re-used. Of course you can license it exactly the way you want, but please avoid using the phrase "open source" for such a license, it would only lead to confusion. Feb 22, 2012 at 7:51

3 Answers 3

5

You are probably looking for a Creative Commons license.

Something like Creative Commons Attribution NonCommercial ShareAlike

3
  • Thanks! I tried my hand at googling it, but couldn't find what I was looking for; can't believe I missed this!
    – mndoftea
    Feb 20, 2012 at 22:59
  • 4
    Note that CC-BY-NC-SA does not fit as an open source license, because allowing copying and selling is necessary to be considered as one.
    – lvella
    Feb 22, 2012 at 2:18
  • 5
    See creativecommons.org/weblog/entry/27081 for reasons CC license not intended for software. Feb 22, 2012 at 5:56
5

What you describe ...

allows free reading and gleaning of ideas from my code, but does not allow more than a couple lines to be copied. Basically I want people who know where to look and how to use to find free code, and the general public to buy it, while preventing piracy or the development of a near copy."

... does not qualify as "open source" according to the OSI definition, violating the "free distribution" clause.

So I think the answer to your question is that what you ask is not possible, but you could have a liberal commercial license. Check out Microsoft's Shared Source licensing as a model, specifically Microsoft Reference Source License (Ms-RSL).

2

If you're concerned about protecting the code (legally), you should contact an attorney to craft a license that meets your somewhat non-typical needs, to make certain your application and code is properly protected. Creative Commons as a commenter above mentioned, isn't a good fit for software. If you feel like a CC license is right, you need to read the details of the license carefully and understand it. Don't rely only on the summaries provided.

Better though, I'd suggest that instead of (just) doing that, you'd consider creating a blog/web site that discusses the more interesting points of what you've done and why you think they were novel or interesting. I'd read it (as would likely others), whereas I wouldn't think to try to dive through your ideally minimized JavaScript code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.