this post was submitted on 18 Feb 2025
13 points (100.0% liked)

Godot

6249 readers
91 users here now

Welcome to the programming.dev Godot community!

This is a place where you can discuss about anything relating to the Godot game engine. Feel free to ask questions, post tutorials, show off your godot game, etc.

Make sure to follow the Godot CoC while chatting

We have a matrix room that can be used for chatting with other members of the community here

Links

Other Communities

Rules

We have a four strike system in this community where you get warned the first time you break a rule, then given a week ban, then given a year ban, then a permanent ban. Certain actions may bypass this and go straight to permanent ban if severe enough and done with malicious intent

Wormhole

[email protected]

Credits

founded 2 years ago
MODERATORS
13
Copyleft GDExtension? (lemmy.kde.social)
submitted 2 days ago* (last edited 2 days ago) by [email protected] to c/godot
 

So, I started working on a new project, and I'm thinking of how to license it. Specifically, how to make it as copyleft as possible without making it unusable.

By unusable I mean the license blocking the game (or in a more likely case, any later project that reuses the code) from being published on platforms like Steam. I know that steamshim exists, but I'm not sure if that can be a real solution. Linking against the SDK seems completely optional in Steam's case, but license compatibility is listed as a hard requirement regardless.

The game code consists entirely of a GDExtension written in Rust, so I think I can just neatly LGPL the GDExtension "library" without restricting the game executable itself. It sounds like it should work, but there are some things that I'm not sure of, like hardcoded references to assets.

I really don't enjoy thinking licenses so I usually slap on either GPL or something permissive and be done with it. Anyone notice any holes in my plan, or am I good to go?

I know I can use my own code however I please, but it gets more difficult once there are multiple people involved; I've had one person express vague interest so far.

Thanks.

top 22 comments
sorted by: hot top controversial new old
[–] [email protected] 5 points 2 days ago (1 children)

You can "dual license" your code, proprietary and whatever strong copyleft you prefer. For users, it means copyleft, and for steam it means your code is compatible.

[–] [email protected] 6 points 2 days ago (1 children)

I believe this would require agreement from all contributors, or for them to sign some kind of contributor licence agreement.

[–] [email protected] 3 points 2 days ago

Yeah, different rights for the owner feel like a hindrance in that regard.

[–] Kelly 8 points 2 days ago* (last edited 1 day ago) (1 children)

MPL is a weak copyleft license.

If they make changes to your files then they have to share their changes to those files with a reciprocal license.

It has no impact on the licencing of the rest of their project.

[–] [email protected] 3 points 2 days ago

MPL is indeed my backup choice. I'd like it a bit stronger though, so I'm hoping to make LGPL work.

[–] [email protected] 3 points 2 days ago

The purpose of copyleft is to ensure the freedoms and restrictions made by a license are enforced by copies/forks/derivatives.

Best to talk to people interested in contributing to see what they would think?

[–] [email protected] 2 points 2 days ago (1 children)

Does your game use the steamworks SDK? If not, then you can publish it on steam as GPL or even AGPL

[–] [email protected] 2 points 2 days ago (1 children)

No, but Valve says this:

If your application contains third party open source code that is incompatible with the Steamworks SDK, then YOU MUST NOT DISTRIBUTE YOUR APPLICATION VIA STEAM.

https://partner.steamgames.com/doc/sdk/uploading/distributing_opensource

[–] [email protected] 3 points 2 days ago (1 children)

Interesting. So that phrasing sounds like even if you don't use the steam works SDK then you can't use GPL. I wonder how Krita reconciled that?

[–] [email protected] 5 points 2 days ago* (last edited 2 days ago) (1 children)

Interesting excerpt from Steamworks docs:

Which Open Source licenses are compatible with the Steamworks SDK?

In general, permissive licenses that do not put any requirements on you to redistribute your modifications under an open source license work fine. Common permissive and acceptable licenses includes MIT License, BSD 3-clause and 4-clause, Apache 2.0 and WTFPL.

Which Open Source Licenses are problematic for shipping on Steam?

Generally, any license that has a so-called “copyleft” element will be problematic when combining code with the Steamworks SDK. The best-known example is GPL.

But I saw a GPL-licensed application on Steam!

This can happen if the author of the code that is GPL-licensed has given the permission to do so. The author can of course always (a) decide to grant Valve a different license than the author grants everyone else or (b) decide that what the Steamworks SDK does is just a communication with a service that does not invoke the copyleft requirement of the GPL.

Sounds like (b) above could apply to you?

[–] [email protected] 3 points 2 days ago

Huh, I completely missed that part. Have to look at that more.

[–] [email protected] 2 points 2 days ago (1 children)

Why not LGPL the Rust code, and CC0 the glue code?

[–] [email protected] 2 points 2 days ago (1 children)

LGPLing the Rust code is what I'm asking about, but I'm unsure if the LGPL could touch the project in some unexpected way, like having project files hardcoded.

Maybe I'm overthinking it.

[–] [email protected] 2 points 2 days ago* (last edited 2 days ago) (1 children)

Afaik, LGPL means that the library has to remain dynamically linked. That's it. No static linking is allowed and no embedding (i.e. hardcoding) is allowed unless also the outer project is also in a LGPL-compatible license.

So, no, they wouldn't be legally allowed to steal your source by hardcoding it, if that's what you are worried about.

The issue is with code and resources that cannot be dynamically linked. I called them "glue code", that's the stuff developers need, in order to use your library. That is not directly your library, but you will be shipping it with your library, most likely. You will need a different license for those resources, maybe MIT or even a public domain license such as CC0.

EDIT: I noticed you mentioned Steamworks SDK in another comment. I know Steam provides an optional DRM solution which wraps games in their own proprietary system. That might be forbidden by LGPL, I'm not sure. But linking an LGPL library to the same game that links to the proprietary Steamworks SDK shouldn't be a problem, as long as the linking is dynamic and not static.

[–] [email protected] 2 points 2 days ago

I meant by hardcoding that it loads some assets from predefined paths from the project at runtime. I'm now thinking it's probably not a problem.

[–] [email protected] 1 points 2 days ago (3 children)

Why make it copy left? I thought Godot's spirit was being a usable engine you can use to implement your game and sell it, too. How does a copy left extension make anyone's life easier?

[–] [email protected] 3 points 2 days ago (1 children)

I think you're missing the important part that I'm building a game. GDExtension is just the means to use C++/Rust/etc. instead of GDScript for game code.

Why make it copy left?

I want to give access to the code, but at the same time I want the same courtesy from anyone who uses it.

[–] [email protected] 2 points 2 days ago (1 children)

Copy left would mean that games that use it must be open source and free to play, no?

[–] [email protected] 2 points 1 day ago (1 children)

It would mean open source, but the requirements and coverage depend on the license and how the code is used. I made this post to be sure that LGPL doesn't reach outside the library.

and free to play, no?

No such requirement.

[–] [email protected] 1 points 1 day ago

Copy left usually also enforces openness of products it is used in

[–] [email protected] 1 points 1 day ago* (last edited 1 day ago)

Godot's MIT license certainly let's you redistribute the engine as part of your proprietary game. However, it equally lets others redistribute their games under the same open source license, or even a copyleft license. So it's spirit seems equally business, hobbyists or free software moralist.

Copyleft helps me by making sure my code can't be included in a proprietary software. My code is there to be copied but if you make changes and redistrubte them then I get access to those changes. Maybe I use them in my software, thus improving it.

[–] [email protected] 2 points 2 days ago

Could be that theyre not an engine dev and so have different morals an opinions than them.