How can I use GPL software like Stockfish Chess Engine in my Unity game?
I am working on a 3D Chess game and I want to implement an A.I bot to play with the player. I found a chess engine called Stockfish which serves this purpose, and I would like to implement that engine in my project. Is it as simple as including the Stockfish code in my project or importing a binary as a plugin, or do I have to do something more complex because of the GPL licence?
You can implement their code as a plugin in your game, as long as you plan for your game to also be GPL-licensed.
You cannot incorporate Stockfish into a proprietary product, in the sense of bundling them together so that the user perceives them as a single program – which arguably describes typical methods of using 3rd-party plugins within your Unity project.
You cannot incorporate GPL-covered software in a proprietary system.
The goal of the GPL is to grant everyone the freedom to copy,
redistribute, understand, and modify a program.
You still have other options if your game is proprietary:
However, in many cases you can distribute the GPL-covered software
alongside your proprietary system. To do this validly, you must make
sure that the free and non-free programs communicate at arms length,
that they are not combined in a way that would make them effectively a
If the two programs remain well separated, like the compiler and the
kernel, or like an editor and a shell, then you can treat them as two
separate programs—but you have to do it properly.
I am not an expert in this matter, so I will leave this as a community wiki to be updated by other users. Here is a sketch of how I think you could proceed:
Create an installer for your game that installs your Unity executable and assets in one place, and Stockfish separately.
Your game runs the Stockfish program, communicating with it using Universal Chess Interface commands.
You provide a configuration setting where a player can choose to redirect this behaviour to use a different UCI-compatible chess engine if they so choose, so the two programs can operate independently of each other.
- Database Administration Tutorials
- Programming Tutorials & IT News
- Linux & DevOps World
- Entertainment & General News
- Games & eSport