copyright licensing
How the rights work about selling a program which works with other open source code?
<p>I'm a little confused about the copyrights and etc. I'm working on an indie game by myself and I don't have the capacity to make everything myself, so I use open source libraries like LWJGL,dyn4j,nifty-gui. The license written in them says:</p>

<blockquote>
  <p>Copyright (c) 2012, Jens Hohmuth</p>
  
  <p>All rights reserved.</p>
  
  <p>Redistribution and use in source and binary forms, with or without
  modification, are permitted provided that the following conditions are met:  </p>
  
  <ol>
  <li>Redistributions of source code must retain the above copyright notice, this
  list of conditions and the following disclaimer. </li>
  <li>Redistributions in binary form must reproduce the above copyright notice,
  this list of conditions and the following disclaimer in the documentation 
  and/or other materials provided with the distribution. </li>
  </ol>
</blockquote>

<p>I understand that I can use it in my program or even can sell it, but won't it mean others can use my program with it? Will my code become open source if I use these or is it separated? I want my own code to be copyrighted so others cant use it as they want. Like any other game out there. Is possible if I use the above listed other libraries?</p>

<p>It isn't really in my line, I don't know how these rights work if someone can explain this to me I would really appreciate it.</p>

<p>No, that is the text of the <a href="https://opensource.org/licenses/BSD-2-Clause" rel="nofollow noreferrer">BSD 2 clause license</a>. The license applies only to the library, not your code that links to the library.</p>

<p>You can find a short explaination <a href="https://tldrlegal.com/license/bsd-2-clause-license-(freebsd)" rel="nofollow noreferrer">at tldrlegal.com</a>:</p>

<blockquote>
  <p>The BSD 2-clause license <strong>allows you almost unlimited freedom with the
  software</strong> so long as you include the BSD copyright notice in it (found
  in Fulltext). Many other licenses are influenced by this one.</p>
</blockquote>

<p>The <a href="https://www.lwjgl.org/license" rel="nofollow noreferrer">LWJGL license</a> is a Modified, or "3-clause" <a href="https://en.wikipedia.org/wiki/BSD_licenses" rel="nofollow noreferrer">BSD license</a>. The license quote above seems to be a "FreeBSD License" also known as a "2-clause BSD license". I haven't checked the other libraries you list, but I suppose that they are all under some BSD-like license. </p>

<p>BSD is <strong>not</strong> a "copyleft" license. That is it does not require that derivative works that merge code under a BSD license with other code must use a BSD license, or indeed any sort of free or open-source license. The Modified and Free BSD licenses (aka "3-clause" and "2-clause" BSD) are both compatible with the GNU GPL and LGPL licenses, but do not require the use of throe license or of any particular license. </p>

<p>An author of a new work which uses a BSD-licensed library need not release source code, nor permit the creation of modified versions, nor permit others to redistribute the work at all. </p>

<p>Such an author may sell the work, and limit it with a traditional copyright statement. Such anh author should include the names and copyright statements of all BSD-licensed libraries, either in credits displayed by the new program, or in documentation, or preferably both. </p>

<p>Good practice would be to accompany the author's own copyright statement for the overall work, wherever that appears, with the names and copyright statements and disclaimers of each such library used by the new work.</p>

<p>Note that you must check the license of each library that you use. They may not all be under the same license. If any is under a license nwith 'copyleft" or "share alike" provisions, then that library may not be used if you intend to restrict the licesne on your new program more narrowly than the library license.</p>
