So I created an HTML5/Javascript online game. I host it on my website for anyone to play for free. I am still currently working on it. Do I need to license my game? And if so, what license do you recommend? I was looking at some open source licenses like GPLv3, but i'm not sure if I even need a license?

If I need a license, I need one that allows:

  • my game to be totally free to play
  • my game to be embedded on other websites
  • no one else can re-distribute my game, unless it is under my name and not theirs

Also, if I need a license, where do I include it? Do I just have to state somewhere that the game is licensed under "xxxxx license"? Or do I have to include a link to the license file hosted on my server? OR even include the license file in my game (i.e. in the games javascript file, or under a game menu, etc.)?

  • 4
    After taking a little peek at the code, you really need to start indenting it. Jun 28, 2011 at 19:05
  • Should I? I don't mind the way that I write it, I can read it fine. Also I will be minifying the javascript so that it will be harder for users to hack their score.
    – Jacob
    Jun 28, 2011 at 19:22
  • 4
    Indentions are to make the code easier for the programmers to read. If you worked where I work, you would be required to use indentions because you would not be the only programmer to need to work on it during the life of the product. As for your game, if you (really?) don't mind, then don't worry about it. You can always run it through an IDE or JsTidy later on. Jun 28, 2011 at 19:46
  • 1
    Do you know jsdo.it? There are many games like yours there.
    – Ando
    Jun 28, 2011 at 23:01
  • 1
    @jmort253 wow this post takes me way back. Don't worry, this is when I was a newbie.
    – Jacob
    Jan 4, 2013 at 1:11

6 Answers 6


Licensing is for your own protection and for the protection of your intellectual property. If you do not have a pressing need to apply a license, there is no reason to do so.

A simple copyright will be sufficient to say "no one else can re-distribute my game."

  • Do I have to pay for a copyright to protect my game? Or can I legally just say that "no one else can re-distribute my game."?
    – Jacob
    Jun 28, 2011 at 19:19
  • 1
    @Jacob: Intellectual property laws vary from locale to locale. According to en.wikipedia.org/wiki/Copyright, however, "In most jurisdictions copyright arises upon fixation and does not need to be registered." Jun 28, 2011 at 19:21
  • 3
    @Jacob: If you live in a country that signed the Berne Convention, your work is Copyrighted the moment you put it together.
    – greyfade
    Jun 28, 2011 at 19:47
  • 1
    Your answer is short and to the point, but the bit that says "A simple copyright will be sufficient to say 'no one else can re-distribute my game.'" is far too optimistic. 20+ years of free software have repeatedly shown that proper license formulation is essential to make it enforceable. For example: the game the OP is talking about is technically not distributed but offered as a service. So one could snatch the code and run in on its own server without violating the © notice... Even the formulation "all rights reserved" has been debated in the past [what's a 'right'?].
    – mac
    Jun 28, 2011 at 23:53
  • What is "no one else can re-distribute my game" if not a license? (The more common wording is "all rights reserved".)
    – Jan Hudec
    Mar 8, 2013 at 12:24

Nothing needs a license, but it is a good idea to have one.

A license is generally for either stuff that you have to pay for, or for stuff that other people will use inside of their own projects. There isn't really a need to license a free game. However, licensing a game engine would be a good idea.

I'm personally a fan of the MIT License, which is GPL compatible.


A licence is a way to grant some permissions (reciprocal depending on the licence style). From your description you aren't looking to make your project open-source or free-software and from a quick look you aren't using any external components, so no, you don't need one.

The permission grant "only under my name, and without modifications" you describe is better expressed by a Creative Commons licence, CC-Attribution-NoDerivs.


If I need a license

As correctly pointed out by others. You technically don't need a license, but it's a good idea to have one.

In layman terms: since anybody who creates something automatically owns the intellectual property of his/her work, you are free to decide which rights you want to retain to yourself and which you are available to give to others. The two extremes here are "all rights reserved" and "public domain".

If you don't specify through a license what rights you grant to others and what rights you don't, the situation will be very confusing, as different countries default to different sets of rights.

my game to be totally free

Free as in "free beer" or free as in "freedom"? This normally translate in a "non commercial" license (free beer) or "FSF approved license" (freedom).

my game to be embedded on other websites

This is a relatively new problem related to the emerging of SaaS, or in other words to the fact you can let people use your software without them ever getting in touch with the software installation directly (so, without distributing it). You might be interested to tool into the Affero General Public Licence no one else can re-distribute my game, unless it is under my name and not theirs

Also, if I need a license, where do I include it?

This is what the GNU says about license inclusion for the GPL. I would recommend to follow the same advice regardless of the license you will choose to use. The problem with enforcing licenses is never with the interpretation of the IP owner will... it's always on minor details of its implementation, which leave space for loopholes to be exploited by... well you know... THEM! ;)

Licenses that resonate in my mind reading at your requirements: GPL, AGPL, Creative Commons Attribution-NonCommercial

Best luck! /mac

  • Thanks for your tips! I have another question, say if someone took my game, put it on their website, put their name all over it, and possibly copywrited it and licensed it too. Then say they try to sue me, can they? Should i copywrite my work? Or should i copywrite it and license it? Or nothing...?
    – Jacob
    Jun 28, 2011 at 19:53
  • 1
    @Jacob - There are two different problems here. One is the fact they use your code. The other is that they sue you. The first problem is tricky and you should check with a copyright barrister in your country: if you code is currently accessible without a copyright notice / license, in some country they might consider it as "in the public domain", so they 'bad guys' would have the right to use it. The second problem is easy: if you can demonstrate you wrote the code, they can't sue you. The intellectual property is automatically given to the creator of whater is being created. HTH!
    – mac
    Jun 28, 2011 at 20:02
  • Thanks again! I am starting to get a basic understanding of this copyright and license thing :/ (very confusing!) Anyways, about your recommendations, so far the only one i'm thinking of using is the Creative commons Attribution-NonCommercial-ShareAlike CC BY-NC-SA because it allows others to play my game and even play around with the game code a bit but credit me fully.
    – Jacob
    Jun 28, 2011 at 20:20

Having a license is always good even if your license gives complete freedom to other people, because people will know your intentions with the software.

A while ago I saw this video on how to use GNU GPL v3 licencing, it's not that good but will give you the idea of this license:


You want it free? Just pick a license. From that Jeff's post:

Because I did not explicitly indicate a license, I declared an implicit copyright without explaining how others could use my code. Since the code is unlicensed, I could theoretically assert copyright at any time and demand that people stop using my code. Experienced developers won't touch unlicensed code because they have no legal right to use it. That's ironic, considering the whole reason I posted the code in the first place was so other developers could benefit from that code. I could have easily avoided this unfortunate situation if I had done the right thing and included a software license with my code.

If you want it as free as possible and whatever, then go with WTFPL.

Your Answer

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

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