Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove/replace/relicense non GPL compatible code #3020

Open
jacobguenther opened this issue May 15, 2024 · 37 comments
Open

Remove/replace/relicense non GPL compatible code #3020

jacobguenther opened this issue May 15, 2024 · 37 comments
Labels
Enhancement New feature or request

Comments

@jacobguenther
Copy link

jacobguenther commented May 15, 2024

Description

Refresher on the GPL license

https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html

Section 2 B

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.

Also in Section 2

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.

Why?

Many of the shaders in LuaUI/Widgets/Shaders/ are not licensed under a GPL compatible license. When the GPL should apply to them.
Many of the unit scripts in /scripts/units are licensed under CC BY NC ND(a non compatible license).

What area of the game does this feature request pertain?

Codebase or APIs

@jacobguenther jacobguenther added the Enhancement New feature or request label May 15, 2024
@jacobguenther
Copy link
Author

jacobguenther commented May 15, 2024

Recall the license the game is released under
https://github.com/beyond-all-reason/Beyond-All-Reason/blob/9ed63d0efa1c3787666002a03dfe518a933d1f19/LICENSE.md

BAR game code is released under the GPL v2 licence, though individual files can have their own license (specified in wupget:GetInfo). The Recoil Engine (which this game runs on) requires that all the code the games use be compatible with GPL v2 or later.

These are all of the files in luaui/Widgets/Shaders and their license.

// This shader is (c) Beherith (mysterme@gmail.com)
luaui/Widgets/Shaders/DrawPrimitiveAtUnit.frag.glsl
luaui/Widgets/Shaders/DrawPrimitiveAtUnit.geom.glsl
luaui/Widgets/Shaders/DrawPrimitiveAtUnit.vert.glsl
luaui/Widgets/Shaders/HealthbarsGL4.frag.glsl
luaui/Widgets/Shaders/HealthbarsGL4.geom.glsl
luaui/Widgets/Shaders/HealthbarsGL4.vert.glsl
luaui/Widgets/Shaders/commblast_range.frag.glsl
luaui/Widgets/Shaders/commblast_range.vert.glsl
luaui/Widgets/Shaders/decals_gl4.frag.glsl
luaui/Widgets/Shaders/decals_gl4.geom.glsl
luaui/Widgets/Shaders/decals_gl4.vert.glsl
luaui/Widgets/Shaders/decals_large_gl4.vert.glsl
luaui/Widgets/Shaders/deferred_lights_gl4.frag.glsl
luaui/Widgets/Shaders/deferred_lights_gl4.vert.glsl
luaui/Widgets/Shaders/fog_volumes.frag.glsl
luaui/Widgets/Shaders/fog_volumes.vert.glsl
luaui/Widgets/Shaders/global_fog.frag.glsl
luaui/Widgets/Shaders/global_fog.vert.glsl
luaui/Widgets/Shaders/ground_fog.frag.glsl
luaui/Widgets/Shaders/ground_fog.vert.glsl
luaui/Widgets/Shaders/metalspots_gl4.frag.glsl
luaui/Widgets/Shaders/metalspots_gl4.vert.glsl
luaui/Widgets/Shaders/nanospray_gl4.frag.glsl
luaui/Widgets/Shaders/nanospray_gl4.geom.glsl
luaui/Widgets/Shaders/nanospray_gl4.vert.glsl
luaui/Widgets/Shaders/sensor_ranges_los.frag.glsl
luaui/Widgets/Shaders/sensor_ranges_los.vert.glsl
luaui/Widgets/Shaders/sensor_ranges_radar_preview.frag.glsl
luaui/Widgets/Shaders/sensor_ranges_radar_preview.vert.glsl

luaui/Widgets/Shaders/global_fog_combine.frag.glsl
has code copied from https://github.com/libretro/common-shaders/blob/master/include/quad-pixel-communication.h and requires the copyright statement of the original as per the license of the original. MIT License so it is compatible.

MIT license that's actually fine
luaui/Widgets/Shaders/dof.fs

No license info given so GPL v2
luaui/Widgets/Shaders/ModelShaderGL4.frag.glsl
luaui/Widgets/Shaders/ModelShaderGL4.vert.glsl
luaui/Widgets/Shaders/fastTexelNoise.frag.glsl
luaui/Widgets/Shaders/gaussianBlur.frag.glsl
luaui/Widgets/Shaders/gbuffFuse.frag.glsl
luaui/Widgets/Shaders/global_fog_combine.vert.glsl
luaui/Widgets/Shaders/infolos.frag.glsl has copied code fragment that has no license should probably change the numbers in that.
luaui/Widgets/Shaders/infolos.vert.glsl
luaui/Widgets/Shaders/outlineApplication.frag.glsl
luaui/Widgets/Shaders/ssao.frag.glsl

@jacobguenther
Copy link
Author

