For decades now, it's been fashionable for game developers, along with other software developers, to withhold their games' source code, keep it secret. But why? As far as I can tell, people do this not because of any inherent benefits they see to withholding the source code, but because everyone else (well, almost everyone else) does it. In truth, there is no reason for people to be doing this.
Don't misunderstand me: I don't just mean to say that there's no reason for people to be doing this with non-commercial games. Keeping source code a secret is unnecessary for commercial games, too. Commercial games are perfectly viable without keeping their source code secret. In fact, I am going to argue that not only is there no harm in the public having access to the source code; there is not even any harm in putting the source code under a Free/Libre and Open Source Software (FLOSS) license.
The Point of Source Code Secrecy in the First Place
"What?!" I hear you say. "How can there be no harm to my business in making my game FLOSS?" To understand the answer to this question, you must first understand what the point was in keeping source code secret in the first place.
Understand: keeping source code secret does not by itself do anything to stop unauthorized copying. A binary distribution of a game can be distributed just as easily as source code. Therefore, there must be some other reason this trend of keeping source code secret started.
The practice of withholding source code came about in 1969. IBM was the first party to charge for its software and withhold the source code to it. One has to wonder why IBM refused to provide source code, though; after all, copyright law already gave IBM a legal monopoly over the distribution of that program. So what was the purpose of keeping the source code secret?
The answer is simple: the point of withholding the source code was not to make money from distributing copies of the program, but to have an additional monopoly on support services. Because only IBM had access to the source code to its software, any time users of the software needed a new feature added or a bug fixed, they had to go to IBM, and IBM could charge more for the services because of this.
So in fact, the original reason for keeping source code secret, gaining a monopoly on support services, is not even applicable to video games. Video games aren't even tools, and video game developers don't sell support services. People who play the games just buy them once and play them, or pay a regular fee for continued access to a server.
The New Point of Source Code Secrecy: DRM
More recently, a new reason to keep source code secret has arisen: DRM, which proponents say stands for "Digital Rights Management", though I prefer the more clear and accurate term, "digital restriction mechanisms". Basically, a digital restriction mechanism is a mechanism which intentionally restricts what a user can do. Put another way, it's the function of refusing to function.
Keeping source code secret is essential to making digital restriction mechanisms work. If the user has the means to remove the feature that restricts them (the source code), the restriction can't work reliably.
But even if small video game developers were able to put effective digital restriction mechanisms into their games, and even if the public was not strongly against restriction mechanisms, it has been shown time and time again that digital restriction mechanisms just doesn't work. There is a reason DRM use has died in music: it has been clearly demonstrated that it doesn't stop unauthorized copying. All it does is inconvenience legitimate customers and encourage them to obtain unauthorized copies that will actually work instead of buying authorized copies that won't work.
In short, source code secrecy is needed for digital restriction mechanisms to work, but such mechanisms are not any good in the first place.
Game vs. Game Engine
So it's clear that keeping the source code to a commercial game is completely unnecessary, but perhaps you think that, while it would be fine to distribute the source code to your games, it would be suicide to release that source code under a FLOSS license such as the GNU General Public License. After all, if you did that people would be able to just share copies of the game freely; how would you make money in that situation?
In fact, it might still be possible to make money in that situation. Crowdfunding can theoretically earn you money upfront to pay for the full cost of developing the game plus a good paycheck for the developer(s). It's also been shown that people will pay for quality entertainment such as games voluntarily; the Humble Bundle is a good example of this in action, and there are even some FLOSS games such as Sleep Is Death which use this model.
But these ideas have not had thorough testing, so let's assume that while these methods may work for some developers, they won't work for every developer. To understand why the most widely-used method of making money from game development, selling copies, would be unaffected by releasing the source code under a FLOSS license, you must understand and be fully aware of the distinction between the game and the game engine.
You may tend to think of the game as being one piece, but in fact it's made of two parts: the game engine, and the game data. The game data further consists of two major parts: the art assets, and the scenario.
The art assets are, obviously, things like sprites, 3-D models, sounds, and music. What exactly the scenario is depends on the game. In many simple games, the scenario will be a collection of levels. In some scrolling shooters, the scenario might be a list of what attack patterns to use at what times. In RPGs, the scenario will be a combination of the world, the quests, and the story.
The other half, the game engine, is the source code: the software that allows users to play the game.
With this distinction kept in mind, it is fairly obvious how one might make money from a game that uses a FLOSS game engine: simply leave the game data or even just the scenario proprietary.
Benefits of FLOSS Game Engines
You might be asking now, "OK, but what's the point in releasing my game engine as FLOSS, anyway?" There are currently four main benefits:
Hopefully this is temporary, but currently, there are thousands and thousands of proprietary software games out there. There are far fewer FLOSS games. Being a part of this smaller pot as well as the larger pot of all games gives your game more exposure.
Benefiting from Other Developers
When several game developers release their engines under FLOSS licenses, this means that code reuse is possible on a much larger scale than when everyone keeps their own game engines to themselves. This makes it possible for faster and easier game development by all FLOSS game developers.
Easy Cross-Platform Compatibility (if you use the right libraries)
One major weakness of proprietary software games is they will only run on platforms you specifically support.
With FLOSS games, you don't need to worry about it; just provide binaries for some popular platforms and users of all the other platforms will do just fine compiling the source code themselves.
Volunteers May Help (though they probably won't)
It is popularly claimed that releasing a program as FLOSS will cause a lot of people to come over and fix bugs. In fact, this is false most of the time, but one thing that is certainly true is that it is possible for volunteers to contribute to a FLOSS game, and some may do so if the game is sufficiently popular.
I can think of three major counter-arguments against the use of FLOSS game engines:
"If I release the game engine as FLOSS, someone is just going to easily make their own game data and outcompete me."
In fact, for most games, making a whole new scenario is hard work, and most people just can't be bothered to do it. Take Freedoom, for instance; Freedoom is a project that has been in development for much more than five years as of 2013, and yet it is still in alpha. This can be attributed to a combination of lack of interest (everyone wants to play Doom or Doom II, not Freedoom) and the amount of work that needs to be put in for it to be done.
This contention is true enough for some games; Minecraft, for example, doesn't have any creative scenario to speak of (the scenario is entirely randomly generated), and in fact there are already suitable replacements for the art assets of Minecraft in a FLOSS clone, Minetest. But most games are not like Minecraft; most games have a significant enough scenario that any free replacement for it is not likely to cause a loss of profit.
"I won't be able to benefit from other people's engines, but other people will be able to benefit from mine without giving anything back to me."
This would be true if you released your game engines under permissive licenses, such as the Expat License (often ambiguously called the "MIT License"). But fortunately, this is not the only option. The thought of proprietary software benefiting from his work freely, giving them an unfair advantage, was the very reason Richard Stallman pioneered the concept of copyleft, which ensures that anyone who uses the FLOSS code in question does not do this. The most popular copyleft license, and the best choice in most cases, is the GNU General Public License.
"I don't want to share my source code because I think it's art (or some other similar reason)."
To be frank, I think this is as delusional as claiming that a DVD player is art because it's playing a wonderfully artistic movie.
Most game engines simply are not art. They are simply an interface to allow players to play the game. It's the actual game, the scenario, which is art.
If there is no scenario to speak of in the game, that doesn't make the game engine art, either. It rather makes the game more analogous to a simple toy than a DVD player playing a movie. Much like simple toys, such simple games don't tend to qualify as art.
Don't get me wrong; I appreciate code as much as the next guy. I'm a programmer, after all. But there's a difference between appreciating code and mistaking it for art.
"My source code is sloppy and/or inflexible; there's no way people would find a use for it."
The assumption that people won't be able to re-use your code might be unjust. Statistically speaking, no matter how good your code is, most of it isn't going to be re-used. But every program has a potential for re-use, including sloppy ones. If there is enough love for a game, that sloppy code will eventually become less sloppy.
Even if no one is interested in re-using your code for something else, that doesn't make the release of the source code meaningless. It is something the free/libre software community will appreciate, which gives you more exposure, and it makes it possible for the game to run on any system without you specifically supporting that system, assuming the game's dependencies run on those systems.
As you can see, not only is keeping the source code to your games unnecessary, you may be missing out on useful benefits because of it.
Of course, you can continue to make your game engines proprietary. It's your choice. But I hope you will make the wise choice: choose FLOSS, and don't look back.
Article Update Log
5 Dec 2013: Initial release 6 Feb 2014: Added an objection
About the Author(s)
Julian is an amateur game developer and FLOSS advocate. He has developed a handful of games, various small utilities, and a general-purpose 2-D game engine, all released under FLOSS licenses.