2

Suppose I have a video game, and the player can interact with a computer in the game to find a file. Suppose the player can view the contents of a file in the video game, but otherwise the computer is non-interactive. I.e., the player can browse directories and choose/view a file, but otherwise no programs will be "run" on the computer, nothing will be compiled in any sense, etc. This would, more or less, be no different than browsing source online -- you don't "do" anything with the source code in your browser except view it, you would have to download/copy it to use it in a program.

The GPL says

To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.

In the above example the entire video game would be "conveyed" to the end user, but the game does not entirely enable "other parties to make or receive copies" of the GPL source code in the sense that you can't "transfer" the source code out of the video game to your computer (but you could copy it by hand if you wanted to...).

The video game engine would not be GPL.

Can I include (in the above sense) files licensed under GPL (3 if I have to pick a version), without changing the license of the overall video game? Or would it be safer to use MIT etc licensed files only?

1
  • 1
    If it is just about 'looking at the code', why don't you use code that is under a permissive license? Does your gameplay somehow depend on the GPL-ed code? How do you distribute the game to the players (is it actually transferred to their computer, or do they play on-line)? Oct 22, 2022 at 14:36

2 Answers 2

4

The GPL FAQ covers exactly this use case.

The exception would be when the program displays a full screen of text and/or art that comes from the program. Then the copyright on that text and/or art covers the output. Programs that output audio, such as video games, would also fit into this exception.

If the art/music is under the GPL, then the GPL applies when you copy it no matter how you copy it. However, fair use may still apply.

Keep in mind that some programs, particularly video games, can have artwork/audio that is licensed separately from the underlying GPLed game. In such cases, the license on the artwork/audio would dictate the terms under which video/streaming may occur.

So, no, the GPL-covered code displayed in the video game would not require you to put the entire game under GPL, but if there is a video stream (or a screenshot) that shows the code (and this might be outside of your control if a stream or screen shot is created), then this stream or screen shot might be under GPL. And in this case, you obviously have to comply with all the requirements of the license, i.e. include the license language, the copyright attribution, etc.

My recommendation is to not use GPL-ed code (or other GPL-covered content) as a world-building object in a video game, but instead use code under a permissive license, which reduces the requirements and grey zones you are exposed to.

3

If your game is essentially a filesystem viewer, I would not expect the license of what is available to be viewed to affect the license of the viewer in general. The GPL FAQ clarifies that even a GPL programming-language interpreter can execute non-GPL code, because the external code is "just data" to the GPL program. So surely merely displaying GPL code in a non-GPL viewer is similarly fine.

However, I will note that if you transfer GPL material to a user (even in not-easy-to-use form, like an image with the text of GPL work on it) you have to also make available the copyright notices and GPL license text, plus the source forms of any binary/object-form material you make viewable in this way. This doesn't affect the licensing of your viewer but simply imposes an additional set of items to make viewable.

Your Answer

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

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