Most of the license violations are in the scripts/units/*.bos files because some use CC BY NC ND

@jacobguenther
Copy link
Author

Wow luaui/Widgets/map_grass_gl4.lua

license = "Lua code: GNU GPL, v2 or later, Shader Code: CC-BY-NC-ND 4.0",

The shader code is embedded in the lua source file.

@Beherith
Copy link
Collaborator

Noted

@jacobguenther
Copy link
Author

These are the bos files that violate the GPL(CC BY NC ND)
And the scripts/Raptors/License.txt so everything in the Raptors folders aswell.

scripts/Units/armack.bos
armck.bos
armcom.bos
armcomboss.bos
armflea.bos
armham.bos
armjeth.bos
armmark.bos
armpw.bos
armpwt4.bos
armscavengerbossv2.bos
armvang.bos
armwar.bos
corbats.bos
corbhmth.bos
corblackhy.bos
corcat.bos
corcomt2com.bos
cordoom.bos
corfdoom.bos
corfhit.bos
corgatreap.bos
corhlt.bos
corkorg.bos
corscreamer.bos
corshiva.bos
corspec.bos
corstorm.bos
corsumo.bos
corvoyr.bos
legbal.bos
legbart.bos
legbastion.bos
legcom.bos
legcomlvl2.bos
legcomlvl3.bos
legcomlvl4.bos
legcomoff.bos
legcomt2def.bos
legsrail.bos
raptor_turretl_v2.bos
raptor_turrets_v2.bos
raptor_turretxl_v2.bos
raptor_worm_m.bos

@jacobguenther
Copy link
Author

jacobguenther commented May 15, 2024

So I went through the widgets and this is what I found.

If you want to add an explicit copyright you can do something like what is done in luaui/Widgets/camera_shake.lua which also adds an explicit license. Otherwise I think the license that applies is the GPL v2 because that's what the code defaults to.

--  file:    camera_shake.lua
--  brief:   Camera shakes
--  author:  Dave Rodgers
--
--  Copyright (C) 2007.
--  Licensed under the terms of the GNU GPL, v2 or later.

luaui/Widgets/death_messages.lua
license = "GNU GPL, v2 or later, BA/BAR only",
This isn't compatible.

All of the following have some variation of
license = "Lua: GNU GPL, v2 or later, GLSL: (c) Beherith (mysterme@gmail.com)",
luaui/Widgets/api_chili_draw_gl4.lua
luaui/Widgets/dbg_quadtree_atlas_tester.lua
luaui/Widgets/flowui_gl4.lua
luaui/Widgets/gfx_decals_gl4.lua
luaui/Widgets/gfx_deferred_rendering_GL4.lua
luaui/Widgets/gfx_global_fog_gl4.lua
luaui/Widgets/gfx_ground_fog_gl4.lua
luaui/Widgets/gfx_nanospray_gl4.lua
luaui/Widgets/gfx_paralyze_effect.lua
luaui/Widgets/gfx_volumetric_clouds_gl4.lua
luaui/Widgets/gfx_airjets_gl4.lua
luaui/Widgets/gui_infolos.lua
luaui/Widgets/gui_metalspots.lua
luaui/Widgets/gui_sensor_ranges_jammer.lua
luaui/Widgets/gui_sensor_ranges_los.lua
luaui/Widgets/gui_sensor_ranges_radar.lua
luaui/Widgets/gui_sensor_ranges_radar_preview.lua
luaui/Widgets/gui_sensor_ranges_sonar.lua

Some Non GPL or funny licenses that people have.

luaui/Widgets/gui_keybind_info.lua
license = "GNU GPL, v2 or later, Mouthwash",
No clue what the Mouthwash license is.

luaui/Widgets/cmd_transport_preserve_commands.lua
license = "idklmao"
Me too

luaui/Widgets/cmd_take_proxy.lua
license = "WTFPL"

luaui/Widgets/dbg_startbox_editor.lua
license = "PD"

@sprunk
Copy link
Collaborator

sprunk commented May 15, 2024

Some Non GPL or funny licenses that people have.

horses got removed?

EDIT: i checked and horses are still there as mandated by https://springrts.com/phpbb/viewtopic.php?f=14&t=48252 .

@jacobguenther
Copy link
Author

I didn't look at the gadgets and also missed that in
luaui/Widgets/unit_default_spy_move_cloaked.lua
license = "WTFPL and horses"
safe and sound.

@jacobguenther
Copy link
Author

luarules/gadgets/cus_gl4.lua
license = "Private while in testing mode",

Some other places with
license = "Lua: GNU GPL, v2 or later, GLSL: (c) Beherith (mysterme@gmail.com)",
luarules/gadgets/gfx_raptor_scum_gl4.lua
luarules/gadgets/map_lava.lua

@jacobguenther
Copy link
Author

I'm unclear, do people currently think that the shader code copyrighted by Beherith isn't already licensed under GPLv2? The zero k people seam to think that it is not GPL(I haven't talked to them) but they added

// Beherith (mysterme@gmail.com) claims copyright on this file. He gives the Zero-K team permission to
// use this for ZK but he would be unhappy if it were copied further without asking him, so best to ask.

to their shaders. If Beherith wanted to retain control over the code they should have

  • Not commited it to a project whose license is GPLv2, thereby agreeing to the license.
  • Added all rights reserved when they did add it to the repository and it should have been rejected.
  • Added a GPL compatible license that they found acceptable.

But its GPLv2 baby.

GLSL is compiled, linked and executed by the gpu driver, not the engine. Since the gpu driver isnt GPL, neither is GLSL.

  • Beherith

But Beherith doesn't seam to think that the shader code falls under the GPL or has too. That statement has nothing to do with how the GPL works. I've already posted sections of the license that outline why the GLSL has to be under a GPL compatible license.

@sprunk
Copy link
Collaborator

sprunk commented May 18, 2024

Some of my stances (which don't necessarily represent ZK)

GLSL is ran by the graphics driver?

  • I consider the engine to be linking with shaders since it has an internal handle and uses it for interfacing with the code - for example setting uniforms
  • under this interpretation, what prevents using an indirect component to launder absolutely anything? "Oh my proprietary program doesn't actually link to this GPL component, it merely links to the operating system and does a dlsym("gpl.exe") syscall, it's the OS that actually links to that code"
  • the answer is that the GPL doesn't actually care what component runs what code, what matters is distribution and packaging (see below for the art caveat)

Art vs engine, in general

  • I think the "art is exempt" (for any type of art, including the obvious like textures) engine stance is not really GPL-compliant. A game package is licenced as a whole, with all its art inside regardless of what engine it runs on (since it can run on multiple, remember how very early spring archives may have been largely valid for the TA "engine")
  • I think it would be GPL compliant to distribute art as a separate .sdz archive, which would be legal to licence as anything (incl. keep proprietary) because it contains no code for GPL to poison, and use it as a dependency for the main archive
  • the big practical benefit is that such split is a clear signal for modders/contributors on what is legal to use and what is not. Right now you have this web of licence files that then get ignored because random linux foss people see a "BAR is released as GPL" general note somewhere and then feel entitled to take the whole archive apart (which I believe they technically are).
  • a technical hurdle is that idk if Rapid handles foo:stable dependencies well, since I don't think any game does that. Maybe it's a prompt to solve that though
  • see also the Fiction section at the bottom.

Code vs art

I don't think there's anything preventing a piece of work from being both Code and Art. Being Art just usually comes with being Not Code, and it is being Not Code that makes GPL not apply. See the table:

art not art
code GPL GPL
not code n/a n/a

Not Code + Not Art would be crap like springignore.txt. It could be put in the proprietary-licenced dependency archive alongside art, despite not being art, because it is not really code so not subject to GPL.

Meanwhile a Lua code like

local function DrawSomeFancyComposition()
  gl.Blabla(foo, bar)
end
gl.BeginEnd(DrawSomeFancyComposition)

I would consider art, but that doesn't stop it from being code, so GPL applies. However you can do for example gl.DrawModelShape("rocko.s3o"), the rocko s3o is Art + Not Code and thus can be licenced as proprietary.

GLSL is a art?

I think GLSL is code, which makes it subject to GPL. Sometimes it's very unambiguous, for example the radar preview widget (which I hear there was some unhappiness about) has to do some terrain heightmap raytracing to figure out the blocked parts. To me this is Code (which I think settles it) but also fairly clearly Not Art (which is think should also settle it for those for whom Art and Code are disjoint and mutually exclusive).

I think the way to keep the artsy parts of shaders proprietary is to make use of non-code assets, like in the rocko s3o example above.

  • a 1x10 image is a palette definition with 10 colour constants.
  • RGBA can be interpreted as vectors as well.
  • if you draw something relatively simple, say the wavy circles of the radar preview, you can bake it into an image (an art asset). Then sample the texture instead of running the code that would generate it.

Fiction

  • the licence doesn't actually prevent anybody from just stealing proprietary files, anybody can do that and there is nothing you can do about it. Back in the mid-2000's basically the entire Spring ecosystem used pirated OTA content without much care. At one point somebody straight up sold some sort of GPL-violating ba/techa clone running on Spring on Steam ("MARS Total Warfare", look it up) and Spring engine devs' complaints had essentially no effect. In particular, Ares wouldn't think twice if he had the technical competence.
  • on the other hand, just because I think the GPL technically poisons the whole archive doesn't mean I won't respect your intended licences and I would hope the others would behave the same. Similarly with mis-licenced art (CC-ND lets people take it, but I won't because I know you actually mean/intend "proprietary" and I respect that). But keep in mind that random modders won't necessarily know this and may only look shallowly at the "whole archive" level.

Things other than GLSL

  • as an Engine Dev™, I would be willing to make an exceptional concession and turn a blind eye to BOS staying proprietary or CC-ND. This is because GPL is all about Freedom, and a world free from BOS is worth this principled inconsistency
  • as mentioned elsewhere a few times, your intepretation of CC-ND (for non-code assets) is actually what the whole world knows under the name 'proprietary'. This is legally fine and I think it is in your own best interest to mark it as such.

@p2004a
Copy link
Collaborator

p2004a commented May 18, 2024

a technical hurdle is that idk if Rapid handles foo:stable dependencies well, since I don't think any game does that. Maybe it's a prompt to solve that though

RapidTools handles the modinfo depends fine and pr-downloader supports this for some time, I even test that.

@GoogleFrog
Copy link

GoogleFrog commented May 18, 2024

I broadly agree with the legal stances put forth by @jacobguenther and @sprunk. A notable point of disagreement is that I wouldn't say a whole sdz needs the same license, but I would disagree for practical and historical reasons. If combining and running multiple sdz packages at once (aka mutators) were reliable and easy to develop, then separating by license would be a nice approach. I also think that doing so may be a good idea for BAR, even with the technical costs, to clear up all the confusion.

Anyway, as @sprunk says, these licenses are mostly fictional anyway. But a lot of contributors are too new to know about the previous norms and fictions, so I thought it would be useful to provide a summary. My message here is that licensing isn't just something the current BAR and engine developers can arbitrarily decide upon. BAR represents decades of work (a not-insignificant proportion of which is mine btw) by dozens of developers contributing to a project under the understanding that certain licenses would be upheld.

I recommend reading this post on the difference between the Open Source and Free Software mindset. I'm not saying everyone who uses one or the other word thinks that way, because it is just language we pick up on the fly, but it is good to be aware that this distinction exists.

My History of Spring (aka Recoil) Licensing

Spring seems to have been in public development since around 2004, and I joined the Spring community some time in late 2007. So I did not know some of the founding engine developers, but the cohort from around 2008 to 2015 seemed to be very FOSS-oriented. I'm talking about things like:

  • Poor documentation for building the engine on Windows, compared to Linux.
  • Penguin forum avatars.

It is also worth mentioning that Spring was predominately, but not entirely, populated by games that took art assets directly from Total Annihilation, and from modders that created art for TA mods. Some other games started as original IP mods for TA, which were then ported to Spring by their creator. And as time went on, original games for Spring started to be created. There was even a game called PURE that its creator, Argh, sold for money. Which people generally thought was a fine thing to do.

The TA modding scene seemed to have a lot of forking and sharing. I wasn't there, but from what I gather, many people would create "unit packs" that could be installed to your copy of TA, rather than complete mods. There were also overhaul mods that re-balanced the whole game while incorporating units from packs made by other modders. Some of the results of this process were ported to Spring, and the mods kept forking off each other. There were a bunch of games, AA got forked and replaced by BA, which got forked to CA (later to become Zero-K), and there were "spinoffs" like SA, TechA and NOTA.

Drama emerged between the TA-Spring modding scene and the original IP Spring game dev scene, because some of the TA-style modders felt they could take art from the original IP games, since that was the norm within the TA space. The original IP creators did not want their art appearing alongside stolen art (from the creators of TA), and besides, the 1997 art was pretty dated. The game developer scene was also less FOSS-oriented than the engine devs, and people wanted to retain the look of their games or even have the option to sell them. This was further complicated by the fact that lua scripting was added to the engine sometime in late 2006, and the engine developers were quite adamant about FOSS, so game content was no longer "just" art (that said, animation scripts already existed). To resolve all the arguing, the engine devs released this statement: https://springrts.com/phpbb/viewtopic.php?t=17847

image

This is what I have been working with since 2009. I had assumed that everyone was working with the intention laid out here. A similar statement was put on the wiki about licensing mutators, which is just engine-speak for game packages that use content from other game packages via a dependency system: https://springrts.com/wiki/Licenses_Forking_Mutators

image

I anticipate three issues with the above statements.

  1. These aren't licenses, they're just "official statements".
  2. If these were licenses, wouldn't they violate the GPL ala @sprunk?
  3. These barely mention GLSL, the primary topic of this ticket.

1. Those aren't licenses

I fundamentally view all this license stuff as a formalisation of the expectations and desires of anyone who contributes to Spring, BAR, or any other game that uses Spring. Standardised licenses are great at setting expectations for people outside the project, provided they are actually used properly, but we need not limit ourselves by their relative lack of fidelity. We, on the inside, have more information about what the writers of the license wanted, so we need not limit ourselves to a strict legal interpretation. Writing airtight licenses is hard work that hobbyists don't get into hobbies to do, so we should cut them some slack and take what they meant into account. To do anything else would be to do everyone who built this project a disservice.

I think we have a moral obligation to the past. Think of it as paying it forwards, other people spent two decades building this amazing engine and extending it with all these scripts and shaders. And all they require of us is to leave the improvements we make to the developers of the future.

2. Do those statements contradict the GPL?

If they do, then I think we should update the licenses or the way we package games, possibly even do what @sprunk suggests to do so. I am pragmatic here though, so as long as everyone is operating in the spirit of the correct version of the license, I'll be happy. I care about people upholding the spirit rather than the letter what past contributors wanted.

The engine devs got together in 2009 and made a compromise that the game devs seemed to agree to. It stopped the TA-style games taking original art from other games, but it left the main FOSS desires of the founders and developers of the engine intact.

3. But what about shaders?

The official statement from the developers makes no mention of shaders. There is one mention in the associated comment thread about how this statement might dissuade people from releasing commercially viable shaders (which tacitly assumed that shaders were covered), and a response saying that having people share good shaders seemed like a feature, not a bug. Neither commenter was an engine developer, so I'd put low weight on that interaction. The wiki page mentions shaders, but it is just a wiki page written seven years later, what does it know?

As someone who was writing widgets at the time, I think the answer is quite simple. Lua was new, few people had touched shaders, and the shaders that had been written were included as string literals (ie big blocks of text) within the widget that used them. So shaders were barely considered, and they appeared in lua files, which were GPL. The most prolific creator of shaders at the time was jK, who was also an engine developer, and his shaders sit in lua files. Take a look: https://github.com/ZeroK-RTS/Zero-K/tree/master/lups/ParticleClasses

The practise of creating separate shader files only arose later, as shaders became more complex and more general shaders were written. In short, I don't see any basis for the idea that the engine devs left a GPL carve-out for shaders, and the state of shaders at the time implies that they very much wanted them to be GPL.

BAR and BA

The final bit of relevant history is how BAR forked from BA. This took many years of excruciating drama, and I only watched from the outside so am not the most qualified to talk about it, so I'll summarise the relevant bits.

  • The BA community turned super-toxic, alienating them from the BA developers and engine developers. I don't 100% blame BA, but they were certainly the most anti-social.
  • The idea of some sort of BAR had been floating around for years, with people making models for it (Zero-K had already replaced the TA models of CA in 2010, but the playerbase persisted and the devs were the same).
  • BAR was created, but was in conflict with the toxic people now in charge of BA, and there was concern about BA just stealing all the BAR advances.
  • I observed a general and gradual locking down of code sharing. Things were shared with "please don't let BA take this" caveats, and then more recently, started not being shared at all.

Don't take the above as gospel as I may have misconstrued something. I just don't think the BA part of the history has much relevance. Perhaps the ugly split from BA caused BAR to be licensed more strictly, but I don't think BA is relevant now. My take on BA is that such toxic people don't care about licenses, but won't be able to coordinate a functional project in any case, so it isn't worth worrying about them. Besides, I accept anyone's right to give their models, images and sounds propriety licenses.

What does this all mean?

All this history and "obligation to the past" stuff gets us to basically the same place as the legal view put forth by @jacobguenther and @sprunk. Which is what you would hope, because that is fundamentally what the license is for. Some people might find the history more compelling though, and it does help us clarify things where the license might be perceived to be a bit unclear.

But what about stealing BAR?

Does this mean that anyone could grab BAR from the repository, replace the models, sounds, and images, and release their own knock-off BAR? Yes. That is exactly what this means. Everyone who contributes to this, or any other Spring project, just has to get over that fact. It is the price of using the engine.

To be clear, this is not some punitive arbitrary price. The engine would not even exists if not for the license, because it would not have attracted enough interest and developers to see it beyond its first decade. Many of the contributors see the license as a selling point. It insulates projects from the whims of any one developer.

The current iteration of the engine, the Recoil fork, wouldn't even be (ethically) possible without the GPL. Sometimes forks have to happen for the health of the whole project.

@ashdnazg
Copy link

ashdnazg commented May 18, 2024

Personally I don't believe in licence crusades.
I would encourage licencing shader code in a way that's GPL compatible, but it's not worth having community-splitting arguments about.

Remember that our main goal is to make great games and not to be licence lawyers.
I see the community guidelines are a form of (positive) peer-pressure, not as a something which is legally binding.

I don't think a court will find that GPL-incompatible scripts and/or shaders break the GPL, but even if it did, some non-free shaders have a lesser risk of damage than a full blown crusade.

If you want to protect Spring from GPL violations, a better candidate for your zeal would be [MARS] Total Warfare, why not start there?

@GoogleFrog
Copy link

GoogleFrog commented May 19, 2024

You raise a good point @ashdnazg (good to hear from you by the way), is this worth it? Is this just a license crusade, pointless license-lawyering? I don't think it is, because the licenses have been like this for a while, but the topic only reached this point when they started causing real trouble.

BAR and Zero-K are attracting new contributors with differing levels of experience with open source licenses. The unclear, and seemingly violating, are confusing people and fostering disagreement over what people are allowed to do, and even over what kind of project they want to contribute to. There are disgruntled contributors (I don't know to what level of contribution though), and some might even have left over it (although that may be more due to propriety art in general, they can speak for themselves if they wish to clarify things).

More History

Here is a bit more background. The time for a pure license crusade was a few years ago, back when Beherith and I first talked about licensing shaders for Zero-K. I said something to the effect of "That's nonsense, shaders are already GPL" quite early in the conversation, but we kept talking and agreed to put the following at the top of shader files from BAR:

Beherith gives the Zero-K team permission to use this for ZK but it should not be copied further without asking him.

I later expanded it to a more explicit version that sits in the files above, and that was mentioned above

Beherith (mysterme@gmail.com) claims copyright on this file. He gives the Zero-K team permission to
use this for ZK but he would be unhappy if it were copied further without asking him, so best to ask.

Perhaps that was weak, and I should have stuck to the ideal. But I was just doing what I imagine you would suggest; talking and figuring things out. I thought Beherith was motivated by a desire to screw over BA, which I can appreciate given how toxic that community ended up. I thought BA would collapse under its own dysfunctionality, so it wasn't worth eroding at the soul of open source to hinder BA further, but I put the message in the files, as a courtesy. I assumed that this BA paranoia, and that shaders would continue to be functionally GPL for everyone else.

But then, in recent years, BAR attracted more contributors, but BAR became increasingly locked down. A lot of it isn't to do with shader licensing, but it gives off bad vibes. Modding, in the usual Spring sense, is prohibited, and while I get that there are some technical challenges, there doesn't seem to be any rush, and my impression is that many of the challenges are around how to protect BAR content from modding. Some modders seem to be making entirely different games inside BAR modoptions, factions that you can toggle to enable. Other modders are making game modes out of the elaborate unitdefs_post base64 code execution system I put in ZK a few years ago, which someone ported to BAR.

The tone change first affected me a few months ago. A Zero-K contributor was working with Beherith on adapting a shader for Zero-K, and repeatedly insisted that they tell me to reach out directly to Beherith to ask for permission to use the shader. The first time I was asked, I thought the contributor had just noticed the copyright notice at the top of the file, and I said we had a standing agreement for that. But later, it became apparent that Beherith asking directly, so I asked, and got the response that he was "unhappy I did not ask sooner", but that he would graciously "not throw us under the bus" due to my failure to appease him. It was maddening, just beyond the pale. Managing PRs is hard enough without keeping track of propriety GPL violating licenses on code.

I had asked about using shaders before that happened, but not since, not that much has happened since. I ported and improved the accuracy the radar preview shader, but I consider it WIP and haven't actually released it. Sprung later told me that it looks like it was adapted from engine code, so can't be owned by Beherith anyway. Later, about two weeks ago, I started looking into GL4 lights and asked about a noise DDS texture, only to be told that GL4 lighting is licensed exclusively to BAR.

Anyway, that is all just to fill you in on what has been going on in the past few years, which you might have missed. The BAR mods are using BAR models, sounds and image (well, idk exactly what is up with the third faction mod), and BAR is completely free to decide which games it hosts on its server. I can't say BAR is not allowed to run its own community this way, with respect to these aspects, and remain consistent with my acceptance of the official statement from 2009. But, while I have probably misconstrued a detail somewhere, the big picture view, the vibe that comes through, is that of a project that would claim as much copyright as it can get away with, over as much of itself as possible.

By the way, I didn't start this "license crusade" (whatever it is), all I had done was talk to Beherith. BAR contributors were noticing and talking about these things themselves. I only piped up quite recently to say I don't want to talk about it in dribs and drabs on Discord, provided three dot points on my view, and said I'd talk about it in a more structured environment. This ticket became that environment.

Why Care?

This stuff is important because most contributors encounter BAR first, and Spring second, if ever. BAR is setting the licensing standard for this new generation of developers, and any projects they might start. How BAR does it will just be how it is done, especially if the people who care about GPL adherence are filtered out of the contributor pool. I don't want to spend all this time arguing or talking about licenses, but this seems like the best time to do it. The GPL violations remain limited, but many people looking to join a project are excited to make stuff, not discuss licensing, so in my experience they'll just copy the established standard. Before you know it, proprietary content and code becomes the dominant culture of Spring. It will become a codebase you can look at, "Open Source", rather than a true piece of Free Software that people can actually usefully use and build upon.

Keep in mind that we are not just talking about "some non-free shaders", we're talking about almost all of them. Modellers new to Spring are learning how to create assets in the context of these shaders, with relatively modern tools such as GL4 lighting. So what happens when a BAR contributor wants to go make their own game, and Beherith doesn't particularly like them or their game? Half their workflow is going to be ripped out from under them.

  • Lighting? Copyright.
  • Ground decals (I don't know why BAR doesn't use the engine decals, but whatever)? Copyright.
  • PBR? I am not sure, there are a few shaders by ivand that are not copyright, that seem to do PBR. But more shaders could be involved, so idk.
  • Myriad UI basics including nanospray, metal spots, healthbars, ground fog, unit selections, even a method of drawing merged range rings? Copyright.

Spring grows by people joining exciting projects, learning how games are put together, and going on to make their own. But anyone who cuts their teeth on BAR is going to find themselves lacking swathes of functionality, unless Beherith likes them enough to share. Is a budding young team going to have the time and expertise to reinvent lighting and healthbars from scratch? Are they going to have to go searching, perhaps come across the older Zero-K version? Are the Zero-K versions even going to work out of the box in their environment? Are they going to be able to adjust their workflows? This all causes friction for the creation of new projects.

These shaders have become the foundation of future projects. New contributors are learning how to create under their influence, and I hope a few of them will push them forwards. This is how Spring became so advanced while being free. It is what the GPL is for. And sure, Beherith says,

My shaders are not GPL because I have thousands of hours of work in them, tuned to specifically for BAR's look and feel, and I my understanding is that the GPL does not apply to them.

but my response is, "So what?" Many people have put thousands of hours of work into many parts of Spring, all of which helps future developers make better games. I surely put thousands of hours into designing and writing chobby, "tuning its look and feel" for the requirements of Zero-K. Now BAR is using it, and has been using it for years. That is just how this works, that was the agreement. If you can't stand the thought of other people using your magnum opus, then you don't get to use theirs.

Who wants to protect Spring from GPL violations?

If you want to protect Spring from GPL violations, a better candidate for your zeal would be [MARS] Total Warfare, why not start there?

When you get right down to it, fundamentally, I don't want to protect Spring from GPL violations. These arguments are time-consuming and frustrating, and I don't have the zeal for some abstract concept required to see me through. The GPL is "just" a tool for collaboration and building, and I want to protect that.

What I care about is honouring the work of past contributors, and leaving fertile ground for future projects. I think the BAR GPL violations matter enough for the culture and future of the project to justify kicking up a fuss. MARS is bad, but it is one guy stealing the engine and quite a bit of lua, just to make a game that nobody played. Everyone agrees it is violating the GPL, and your excellent investigation into it was worthwhile. But a decade later, it has no bearing on the future of Spring, so I am going to expend my effort here rather than there.

@p2004a
Copy link
Collaborator

p2004a commented May 19, 2024

but most new contributors don't care about this stuff and are likely to just follow the standard

I agree with the whole tone of the message, but IMHO this single statement is a stretch to apply to the broader set of new contributors working on BAR. A lot of new pieces that were developed, are developed using licenses even more permissive then GPL (whatever they should be GPL instead is ofc a good question), for example:

I'm not aware of new non-free components (outside of the mentioned here in core game).

The new BAR contributors I know opinions of are contributing in the spirit of FOSS. It's also those new contributors that were highlighting the licensing issues recently.

@GoogleFrog
Copy link

GoogleFrog commented May 19, 2024

Ah sorry, and that is good to hear. I did not mean to say that any of the new contributors are copyrighting code, I was more talking in general about people joining new projects. In my experience, newcomers just want to get on with creating stuff, and will often copy whatever licensing style is already established. Not everyone, but I expect a majority. I'm thinking back to early CA, and all the blindly copied GPLs throughout lua in spring. But all that said, my experience is just with projects that were already FOSS, even up to the art. I'll go edit that so as to not malign the the contributors.

@jacobguenther
Copy link
Author

jacobguenther commented May 19, 2024

I'm mostly concerned with my own potential contributions to the shaders. I could make the fog shader faster and better but what would happen to my contribution? Does it get locked down? would my code even be allowed in because Beherith wants to protect his ownership of the shader? Would there have to be a back and forth(about licensing and ownership) for every shader I improve? Why is it even like this in the first place?

@ashdnazg
Copy link

Hi @GoogleFrog :)
Thank you for the context - I think that frames the discussion in a very different way compared to the way it was conducted in this issue so far. Same for @jacobguenther's latest comment.

The way I understand it, the discussion is really about the spring community being a place built on sharing, and specifically the sharing of code.
I think that's a base we can all stand behind.

I'm missing the context from @Beherith, describing why he sees it necessary for the shaders to be licenced as they are (might be more productive to talk to me on Discord and not here).

I do think shaders are not equivalent to lua code. Some of the things in https://www.shadertoy.com/ have much more in common with art than with code. Other shaders have much more in common with the C++ and lua code of Spring. I can see why people might have different opinions on the matter.

We're probably a decade late for making explicit guidelines on the licencing of shaders, but I think better late than never.

@nbusseneau
Copy link
Contributor

nbusseneau commented May 19, 2024

@sprunk and @GoogleFrog already shared much more details than I could and that I agree with. I want to focus on one specific key point I think is most important:

I think technical aspects / "the how" should not the primary focus of discussions for now, and governance aspects / "the what" should be the primary focus of discussions instead. Only once we have decided what we want the licensing model to be should we start to look into how to actually implement it.

E.g. it's only at this point that questions such as "is it possible for {artwork / shaders / thing in the package} to be non-GPL" should be answered, trying to argue for one position or another at this time feels irrelevant to me right now. For example, if "the what" is that we want BAR to stick with the spirit of free software and ditch proprietary licenses, then there is not even a need to try to argue for shaders not being necessarily GPL, as the technical options for addressing the situation will be to either relicense, replace, or remove, and on the other extreme if "the what" is that we want to make sure BAR should be secured with proprietary licenses as much as possible, then at this point shaders are a secondary concern because the goal is instead to figure out precisely the boundaries of the GPL for games built off Spring / Recoil, and try to cram in as much as stuff as possible in the non-GPL part.

If you think this is sensible, I would like to encourage us all to voice our vision for the licensing model and avoid discussing technical implementation aspects until later.

My personal opinion: I think BAR should be copyleft entirely, and the whole Spring ecosystem for that matter, because that's in my opinion the spirit that originally drove everything to be done in the first place, and this is what I want to uphold. I also think that we should try to stick with as few licenses as possible (ideally only 2: 1 for code, 1 for non-code) to ensure clarity / simplicity for contributors.

BAR was built on the shoulders of giants (including those of Beherith, GoogleFrog, Sprung, all participating here), and it feels most important to me that BAR allows the future to draw from it, much like BAR has drawn from the past. And this, whether that future may be BAR itself (we already have instances / examples of the current licensing model getting in the way of BAR contributions), something else entirely (we already have instances / examples of the current licensing model getting in the way of contributions to other projects based on BAR stuff), or even a fork of BAR (a situation which I personally find to be extremely unlikely because BAR now has enough traction, both in users and contributors, that trying to fork it at this time would be extremely difficult and an almost assuredly lost battle, but that I think we should support nonetheless because that's how BAR came to be in the first place).

Beherith added a commit that referenced this issue May 21, 2024
@drivver44
Copy link
Contributor

I’m curious if consideration of moving proprietary licenses away from individual authors to legal entities such as bar legal entity that is used for collecting donations has occured
This would

  • allows us to have proprietary licenses for for code which allows us to protect games from being stolen
  • Cleans up the confusion of how contributions affect licenses by removing individuals from controlling licenses
    Outside of gpl violations do not appear to be a problem in general , although that can change
    Silver wings for example with the horse licenses is a very good example of why we should be licensing towards legal entities instead of individuals (assuming we cannot get in contact with silver wings)

@drivver44
Copy link
Contributor

I’m curious if consideration of moving proprietary licenses away from individual authors to legal entities such as bar legal entity that is used for collecting donations has occured This would

  • allows us to have proprietary licenses for for code which allows us to protect games from being stolen
  • Cleans up the confusion of how contributions affect licenses by removing individuals from controlling licenses
    Outside of gpl violations do not appear to be a problem in general , although that can change
    Silver wings for example with the horse licenses is a very good example of why we should be licensing towards legal entities instead of individuals (assuming we cannot get in contact with silver wings)

I should clarify since a person asked me on discord
This is purely about if there is a need for proprietary licenses
I don’t believe having them be controlled by one person makes sense
These should be tied to a group of people rather than one person

@Karolson
Copy link
Contributor

I actually emailed FSF about the points raised there, here's the reply I got


Greetings, I have a few questions about the GPL license.

Hello and thank you for writing in.

Assuming there is a game engine that is licensed under GNU GPL v2:

  1. Are games made using that engine, that link to the engine's runtime
    and heavily use its API, have to be licensed in a GPL compatible way?

Yes, since this is a case of linking to GPL'd code.

  1. If yes, and the game is distributed in one package, does it extend
    to the whole game?

This is where things get interesting. Here is a quote from the FAQ to
get us started
(https://www.gnu.org/licenses/gpl-faq.en.html#WhatCaseIsOutputGPL):

"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. ..."

Does it extend to GLSL shader code distributed and used by the game?

That's an excellent question. Many shaders are independent pieces of
software, but it is also conceivable that a particular shader would be
designed with the GPL'd engine code in mind and would be considered a
derivative. You'd have to look at that in a case by case basis.

Does it extend to artwork, 3D models, sounds, music, textures
distributed and used by the game?

That depends. Just for example, if the engine expects a specifically
designed png to be there, with a particular alpha layer that the engine
will then use, then that would be a good indication that the engine and
that PNG should be compatibly licensed.

On the other hand, if the engine is simply loading some images and
sounds and displaying/playing them, then it is little more than a
glorified image-viewer/audio-player, and the two could be licensed
independently.

Stepping back, it is always better for the community when there are as
few different free software licenses involved as possible. Nobody wants
to spend their time reading several licenses and understanding how they
interact when they could spend that time hacking. But it is also
understood that sometimes this is inevitable.

I hope this is of help.

--
I am not a lawyer, the above is not legal advice

Regards, Yoni Rabkin

The services of the GPL Compliance Lab are made possible by
donations from people like you. Please consider supporting us
today by becoming a member [https://my.fsf.org/join] or by making
a donation [https://www.fsf.org/donate].

@jacobguenther
Copy link
Author

jacobguenther commented May 22, 2024

I wasn't expecting anybody to email the FSF. I think there are two key take aways from their response.

Does it extend to GLSL shader code distributed and used by the game?

That's an excellent question. Many shaders are independent pieces of
software, but it is also conceivable that a particular shader would be
designed with the GPL'd engine code in mind and would be considered a
derivative. You'd have to look at that in a case by case basis.

I think with regards to Beyond All Reason and games that use Spring/Recoil any shader that uses

//__ENGINEUNIFORMBUFFERDEFS__
//__DEFINES__

particularly shaders that use __ENGINEUNIFORMBUFFERDEFS__ should be GPL, because they couldn't reasonably be used outside of the game/engine. Plus when you do vsSrc:gsub("//__ENGINEUNIFORMBUFFERDEFS__", LuaShader.GetEngineUniformBufferDefs()) It injects GPL code into the shader. Its more than just the uniform definitions.

Stepping back, it is always better for the community when there are as
few different free software licenses involved as possible. Nobody wants
to spend their time reading several licenses and understanding how they
interact when they could spend that time hacking. But it is also
understood that sometimes this is inevitable.

I 100% agree with this sentiment. This issue should be resolved(however that may be) so that we don't have to come back to it in the future.

@Karolson
Copy link
Contributor

Karolson commented May 22, 2024

Here's another


Thanks a lot for your quick reply! This makes sense, however there is one
part of the GPL that confuses me:

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.

As I understand it, when distributing the game as a whole it means the
whole work should be GPL compatible? Or does artwork not specific to the
engine fall under the next clause:

In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

When you distribute a work licensed under GPLv2, then the entire work as
a whole is distributed under the terms of GPLv2 even though that whole
may have parts under different licenses. This means that all of those
different and independent parts need to be under GPLv2-compatible
licenses. A GPLv2-compatible license is one which permits the work to be
distributed as part of such a whole under GPLv2. See:
https://www.gnu.org/licenses/gpl-faq.en.html#WhatIsCompatible
https://www.gnu.org/licenses/gpl-faq.en.html#WhatDoesCompatMean

When dealing with GPL-incompatible parts, the following may be helpful:
https://www.gnu.org/licenses/gpl-faq.en.html#GPLIncompatibleLibs

@Karolson
Copy link
Contributor

I had some more exchange with Yoni Rabkin of FSF (amazingly fast responses!), and as I understood, none of the parts BAR distributes can be proprietary or CC BY NC ND.

Now, I haven't asked if it's possible to somehow distribute these parts separately, but I can't really imagine that working well, especially if BAR is to be released on Steam.

I attach the full conversation.
Gmail - gnu.org --edited-- Re GPL questions.txt

@Beherith
Copy link
Collaborator

jacobguenther:

"I'm mostly concerned with my own potential contributions to the shaders. I could make the fog shader faster and better but what would happen to my contribution? Does it get locked down? would my code even be allowed in because Beherith wants to protect his ownership of the shader? Would there have to be a back and forth(about licensing and ownership) for every shader I improve? Why is it even like this in the first place?"

Indeed, my shaders are licensed to BAR only. When you make a PR against them into BAR you have to accept that. Non-existing contributions have no relevance to the discussion. However, that doesn’t mean any licensing scheme is forced upon anyone’s shader work. You are 100% free to write a better and faster fog shader, and choose whichever compatible license you desire on it. My shader's existence and or license has zero effect on your ability to write one.

Sprung

"gl.DrawModelShape("rocko.s3o"), the rocko s3o is Art + Not Code and thus can be licensed as proprietary."

Kind of the same way glUseShader(...) works?

GoogleFrog

1. Lighting? Copyright.
2. Ground decals (I don't know why BAR doesn't use the engine decals, but whatever)? Copyright.
3. PBR? I am not sure, there are a few shaders by ivand that are not copyright, that seem to do PBR. But more shaders could be involved, so idk.
4. Myriad UI basics including nanospray, metal spots, healthbars, ground fog, unit selections, even a method of drawing merged range rings? Copyright

Lighting: My previous work of screen-space lighting is GPL and works perfectly fine.
Ground decals: BAR's version of my shader is designed for use with purchased assets. The engine implementation by ivand is perfectly fine, use that.
PBR: As I based that off of ivand's work, it's all GPL.
Nanospray: I only have worked a bit on a non-working concept in a branch. Current one is LUPS / GPL
Metal Spots: You make it sound like a game cannot feasibly draw custom geometry without my specific shader to do so, which just animates the vertices in a way I find pleasing. I have literally built a tutorial on how to do this, with GPL'd code.
HealthBars: Which is a fully customized geometry shader with hacked in font glyphing. Compared to preexisting, easy to customize and generic GPL implementations.
Ground Fog: Unreleased, work in progress and non-working. Previous, working versions by me are released under GPL.
Unit selections + a method of drawing merged range rings: The merged rings are drawn via stencil buffers, so its all Lua >> GPL.

What you conveniently fail to mention here is that I am the one (with ivand's) help that set up, shared, and most importantly documented for all, the Lua side framework to make most of these things possible.

Previously, the state of drawing very many things was degraded. I did my absolute best in opening that up for everyone. I went as far as to break with the previous GLSL code's wonderful tradition of single character variable names.

What is worse, that despite my best efforts to modularize and document the newer GL4 rendering pipeline, not a single piece of novel GLSL was written by anyone except me or Ivand. This introduces another "bus factor". Taking shaders wholesale is not the way to learn GLSL, my 15 years of teaching experience tells me that actually implementing from the ground up is what teaches skills.

"The tone change first affected me a few months ago. A Zero-K contributor was working with Beherith on adapting a shader for Zero-K, and repeatedly insisted that they tell me to reach out directly to Beherith to ask for permission to use the shader. The first time I was asked, I thought the contributor had just noticed the copyright notice at the top of the file, and I said we had a standing agreement for that. But later, it became apparent that Beherith asking directly, so I asked, and got the response that he was "unhappy I did not ask sooner", but that he would graciously "not throw us under the bus" due to my failure to appease him. It was maddening, just beyond the pale. Managing PRs is hard enough without keeping track of propriety GPL violating licenses on code."

I have a subtly different recollection, where I had discussed with GoogleFrog that I'm happy for ZK to use my shaders, If he asks before including them, and retains my copyright on them. I've also shared my shaders with other games in this exact same way. What I was unhappy about was GoogleFrog changing my header on the files with to "allegedly copyrighted to Beherith", and then also including shaders (radar preview) he never asked to use. This is a separate issue from where I worked with a Zero-K contributor and reminded him to notify GoogleFrog to reach out to me.

"I had asked about using shaders before that happened, but not since, not that much has happened since. I ported and improved the accuracy the radar preview shader, but I consider it WIP and haven't actually released it. Sprung later told me that it looks like it was adapted from engine code, so can't be owned by Beherith anyway".

If you feel that my method of tracing a line between two points falls too close to the engine implementation, that is a different subject entirely, and I am happy if you point out where the similarity is.

"Later, about two weeks ago, I started looking into GL4 lights and asked about a noise DDS texture, only to be told that GL4 lighting is licensed exclusively to BAR."

When GoogleFrog asked about the DDS noise texture I had made for BAR, I first thought this was in relation to CustomUnitShaders GL4 (Also GPL) , where that noise texture can be turned off with a single line change. I was surprised that GoogleFrog didnt think I would appreciate him asking for the shader itself, as per our previous agreement.
I feel that throughout GoogleFrog's post there is a not-so-subtle accusatory tone of me (and BAR) not 'giving back' to Spring or Zero-K, which I strongly believe could not be further from the truth. For those who might not know my background, I also developed a ton of widgets, engine improvements, rendering frameworks, not to mention the entirety of the current mapping and inverse kinematics animation pipeline, just to name a few. Above that, I have contributed art directly to ZK, and have released all of my map source files along with extremely detailed documentation on how to use them efficiently. Thousands of hours all given back, and greatly improved upon for both current and future consumers of the engine. I've gone as far as to advocate for engine changes to Recoil being advantageous to all participants.

I feel that arguments of 'leaving infertile ground' and accusations of not honoring the spirit of the engine and not giving back to be wild bad-faith hyperbole.

"Before you know it, proprietary content and code becomes the dominant culture of Spring"

Spring and BAR are not the same thing. Quality artwork has been proprietary within Spring since before the inception of BAR. The gap of quality between professional artwork and free artwork is substantial, and cannot be compared to the difference between professional code and free code.

You telling artists how they should license their work because it goes against what you feel should be the dominant culture goes against the fact that artists are the ones who decide.

Drivver44

Indeed, the artwork licenses will be transferred to the BAR legal entity, that's what we set it up for. This is also required for a Steam release, and greatly reduces my bus factor.

Karolson

"No parts can be proprietary or CC BY NC ND"
That's straight up false, Karolson. See for example Gravity Bone.

TLDR

Regarding the BOS/COB, yes that will be put under GPL.
GLSL: I do not think the GPL applies to most of my shaders, but still can be convinced otherwise. I'll revise the licenses where I think they might, and will continue to work to clarify those.
Models, textures, sounds, music: To clear up the confusion around CC BY NC ND and our intent, it will be moved to a proprietary license. Probably separating an artwork and code repo is a good idea.

@sprunk
Copy link
Collaborator

sprunk commented May 23, 2024

"gl.DrawModelShape("rocko.s3o"), the rocko s3o is Art + Not Code and thus can be licensed as proprietary."

Kind of the same way glUseShader(...) works?

See the "because rocko.s3o is not code" part. So I think the similarity would be with (for example)

uniform sampler2D healthbartexture;
vec4 texcolor = texture(healthbartexture, g_uv.xy);

because an image (in this case the healthbar texture) is not code. Also note how the above code must interface with the engine to bind that texture (set uniform).

@thehobojoe
Copy link
Collaborator

thehobojoe commented May 24, 2024

This discussion has largely been focused on the legality or precise workings of licenses, but I would like to address this topic from a moral perspective. This is primarily directed at @Beherith, but will mostly apply to any other contributors who want their work to by copyrighted or restricted more strictly than GPL.

BAR is a very direct beneficiary of all the work of the TA/Spring community over decades of progress. The people who came before us (and many who are still here with us!) wanted to build something open, they did it for the love of RTS, the legacy of TA, and a commitment to FOSS ideals. Legally we are free to license our own work however we see fit, but it feels very crummy to build a project that would have been utterly impossible without the openness of developers of the past, and then to close off huge portions of that progress because we worked really hard on it or whatever. The people before us worked hard on it too, and we're where we are because of them - what about who comes after us?

I was not a contributor to earlier Spring projects, but I've been a player for decades - I'm here because of my passion for these games and for the open nature of them. I played AA, and BA, and countless other creative games on Spring, many of which weren't even TA-likes - all games that pushed the platform forward, tried out new ideas, and built an extremely strong foundation for BAR to rest on. I want to be able to look back in 10 years and see other projects that branch off of BAR and create new and interesting things. Because I am not attached to BAR specifically, I'm attached to the open-source legacy of this project and what it enables passionate and creative people to do - BAR is the latest and most prominent one, but it won't be the last. The future of Recoil and the games on it is largely going to be dictated by what BAR does, since it's the biggest project on the engine now by a long shot.

We should honor that legacy by being open and allowing others to extend what we're building. I think the concept of a cheap ripoff that steals BAR's work and takes our lunch is unrealistic, and I don't believe arguments for keeping things proprietary because of that are valid. The amount of infrastructure, community, contributors, and online presence of BAR is not going to be supplanted by someone copying it for some lazy fork. If someone takes BAR's code and assets and makes something that actually DOES eat into the playerbase and community, it will be because they've added to it in a substantive way that makes players want to move - and in the spirit of a FOSS project we should applaud that. BAR is what it is today because of countless forks, successors, and evolutions of prior games. That doesn't discount the incredible work of the team, especially the founding members, but it doesn't stick to the ideals of doing something open-source and what it was built on.

At the start of the project, the protectionist stance made sense given the drama around the BA fork, because it was very plausible that BA would simply steal whatever was produced and make a mess out of everything. But that situation is now far in the past, and BAR has diverged enough from BA that a quick steal is effectively impossible.

It would be very disheartening, if after scrutiny and debate, the decision is made to continue produce proprietary code that cannot be used by other projects and is exclusive to BAR (or very tentatively given permission for ZK). Many contributors will lose the desire to help out on this project, including myself. I joined this project because of my passion for the game and the legacy of open source development that it builds on, and I handwaved away the protectionist stuff because of the BA drama - but if the work I produce, which is meant to be for the whole community and not just BAR gets chained to this project and proprietary material that effectively precludes a fork or independent continuation - then I'll feel less like I'm building something really open source, and instead helping out someone else with their project.

This optics of this are not good now that BAR is taking donations, which are quite substantial. As of now, what's being done with that money is unknown. The stated intent is that it's reserved for servers or independent contractors, but without transparency no one can know. The protectionist behavior, on top of all this money coming in from the community, made possible by freely made code by tons of passionate people, does not look good. Without transparency and openness there, people who want to work on a FOSS project won't trust it. Are they giving their time freely for something that will become a money maker for someone else?

A few weeks ago my response to shaders being copyrighted by Beherith would have been not much worse than "eh", because of BA history. But seeing the resistance to people questioning that licensing recently - including getting defensive with ZK devs, who have given tons of code to BAR... It's leaving a very bad taste in my mouth.

I really hope that the project founders, particularly those with access to donation money, take the time to reflect on how this situation looks and have more openness. I want this whole ecosystem to thrive, the best way to do that is be open and share.

@GoogleFrog
Copy link

GoogleFrog commented May 24, 2024

Apologies in advance, but I am going to clog up the place with a quote-response post. I will try to refer to general ideas rather than specific quotes to keep things succinct. Also, I'm mostly going to mention points of disagreement.

drivver44

Having a legal entity rather than a person hold the copyright of propriety code has no bearing on whether such code is violating the GPL. It does have a bearing on the wisdom of having propriety content, of any type, but not on whether any particular license is permissible.

nbusseneau

The governance aspect is potentially an important question. The way I see it, there are three things that inform the licenses on a part of BAR, with earlier levels trumping later ones.

  1. The requirements of the license of the engine and all other content that BAR builds upon.
  2. What the current developers and contributors of BAR want.
  3. The desires of the creator of the content.

I put 3 at the bottom because, while anyone is free to put whatever license on anything they make, if the license violates other licenses, or the contributors have a strong enough preference for not working around the license, then the content can simply be removed from BAR. Likewise, nobody can force a license on something someone made, but it won't be included if it violates licenses or if people don't want the license.

Unfortunately, we are in a situation where licenses are being violated. The framework isn't perfect, it assumes some sort of static state where everyone had the same understanding of the licenses as the game was being put together. But the end result, if or when everything settles down to agreement, will look like a hierarchy going 1 > 2 > 3.

I think 2 is more complicated than 1, so I am focusing on 1. Also, if the project settles on the "wrong" (in my view) answer to licensing via 2, I will view it merely as a morally disappointing, rather than morally wrong.

Karolson

I didn't think of emailing the FSF, it is an interesting approach. I am not sure how useful it was though. I can read the emails as agreeing with my view, and I assume you can to. But there is a lot in there that depends on particular circumstances. For example:

Does it extend to GLSL shader code distributed and used by the game?

That's an excellent question. Many shaders are independent pieces of
software, but it is also conceivable that a particular shader would be
designed with the GPL'd engine code in mind and would be considered a
derivative. You'd have to look at that in a case by case basis.

So now we're back to arguing about engine includes. There is no strong conclusion, and we can just take the weakest part of the exchange and refute it. Why did you not give more details about the situation, or even link the ticket? Might that have been more useful? I am not sure.

Beherith

... My previous work of screen-space lighting is GPL and works perfectly fine.... You make it sound like a game cannot feasibly draw custom geometry without my specific shader ... I have literally built a tutorial on how to do this, with GPL'd code. ... The merged rings are drawn via stencil buffers, so its all Lua >> GPL. ...

Let me just quote myself, because your comments here don't address the point of what I said directly after my list of things that seemed to be copyright.

Spring grows by people joining exciting projects, learning how games are put together, and going on to make their own. But anyone who cuts their teeth on BAR is going to find themselves lacking swathes of functionality, unless Beherith likes them enough to share. Is a budding young team going to have the time and expertise to reinvent lighting and healthbars from scratch? Are they going to have to go searching, perhaps come across the older Zero-K version? Are the Zero-K versions even going to work out of the box in their environment? Are they going to be able to adjust their workflows? This all causes friction for the creation of new projects.

But also, specifically, what??

Unit selections + a method of drawing merged range rings: The merged rings are drawn via stencil buffers, so its all Lua >> GPL.

Sure, right, ok. The widget gui_sensor_ranges_los.lua has stencil buffers in the lua code. But the widget itself uses a shader that you claim copyright on. So, how is a new project, that only knows BAR, going to draw these range rings? Maybe they have some new mechanic that wants a different kind of ring. Are they going to take this widget, modify it a bit, and use it draw their new mechanic? No. The shader is copyright, and a shader is required for the widget to do anything at all.

Which brings us to this.

What you conveniently fail to mention here is that I am the one (with ivand's) help that set up, shared, and most importantly documented for all, the Lua side framework to make most of these things possible.

Previously, the state of drawing very many things was degraded. I did my absolute best in opening that up for everyone. I went as far as to break with the previous GLSL code's wonderful tradition of single character variable names.

What is worse, that despite my best efforts to modularize and document the newer GL4 rendering pipeline, not a single piece of novel GLSL was written by anyone except me or Ivand. This introduces another "bus factor". Taking shaders wholesale is not the way to learn GLSL, my 15 years of teaching experience tells me that actually implementing from the ground up is what teaches skills.

To start with, "nobody else writes GLSL" is highly disputable, and we can even see with @jacobguenther that the licenses have discouraged someone from writing it. But I can grant "Beherith has written the majority of GLSL in the last ten years". So lets put that aside.

My main question is: what gives you the right to demand that other people learn how to use your contributions to the engine in order to benefit from them? Does everyone who wants to use Spring have to be a network engineer, a pathfinding specialists, and a master of rendering pipelines? People screw up and make mistakes with their lua-based message sending widgets, or their pathfinding tweaks, or their rendering widgets, because they do not have the depth of expertise of the developers who implemented this keystone features. Perhaps you would like to force them to learn. Besides, how many people work on networking or pathfinding? Perhaps if we didn't have good networking or pathfinding, more people would learn (or maybe they would just abandon Spring entirely). Are these all arguments for these parts of the engine also being propriety, putting the practicalities of the GPL aside for a moment?

Or even look at my case. I suspect that I wrote the majority of all Chili code over the last ten years. This is the time period in which I overhauled the Zero-K UI, and made most of Chobby. Should I have told BAR not to use my battleroom, or lobby browser, or sortable list utility, or player tag handler, or any other of the components that make Chobby work? If someone had actually re-implemented all this stuff then perhaps you'd have your own Chili masters by now. But, I expect, instead you would have floundered, taken a few extra years, and ended up with a buggier lobby, if you even went the Chobby route at all. And that is if BAR itself even survived the delay.

My actual point is that "people must learn the code" isn't mentioned in the GPL. It isn't in the agreement we made to build on each other's stuff. People have expertise in different areas. Having people implement something themselves is probably better for mastering the subject, but that isn't relevant here. The GPL doesn't say you get to decide what people need to master before building on your work. So it's great you've pushed the bounds of what can be done, but you don't get to say others have to follow your path. You just have to hope people will, and in my experience, eventually you attract a developer who does.

I'm not saying this is your intention, but from the outside it looks like you're saying that what you've done is so important, so amazing, that you want others to truly appreciate how hard it is before they can use it. It feels like you're devaluing everything that others give away for free.

I have a subtly different recollection, where I had discussed with GoogleFrog that I'm happy for ZK to use my shaders...

Apologies, according to the repository I did play around with radar LOS a few weeks before the selection circles conversation. It just didn't come up in conversation until later. I guess I was already warded off by the vibes.

If you feel that my method of tracing a line between two points falls too close to the engine implementation, that is a different subject entirely, and I am happy if you point out where the similarity is.

That would be one for Sprung. But in general, does anyone care to have this argument for every bit of code? People sometimes converge on similar solutions to technical problems, especially if they are also reading engine code. This just feels like a terrible culture to foster for a supposedly FOSS project.

I feel that throughout GoogleFrog's post there is a not-so-subtle accusatory tone of me (and BAR) not 'giving back' to Spring or Zero-K, which I strongly believe could not be further from the truth....

It's a blunt fact. You wrote some code, put it in BAR, and released it for everyone to run on a GPL engine. Each bit of code was written for particular GPLed lua widgets, has its GL state and uniforms set up by the widget and the engine, and is packaged and invoked with and by the GPLed lua widgets. The code was written specifically for a game on the engine, and only makes sense within the concepts and pipeline of that engine. Those systems in the engine are GPL. The shader code is GPL. Yet, you have not given it back. You've said you own the copyright.

You've given back a lot of things. But you have not given back this specific thing which you are obliged to give. Thus, you have not given this back, hence the ticket. And maybe this seems overbearing, the demand to GPL 100% of code and contributions rather than 99%. But that's FOSS.

As for the hyperbole.

I feel that arguments of 'leaving infertile ground' and accusations of not honoring the spirit of the engine and not giving back to be wild bad-faith hyperbole.

Spring grows by people joining exciting projects, learning how games are put together, and going on to make their own. But anyone who cuts their teeth on BAR is going to find themselves lacking swathes of functionality, unless Beherith likes them enough to share. Is a budding young team going to have the time and expertise to reinvent lighting and healthbars from scratch? Are they going to have to go searching, perhaps come across the older Zero-K version? Are the Zero-K versions even going to work out of the box in their environment? Are they going to be able to adjust their workflows? This all causes friction for the creation of new projects.

Spring and BAR are not the same thing. Quality artwork has been proprietary within Spring since before the inception of BAR. The gap of quality between professional artwork and free artwork is substantial, and cannot be compared to the difference between professional code and free code.

This stuff is important because most contributors encounter BAR first, and Spring second, if ever. BAR is setting the licensing standard for this new generation of developers, and any projects they might start...
...
...
... These shaders have become the foundation of future projects. New contributors are learning how to create under their influence, and I hope a few of them will push them forwards. This is how Spring became so advanced while being free. It is what the GPL is for.

You telling artists how they should license their work because it goes against what you feel should be the dominant culture goes against the fact that artists are the ones who decide.

Anyone is free to decide how the things they create are licensed. That doesn't mean people have to use their work if they don't like the license. And if those licenses violate preexisting licenses, then the project is obliged to reject the work. See my comments to nbusseneau.

@Karolson
Copy link
Contributor

That's straight up false, Karolson. See for example Gravity Bone.

Calling it "straight up false" is a big stretch. See section 2 of GPL, part of it is in jacobguenther's ticket, it has no mention of code at all. Gravity Bone may as well be violating GPL too, but we would never know for sure unless they get taken to court. Which applies to BAR too, it can pretty much license anything how it wants because, honestly, who would contest it in court?

Regarding your stance on shaders, that they are "linked by the gpu driver". It either shows a gross misunderstanding of the GPL, or is straight up a malicious misrepresentation of it, because, again, who would argue about it in court? And even if it somehow was true, I have GPL drivers, so what?

As of the moral side of the question, Hobo Joe described it perfectly. That we have to argue about the legality of things in the first place shows that there is no FOSS spirit there.

There is no strong conclusion, and we can just take the weakest part of the exchange and refute it. Why did you not give more details about the situation, or even link the ticket? Might that have been more useful? I am not sure.

I didn't want to burden a random volunteer with investigating the whole thing so I tried to explain the situation in simpler terms. If it doesn't look convincing, you may as well try emailing licensing@fsf.org yourself and explain it your way.

@p2004a
Copy link
Collaborator

p2004a commented May 24, 2024

@Karolson IMHO you are holding too much to the license text and too little to the intention of the developers and people that released this code. I don't think this crusade is helpful to the discussion at hand.

GoogleFrog summarized this well in #3020 (comment).

Even if those stances by developers are not an official part of the license, IMHO they are pretty clear about (many, not all) things, and that's what matters at the end of the day because they are the copyright holders. To me those statements function (informally) as extensions that provide additional permission for the use of the code.

Sharing code with additional permissions is compatible with the original license, in the same way as including MIT software as part of GPL works is legal: users just have more rights for the MIT part.

@Karolson
Copy link
Contributor

You may be right, but personally, this issue just left me immensely frustrated.
Either way, I do not think there was intent to allow shaders to be proprietary.

@drivver44
Copy link
Contributor

Having a legal entity rather than a person hold the copyright of propriety code has no bearing on whether such code is violating the GPL. It does have a bearing on the wisdom of having propriety content, of any type, but not on whether any particular license is permissible.

i have no disagreement over this in the slightest
the overall issue is if this isnt done
atleast having the assurance that the non licensed code being controlled by a legal entity instead of a single person makes the whole situation less worse than if its controlled by one person

@jacobguenther
Copy link
Author

jacobguenther commented May 25, 2024

my shaders are licensed to BAR only. When you make a PR against them into BAR you have to accept that. Non-existing contributions have no relevance to the discussion. However, that doesn’t mean any licensing scheme is forced upon anyone’s shader work. You are 100% free to write a better and faster fog shader, and choose whichever compatible license you desire on it. My shader's existence and or license has zero effect on your ability to write one.

What is worse, that despite my best efforts to modularize and document the newer GL4 rendering pipeline, not a single piece of novel GLSL was written by anyone except me or Ivand. This introduces another "bus factor". Taking shaders wholesale is not the way to learn GLSL, my 15 years of teaching experience tells me that actually implementing from the ground up is what teaches skills.

To say "Non-existing contributions have no relevance to the discussion." is disingenuous when the main reason I created this issue was to clarify your and the rest of the core team's stance on what looks like GPL code but is actually somehow proprietary code in a GPL repository before I made a pull request. You then seam salty about being the only one writing shaders. You can't have it both ways. I will continue to not contribute to your mystery license shaders.

I have no problem writing shaders from scratch. I don't need to learn OpenGL/GLSL. I would have liked to do a quick run by pull request. I would have thought this project was about building on others work not everyone building their own silo.

"not a single piece of novel GLSL was written by anyone except me or Ivand."

  • poor Floris
  • Last year I made a compute shader for ray marching(Thanks Ivand), I haven't seen any Recoil games that use a compute shader for anything, but I guess thats not novel. I was the first one to actually use a shader storage buffer from Lua land.

GLSL: I do not think the GPL applies to most of my shaders, but still can be convinced otherwise. I'll revise the licenses where I think they might, and will continue to work to clarify those.

You put the shaders in a GPL licensed repository with no mention of an alternate license. How can BAR use your shader without a license? I don't see a "BAR only" license anywhere. Did you not read the license you agreed to? "When you make a PR against them into BAR you have to accept that." You still have your copyright and outside of BAR you can relicense your shaders however you like but the shaders that are already in the repository have been "poisoned" weather you like it or not.

The way I see it the core team has a handful of options from bad to decent

  • Things stay as they are
  • "BAR only licensed" code get their own folders and explicit license
    It shouldn't exist to begin with but at least its clear
  • "BAR only licensed" code get their own repository and is distributed separately
    First decent option
  • No "BAR only licensed" code in the project
    The actually good option
  • Beherith realizes they messed up and accepts that their code is GPL.

@jacobguenther
Copy link
Author

luaui/configs/DeferredLightsGL4config.lua
-- (c) Beherith (mysterme@gmail.com)

Does this also fall under the mystery license?

@PtaQQ
Copy link
Collaborator

PtaQQ commented Jun 6, 2024

Official Admin Position of BAR asset and code licencing within BAR repository

(reposting from BAR Discord)
Recently, there has been extensive discussion within the contributor team about the licensing policy governing our code and art assets. Several team members and representatives from partnered projects have raised concerns about the potential conflict with the Recoil Engine policy by using a proprietary license for the GLSL shaders. According to the discussion, the rationale for such licenses was driven by Beherith’s intent to protect BAR’s identity against malicious forks, similar to what happened with Mars: Total Warfare or 0 A.D. This decision was based on the assumption that projects within the Recoil infrastructure would maintain good relations, communicate openly, and seek permission before using Beherith’s shader work, thereby avoiding any conflicts. As time has shown, this has not always been the case and led to some unnecessary stress. 

The contention arose because it’s unclear whether GLSL shaders fall under the engine recommendation requiring all code linking to the engine to be GPLv2, given that GLSL neither compiles nor executes on the engine, but rather the GPU driver. Legal advice we received also highlighted this as a gray area in terms of interpretation.

We recognize that this issue has dampened the open-source spirit within the team and doesn't align with the vision of several contributors who joined with different assumptions about content licensing. After considering everyone’s opinions for and against this policy, and to avoid further contention and mental burden, we decided that we will progressively remove proprietary licenses from all GLSL authored by Beherith.

There have also been suggestions that all assets in the BAR repository should be GPL-licensed. We need to clarify why this isn’t feasible, particularly for artwork such as models, textures, sound, music, and similar assets. It is important to allow artists to decide whether to open source their work for the following reasons:

  • There are thousands of assets sourced from commercial packages, sounds, graphics effects, textures, and such, which contribute to BAR’s look and feel. By definition, these assets must remain proprietary and cannot be shared outside of our projects because the purchases don’t authorize redistribution. Replacing these with our own GPL-compatible assets would set the project back several years in some areas, and in many cases, we simply can't match the quality of these industry-standard creations.

  • Keeping the art assets proprietary is essential for protecting BAR’s identity, which was also a motivation behind keeping the shader work under similar terms. We want to maintain control over BAR’s image, and this is the best way we know of to do so.

  • Experience shows that many artists won't contribute their top-quality work without a proprietary license. They want to create art for BAR because they are inspired by it. For instance, it is hard to imagine composers contributing their music to BAR if it were to become royalty-free tracks for use anywhere on the internet.

We strongly believe that this policy serves the best interests of the BAR project, ensuring the best results going forward. It keeps BAR appealing to current and potential contributors while preserving its integrity and the high quality we strive for. From Day 1 we've set out to aim for the next-level. Putting the 'bar' as high as possible to reach that next level of quality and polish, not before seen in Spring. BAR would not have existed without this aim & vision and we strongly believe that this is also one of the reasons BAR has grown to what it is today.

We hope this position will be understandable and well-received by the team.

Regarding the suggestion to split proprietary and non-proprietary components of BAR into separate repositories for clarity and to avoid accidental breaches, we currently don't deem this necessary. We believe checking individual licenses while exploring the repository isn’t too burdensome. However, we are open to revisiting this idea in the future if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests