I wish to develop a computer game and the engine I have chosen is ioquake3. This engine is licensed under GPLv2. Needless to say the game's source code will itself will, in turn, be licensed under GPLv2. The game data/assets on the other hand will be proprietary. I intend to release this game as a free-to-play app across various app stores with in-app-purchases for additional game data/assets. What I would like to know is if the code for the in-app-billing logic must also be included in the published GPL'd source?
What I would like to know is if the code for the in-app-billing logic must also be included in the published GPL'd source?
It depends how this billing code interacts with the rest of my GPL-licensed app. I provided a comprehensive overview of dependencies here
In general if my billing code is not linking with the GPL-licensed code and interacts at arm's length such as in a separate process it may not be subject to the GPL. The devils is in the details. Best will be to get an advice from a FLOSS-savvy lawyer. Heather Meeker has an excellent book on the topics
Section 2.b of the GPL 2.0 states:
You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
and later sections 2 also reads:
These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
What this is saying is that by making a game that incorporates an engine under GPL 2.0, then the full game must be distributed under the same license. That is the full thing, including the billing logic, and also including the assets.
As a general consequence, you should avoid game engine under GPL if you want to develop proprietary games.
I can see that this does not seem to be the opinion of the authors of the engine since the README states:
This does NOT mean that you cannot market this game commercially. The GPL does not prohibit commercial exploitation and all assets (e.g. textures, sounds, maps) created by yourself are your property and can be sold like every other game you find in stores.
But also not technically inaccurate, this paragraph is misleading. It would probably be a good idea to ask them why they don't license their engine under LGPL 2.1, 3.0 or MPL 2.0 if it is their intention to let people make proprietary games with their engine.
To keep some assets proprietary
You can keep some assets proprietary if you make sure that they appear as "independent" from the game itself. It would not be the case of an image that is needed to navigate the game menu. But it could be the case of a game level depending on the way this is encoded.
To make an analogy a GPL music player may be distributed with some example tracks. These tracks are clearly an independent work from the music player even though a music player is useless without any track to play. Thus they can be distributed under another license.
If the game levels can be contained in files that make them similarly independent of the game software itself, then these would not need to be distributed under GPL.
To keep part of the code proprietary
The only way to keep part of the code proprietary is to create two independent programs which can talk to each other via files or pipes or similar "arm's length" communication.
For instance, in the case of your billing logic, it could be an independent application which would be there to download or unlock new levels.
However you say that you distribute your game through an app store. I don't know if app stores allow in general the distribution of two programs in the same package.