Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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?

share|improve this question

migrated from stackoverflow.com Feb 22 '12 at 2:06

This question came from our site for professional and enthusiast programmers.

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. –  Joachim Sauer Feb 22 '12 at 7:51

3 Answers 3

up vote 6 down vote accepted

You are probably looking for a Creative Commons license.

Something like Creative Commons Attribution NonCommercial ShareAlike

share|improve this answer
    
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 '12 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 '12 at 2:18
5  
See creativecommons.org/weblog/entry/27081 for reasons CC license not intended for software. –  codingoutloud Feb 22 '12 at 5:56

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).

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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