Open Web Arcade

What makes a browser game open source

Code you can read is not code you may reuse. How open-source licences work for browser games, why code and assets differ, and how to check a repository.

Every browser game sends its code to your computer. Open the developer tools and you can read the JavaScript, look at the textures and play the sound files. That does not make the game open source. What makes it open source is a licence: a written grant from the people who hold the copyright that says what everyone else may do with the work.

Source available is not open source

In most countries a creative work is protected by copyright as soon as it is made. If a developer publishes code with no licence, the default applies: all rights reserved. You can look at it, but you have no permission to copy it, change it or put it on your own site. GitHub's terms let other users view and fork a public repository on GitHub itself, but that is not permission to reuse the code anywhere else.

Some projects publish their code under terms that allow reading but restrict use: no commercial use, no redistribution, or no changes. This is usually called source available. It can still be useful to learn from, but it is not open source.

Open source has a specific meaning. The Open Source Initiative maintains the Open Source Definition and a list of licences that meet it, and the Free Software Foundation describes the same idea as four freedoms. In practice, an open-source licence lets anyone use the work for any purpose, study and change it, and share copies, with or without changes. The licences differ in what they ask in return.

The main licence families

The licences you will see on Open Web Arcade fall into a few groups. Every listing shows one of them, and the licences page lists the ones in use.

  • Permissive. MIT, BSD-2-Clause, BSD-3-Clause, ISC and zlib let you do almost anything, including closed-source and commercial use, as long as you keep the copyright and licence notice. Apache-2.0 is also permissive, and adds an explicit patent grant and a rule that changed files must say they were changed.
  • Weak copyleft. MPL-2.0 works file by file: if you change a file covered by it and distribute the result, that file stays under MPL-2.0, but the rest of your project can use other terms. LGPL-3.0 is aimed at libraries that programs under other licences may link to.
  • Strong copyleft. GPL-2.0 and GPL-3.0 require that if you distribute a modified version, you release the whole combined work under the same licence and make its source available.
  • Network copyleft. AGPL-3.0 adds one rule to GPL-3.0: if you let people use a modified version over a network, you must offer them its source. That matters for games with a server, such as an online chess site or a multiplayer strategy game.
  • Public domain dedications. The Unlicense and CC0-1.0 give up as many rights as the law allows, so the work can be used with no conditions at all.
  • Creative Commons. CC-BY-4.0 allows any use with credit, and CC-BY-SA-4.0 adds that adaptations must be shared under the same terms. These licences were written for art, writing and other content. Creative Commons recommends against using its licences for software, apart from CC0, partly because they say nothing about source code. You will still find them on some game repositories.

The labels on this site are based on SPDX identifiers, the short names used in package files and by many licence tools. A listing marked Proprietary is not open source: its developer keeps all rights and has chosen to let people play it.

Code and assets often have different licences

A game is more than its code. It has models, textures, sprites, music, sound effects and fonts, and these are often made by different people under different terms. A repository licence usually covers what the authors wrote. It does not automatically cover a sound pack bought from a store or a font with a commercial licence.

Several listings here show the split. The Lost Storm has MIT licensed code, while its third-party models, textures and animations are CC0 or CC BY 4.0 and credited in the project. Konterball has MIT licensed frontend code, but the commercial fonts it uses are not part of the repository. The HexGL repository says its code and resources are under MIT unless a file says otherwise. Freeciv-web uses AGPL-3.0 for its web client and the GPL for its game server.

So the licence on a listing describes the code. Before you reuse a model, a track or a font from a game, check the licence of that file.

How to check a repository's licence

  1. Look for a file named LICENSE, LICENCE, COPYING or similar at the top of the repository. GitHub detects common licences and shows the name beside the repository, but read the file itself, because detection can miss a modified or combined licence.
  2. Check the package metadata. In a JavaScript project, the license field in package.json usually holds an SPDX identifier.
  3. Look for separate notices on assets: a CREDITS, ASSETS or NOTICE file, a licence file inside an art or audio folder, or a list of sources in the README.
  4. Read file headers. Some projects mark individual files with their own licence or copyright line.
  5. Check which version you are looking at. A project can change its licence over time, and the terms that apply are the ones attached to the version you copy.
  6. If there is no licence, or it is unclear, ask the author before you reuse anything. Silence is not permission.

Why it matters to players

An open-source game can outlive the people who made it. If the original site goes away, anyone can host a copy. People can fix bugs, port the game to new devices, translate it or keep it working as browsers change. You can also read exactly what the game does, which matters if you care what runs on your machine.

Why it matters to developers

Open-source games are working examples of real problems solved: a physics loop, a renderer, a save system, a level format. A permissive licence lets you reuse that code in your own project with a notice. A copyleft licence lets you reuse it too, but asks that your changes stay open under the same terms. Knowing which is which before you copy saves trouble later.

When you publish your own game, choosing a licence is how you tell others what they may do. Without one, nobody can safely reuse your work, even if you would be glad for them to.

How Open Web Arcade uses licences

Every listing states a licence and, where the project has one, links to its licence file. When a developer submits a game under an open-source licence, the form requires a link to the source code. A third-party game is only hosted here if its licence allows it; otherwise it is listed with a link to where it already runs. You can browse by licence from the licences page, or read how to submit your own game.