As there were some unclear things in the past, this article should cover some notes about legal things important when writing own code.
Table of Contents
Applying Copyright
Currently, it is urgent to apply Copyright onto your code! And more important, do it right. By the way, "Copyright" applies here too, even if the source is going to be released using a Copyleft license.
Copyright Statements in the Source
To mark a file as copyrighted, inserts a comment at the very beginning ( or at last near the beginning, in case the source file includes a Unix-style Shebang).
The note could look like this (in case you use GPL):
* Copyright (C) 2009 by SOMEONE <someone@rpdev.net>
* Copyright (C) 2010 by YOUR NAME <yourname@rpdev.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
It is urgent to use your own name there! Don't insert a name of a team there (e.g. "RPdev") as this has no legal meaning! Also, list all years, in which you changed the code; this could look like this:
Do not use a range (2008 - 2010), but rather list every year!
Other Ways to Claim Copyright
Beneath the in-code mark, you should also include the license as plain text document directly in your projects root directory. Even if you hint out an (online) URL where people could look up the license: It is better to include the license in the project distribution!
This especially applies to files, where no in-file copyright statement can be made (e.g. graphic files, sound files, etc.pp.)
In the case you want to license code and other (data) files separately, include a document explaining exactly which files are released using which license, e.g.:
COPYING.source.txt for the license text.
All images and sound files are released under the terms of the Creative Commons "by-sa" license.
See COPYING.gamedata.txt for the license.
It is also a good idea to include a simple text file where all "authors" (i.e. all copyright holders that are included in the project) are listed.
Letting the User Know What he Gets
The system we use to provide our projects allows us to show the user the license for each project. He cannot download the project unless he agrees the terms of the license. Thus, if you upload your project to the download center, make sure to set a license. This is surely not necessary, but it makes sure the user has a chance to agree or disagree with the software's license.
