Java & J2EE Page 4 - Gaming Development Setup |
Hopefully by this point you have been able to compile and run the demonstration program successfully and are now ready to learn how to modify and incorporate the code library as described in the book to create your own games. Before you get too invested in the library, however, you should know the usage limitations and requirements. Learning the Basics of CopyrightCopyright used to be a mystery to me until I did a little reading on the subject. Here are a few key basics I think every developer should know.
My favorite book on this subject is Web & Software Development: A Legal Guide by Stephen Fishman (Nolo Press, 2002). Nolo Press is the publisher of a number of extremely useful self-help legal books. I recommend that you read a book on copyright law at least once early on in your career. It is critical to understanding your employee agreements, your client contracts, and incorporating Open Source software. Choosing a LicenseThe example game code is licensed to you under the terms of an Open Source license. An Open Source license grants you the right to use and modify the source code to create your own games for free. It usually also places restrictions on your ability to sue the creator of the Open Source code for damages if something goes awry. These days, most of the code underlying the Internet infrastructure is distributed under the terms of an Open Source license. While not officially a trademark, Open Source usually refers exclusively to code distributed under the terms of one of the licenses approved by the organization known as the Open Source Initiative (OSI). You can find a list of these approved licenses as well as additional information on the theory behind Open Source at the OSI web site.(1) Some Open Source licenses are considered viral in that they are said to infect your program if you incorporate any of the code licensed under their terms in your game. In this case, you must also release your entire game code— the larger work—under the same licensing terms. The idea is that no one can benefit from the use of this free software unless they are also willing to share their enhancements and contributions. Developers might use non-viral licenses, on the other hand, in a program where different parts of the code are distributed under different licensing terms, including closed source commercial. The reusable game code library and example games are available under the terms of both viral and non-viral Open Source licenses. Look in the license subdirectory of the code distribution for the different licenses you can use. Which license you choose is at your discretion based upon your needs and preferences but you must choose one if you are to use the code at all. If you are undecided, I recommend the Academic Free License (AFL) version 2.0 by Lawrence E. Rosen. It is possibly the least restrictive. For example, it is non-viral so you have the option of incorporating it into a closed source commercial release of your game. Other choices include the Open Software License (OSL), the GNU General Public License (GPL), and the GNU Lesser GPL (LGPL). My Cool Game v1.0 Portions Copyright 2003 CroftSoft Inc. Note that most, if not all, Open Source licenses require that you maintain the attribution and copyright notice for any included or modified code. If you print something like the preceding code to System.out in the background whenever your game starts up, that is good enough for me. Renaming Modified Code If you modify one of the files in the game library, I request that you change the package name so the modified class is no longer in the com.croftsoft package hierarchy. The general rule is that you should use your unique domain name reversed for the beginning of your package prefix to prevent naming conflicts. For example, my domain name is croftsoft.com, so the universally unique package name prefix is com.croftsoft. If you do not have your own domain name you can use, you should consider getting one. Domain name registration now costs as little as $8.95 per year from registrars such as Go Daddy Software.(2) Hosting for your web pages and applets is less than $8 per month from some providers. If you want the domain name but do not want to pay for the web hosting, you can use the domain forwarding service from your name registrar to redirect visitors to the personal web page that comes free with your Internet Service Provider (ISP) account. I also ask, but do not require, that you retain my name in the modified source code files as one of the authors as indicated by the @author javadoc comment. Each time a new contributor modifies the file, the list of @author tags should grow. Sharing the SourceIn addition to the CroftSoft Code Library, you might find source code suitable for your game development needs from an Open Source repository. The Open Source repository SourceForge.net, for example, is host to a number of different Java game programming projects.(3) In addition to finer categorizations, it organizes the code by foundry such as the Gaming Foundry and the Java Foundry. Look for projects within the intersection of these two sections. FreshMeat.net has an impressive search-filtering function that allows you, for example, to look for projects that use an OSI-approved Open Source license, use the Java programming language, and have the word “game” in the description. This search includes projects at other sites such as SourceForge.net. Sun Microsystems has recently launched the “Java Games and Game Technologies Projects” web site which is starting to attract some Open Source contri-butions.(4) I hope this will become the future center for this type of code, in effect serving as what would be called a “Java Gaming Foundry” if it existed on SourceForge.net. SourceForge.net might continue to dominate, however, as it is much less restrictive as to what projects can be created and how they can be organized. The Game Developers Java Users Group (GameJUG) has an electronic mailing list, gamejug-open, specifically for the discussion of Open Source Java game development efforts.(5) I recommend that you subscribe to one or more of the GameJUG mailing lists such as gamejug-announce and gamejug-news. As GameJUG volunteers, I and others frequently post useful information and links about the Java game programming industry that you might not find anywhere else.
blog comments powered by Disqus |
|
|
|
|
|
|
|