Pixel Scaling And Licenses


Eniko

Raving Python fangirl
Joined
Sep 29, 2008
Messages
641
Age
41
Location
Netherlands
Website
purplepirates.darksiren.net
Last night I was looking at the scale3x and scale4x algorithms, to see if they were any more complex than scale2x, to possibly implement for PC users. Anyway, I noticed something on the download page:
QUOTE
License

You are allowed to use the Scale2x implementations in your program if it's released with the GPL license, or alternatively under all the following conditions:
  • the program is not used in commercial activities.
  • the whole source code of the program is released with the binary.
  • derivative works of the program are allowed.
Instead, you are free to use the algorithm, but please call the effect "Scale2x".

Since there's the possibility that my project may make a bit of money is there anyone who can explain to me the lawyerspeak of the GPL license? Are you not allowed to use scalenx (and possibly nxSaI or hqnx? I'll need to check those for licenses) in a commercial venture? Does everything that uses the algorithm have to be released under the GPL?

This license stuff is so confusing. x_x
 
Last edited by a moderator:
Basically, the GPL is easy: You can use any GPL licensed program in ANY other program, regardless if it is commercial or not.

However, if you use the scale2x sourcecode IN your program, your program automatically falls under the GPL AND you have to release the full sourcecode to anybody who requests it (and you have to keep the original author mentioned).

So, while you can still sell it, you have to release the sourcecode and anybody else is free to use it, change it or even sell it.

The only way without releasing your sourcecode would be calling scale2x as external binary. If unchanged, you only have to provide the link to the sourcecode of scale2x, if changed, you need to release the changed sourcecode (but ONLY the one of scale2x, not of your program).

However, running external binaries doesn't always make sense...
 
Thanks for the quick response, ED. :) So if I get this right, for a potential commercial closed-source project the safe bet is to compile the scale2x source as a DLL and publish the source for that with GPL license, but none of the rest?

What happens if I use the algorithm without using the source to implement a scale2x pixel shader? Would that still require me to publish my source under the GPL license? What if it's a modified version of scale2x? How far would it have to be modified? Or does none of the GPL license stuff apply because I'm using the mathematical algorithm, not the sourcecode?
 
Eniko said:
Thanks for the quick response, ED. :) So if I get this right, for a potential commercial closed-source project the safe bet is to compile the scale2x source as a DLL and publish the source for that with GPL license, but none of the rest?
It depends on who you ask, but this should be fine. So long as the DLL is a "complete work" on it's own, with all it's source code available under the GPL, this should work. However, it's a legal question, not a technical one. This, for instance, is how the NVIDIA drivers work on Linux... they put a "dll" of a kind into the kernel (GPL) and then call it from the NVIDIA driver (proprietry). Some people still don't believe that is legitimate but nobody has kicked up too much a fuss about it. BTW: GPL comes in many versions, and GPL 3.0, for instance, may consider this situation differently.

Eniko said:
What happens if I use the algorithm without using the source to implement a scale2x pixel shader?
If I remember correctly from my own investigations several years ago, the algorithm is perfectly okay to copy (but you may not be able to refer to it by the names that you know it by) and reimplement, it's their actual implementation that is covered by the software license. I think I even read wording to that effect on their webpages but you'll want to double-check. You can't "copyright" an algorithm (but you can patent it in some countries!) and the GPL is a copyright licence.

Eniko said:
Would that still require me to publish my source under the GPL license?
Unless you based the code off GPL licensed code, then no. But even "modified versions" or potentially even "using the GPL code as a reference" are going to cause you problems unless they are GPL licensed too. This is in the realm of "cleanroom reverse-engineering" and you can't just do that by pretending you didn't read the original source...

Eniko said:
What if it's a modified version of scale2x? How far would it have to be modified?
If you modify the source, your modifications would have to be published as GPL (the license differs on exactly who you have to distribute that source to etc.). Any "modification" would be seen as GPL-based code. Even the wording of the word "modify" suggests that any end-product is GPL licensed. You would have to completely re-implement the algorithm from scratch without looking at the GPL code.

Eniko said:
Or does none of the GPL license stuff apply because I'm using the mathematical algorithm, not the sourcecode?
If you *don't* refer to the GPL source code in your re-implementation of the algorithm, you're fine in terms of copyright. This means even looking at how the GPL code handles a certain structure, copy/pasting/modifying etc. If they hold a patent on the algorithm (I very much doubt it) and it's enforcable in your country (even less likely) then they can still "get you" for that.

It's a legal grey area. Even the Linux kernel people won't answer questions about whether the NVIDIA driver is "legal" etc. and it causes flamewars all the time. The usual advice, even from Torvalds et al, is to "consult a lawyer" because it's not a technical issue but a legal one (including definitions of "derivative works", etc.). My advice would be to either:

1. Write your own version of these scaling algorithms, not looking at anything but the published algorithms and NOT referring to the GPL code. (And then publish it because I'm sure a LOT of people are in the same position as yourself - I'd be surprised if there didn't already exist some libraries for this).

2. Use the GPL code but abide strictly by the terms of its license.

3. Find another scaling algorithm which doesn't have the same restrictions (there are others!) and don't use any scaling algorithm covered by any terms that might cause you work/trouble/consternation.
 
Last edited by a moderator:
DLLs are confusing. Some people say that since you are including the binary in your code indirectly (by loading it at runtime), you are still loading GPLd code and thus are 'tainting' the code. Others say thats like commercial closed-source applications under Linux not being allowed to use any dynamic libraries.

So I'd say your best choice is to write your own version of the source code using the algorithm.
 
If you link against GPL (including in a dll/so) your code has to be GPL too afaik, that's why the LGPL was created to allow commercial use of shared libraries.

Basically if you use this code you'll have to release your source.

You should to be able to re-implement the code yourself using a description of the algorithm though, but that doens't mean copy& replace variable names from the original source ;)
 
I'll throw my voice behind others here in saying that your own implementation of this apparently unpatented, freely described algorithm should be perfectly legal for a closed-source project.

However, the most surefire way to know if you'll get sued is to ask the owner if they'll sue. Just send Andrea Mazzoleni, the creator of Scale2x an email explaining what you plan to do -- stress that it's your own implementation, not using the GPL'd code -- and ask if that's okay.

Although personally i think you'd be better off releasing your work free and open anyways, but that's a whole different argument.
 
Thanks for all the advice guys. My pixel shader is completely my own, based on the mathematics explained on the website of the scale2x algorithm. So that should be fine, I'll just have to rename it I guess?

Doesn't look like my game will support hqnx then, though. The only way to implement that is through the source code since the theory isn't explained, and it's also under the GPL instead of LGPL license. Of course I suppose I could drop Maxim Stepin a line asking him how he feels about things when I get that far. I'll probably drop Andrea Mazzoleni a line too, just cause it's good form.
QUOTE
However, the most surefire way to know if you'll get sued is to ask the owner if they'll sue. Just send Andrea Mazzoleni, the creator of Scale2x an email explaining what you plan to do -- stress that it's your own implementation, not using the GPL'd code -- and ask if that's okay.

While this seems a logical way to approach the problem I'm not sure if something like that would actually mean anything legally. >_>

I sure am glad Pygame and Twisted are covered under the LGPL and PyOpenGL under BSD. At least, I think BSD is safe.
 
Eniko said:
While this seems a logical way to approach the problem I'm not sure if something like that would actually mean anything legally. >_>

If it came down to it, you might be able to trot it out in court as permission (not a lawyer, so not really sure). But if you're taken to court, you're already in trouble (legal costs alone, even if they get repaid later), and there's no guaranteed way to avoid that.

Eniko said:
I sure am glad Pygame and Twisted are covered under the LGPL and PyOpenGL under BSD. At least, I think BSD is safe.

BSD is very safe. Only requirements are to include the creator's copyright notice and not use the creators' names in promotions. About the only things more permissive than BSD are MIT and public domain.
 
Last edited by a moderator:
What happens if you setup a specific API for communication with filters created by the public? Then you could provide your commercial work as usual, and if people wanted certain filters such as hqnx, then they can go download the pre-compiled dll, or the source code for that dll, drop it in your programs directory (or plugins dir, or wherever), and you program notices and allows the use of said filter.

That way the filters are neither incorporated into your code, nor distributed with your product. They are free, open-source, downloadable plugins. Later on, if another filter comes available, people can actually port them themselves.
 
Eniko said:
Thanks for the quick response, ED. :) So if I get this right, for a potential commercial closed-source project the safe bet is to compile the scale2x source as a DLL and publish the source for that with GPL license, but none of the rest?

What happens if I use the algorithm without using the source to implement a scale2x pixel shader? Would that still require me to publish my source under the GPL license? What if it's a modified version of scale2x? How far would it have to be modified? Or does none of the GPL license stuff apply because I'm using the mathematical algorithm, not the sourcecode?
If you're using the pure algorithm, you should be fine. Having said this, proving it may be painful- you may find that it's a bit difficult to produce an alternate version of the code, as you can copyright the ideal expression of that idea, and have a hell of a time convincing a court of your having separately implemented the actual algorithm. Moreover, having the game be GPLed isn't always a bad thing. Keep in mind that Quake3's engine and gameplay code is GPLed, but the assets themselves are very much iD's and requires you license them for alternate game use, or to purchase if you're just playing the game.
 
Last edited by a moderator:
@Squidge
That should work. It's very similar to the way kparts work, where there aren't any license issues when using a GPL kpart in a closed-source program.
 
Eniko said:
I sure am glad Pygame and Twisted are covered under the LGPL and PyOpenGL under BSD. At least, I think BSD is safe.
BSD is completely so. LGPL is safe so long as your mods as needed are propagated back to that community and you don't try to prohibit reverse engineering efforts on your own code. GPL's only nasty if you want to keep it to yourself. Understandable, really.


sindbad said:
@Squidge
That should work. It's very similar to the way kparts work, where there aren't any license issues when using a GPL kpart in a closed-source program.
Watch out, though... An end-user can link that beastie in, but they can't legally distribute the configuration as the loaded config produces a derivative work as far as Copyright and the GPL are concerned. You can send them out separately, but the end-user doesn't have legal rights to distribute the resultant config.
 
Last edited by a moderator:
Another possibility would be to just release your source code under the GPL, allowing others to share your code, but release the assets (graphics, sound, levels, ...) under a proprietary license. This is just what ID Software does when they release the source code to their engines. You would be able to make a profit from your work (assuming it's any good ;)), and others could learn from your code (again assuming it's any good ;)).
 
Klaus said:
Another possibility would be to just release your source code under the GPL, allowing others to share your code, but release the assets (graphics, sound, levels, ...) under a proprietary license. This is just what ID Software does when they release the source code to their engines. You would be able to make a profit from your work (assuming it's any good ;)), and others could learn from your code (again assuming it's any good ;)).

I don't think I want to think about all the horrible repercussions of an open-source MMO client, really. Sure some good could come of it, but even from the perspective of the playing community people are inevitably going to use it to "win the game" through scripting and botting, and then nobody wins.

Plus I'm reluctant to just hand over the fruits of my labour for anyone who can find an artist to make assets for them to make an MMO when it's taken me over a decade to acquire the skills to make a relatively playable indie MMO. It probably sounds selfish but... what's in it for me?
 
Last edited by a moderator:
Hey, it's your code, you can license it any way you want! If you don't want to open your code, a reimplementation of scale2x would be the only way IMHO. Just exporting scale2x to a library linked at runtime would still let your program fall under the GPL, as others pointed out. Squidge's idea might be fine legally, but I think it would be morally wrong to use the work of others, given to the public in good faith under clear conditions, in this way.
 
Eniko said:
I don't think I want to think about all the horrible repercussions of an open-source MMO client, really. Sure some good could come of it, but even from the perspective of the playing community people are inevitably going to use it to "win the game" through scripting and botting, and then nobody wins.
As if someone can't do it with RE work in the first place? Seriously, though, I understand what you're getting at- they at least have to work harder to cheat, whereas you'd have to work smarter (there ARE answers to the dilemma that you see there with FOSS MMO's... At least Nevrax figured it out- but it's not simple... ;) )

QUOTE

Plus I'm reluctant to just hand over the fruits of my labour for anyone who can find an artist to make assets for them to make an MMO when it's taken me over a decade to acquire the skills to make a relatively playable indie MMO. It probably sounds selfish but... what's in it for me?


Here's a hint... If they're going to rip you off (and they're going to, trust in that if you're as good as you claim to be... ;) ), they're going to do it whether or not you "protect" it with the code being closed. All one has to do is look around online for some examples:

Here's an example from my first, not even trying, Google query on the subject. They rip off some pretty locked down MMOs there. There's other notable faux pases where they're ripping off big names. Being closed does NOT protect you in that regard.

That's not to say that I'm saying you need to open it up. But my 2.5 decades plus of working at software development says that while it's a laudable goal there, it's just not going to accomplish much more than keeping the honest people honest. :D
 
Last edited by a moderator:
Svartalf said:
Eniko said:
I don't think I want to think about all the horrible repercussions of an open-source MMO client, really. Sure some good could come of it, but even from the perspective of the playing community people are inevitably going to use it to "win the game" through scripting and botting, and then nobody wins.
As if someone can't do it with RE work in the first place? Seriously, though, I understand what you're getting at- they at least have to work harder to cheat, whereas you'd have to work smarter (there ARE answers to the dilemma that you see there with FOSS MMO's... At least Nevrax figured it out- but it's not simple... ;) )
Well I'm working in Python, so I'm pretty much resigned to the fact that if someone really wants the code they can get at it. But I'm certainly not going to help them along. No amount of server verifying of what a client is doing can stop people from automating the process of playing an MMO. Hell, just look at what botters are doing in MMO's supposedly protected clientside by Gameguard; even though GG is supposed to block automated input there is no real way of accomplishing that and botting will happen regardless.

But for projects that are relatively small the effort usually doesn't merit the gains. This is also why there are no server emulators being made (well, playable ones anyway) for MMOs like Dark Ages or Nexus: TK.

If there's something I'm missing here, feel free to enlighten me.
QUOTE
QUOTE

Plus I'm reluctant to just hand over the fruits of my labour for anyone who can find an artist to make assets for them to make an MMO when it's taken me over a decade to acquire the skills to make a relatively playable indie MMO. It probably sounds selfish but... what's in it for me?

Here's a hint... If they're going to rip you off (and they're going to, trust in that if you're as good as you claim to be... ;) ), they're going to do it whether or not you "protect" it with the code being closed. All one has to do is look around online for some examples:

Here's an example from my first, not even trying, Google query on the subject. They rip off some pretty locked down MMOs there. There's other notable faux pases where they're ripping off big names. Being closed does NOT protect you in that regard.

That's not to say that I'm saying you need to open it up. But my 2.5 decades plus of working at software development says that while it's a laudable goal there, it's just not going to accomplish much more than keeping the honest people honest. :D
Sure they're going to rip me off. But I'm not going to make the next big thing. A niche product will probably have very few individuals organized enough to make a proper dent in the whole ripping off thing. In fact, obscurity may mean I never get ripped off, whereas if I go open the threshold lowers enough that it might happen. Probably will happen, considering how easy it'd be to script things in Python.

You can't stave off botters. You can't stave off people who automate client side things. You can't ward off gold-sellers. But I sure as hell can try to postpone it as long as humanly possible, for my own sake and for the sake of the people who will be playing my game. And in that sense, yes, I'll lose anyway if my product is worth ripping off, but what does the community at large playing my game, and I, have to gain by making it easier and more probable?

There has to be some positive that comes out of opening the source for me, for my players, that trumps making botting a certainty from day one, and while I would like to believe in the goodness of humankind a decade of playing MMOs has taught me that assuming the lowest common denominator is generally the way to go.

Mind you, I'm not arguing against open source as a movement or in generalities. Hell I love open source, I couldn't have gotten as far as I have with my current project as I have without many great open source initiatives. I have just yet seen someone come up with compelling evidence why doing it in this project would be benificial more than it would be reckless. Hell, part of me wants to be convinced, but I'm still not.

As for Nevrax, that's not the entire Ryzom codebase. And it's not like I could publish a client with GPLed scaler source, and then make a cut-down open source under GPL available to the public at large, like they did. My fork would have to be under GPL too, which means every single feature I ever add is added, whereas every Ryzom feature is not in Nevrax.

And that's not even getting into the fact that code I converted from Nuclex has to be licensed under the IBM Common Public License which actively conflicts with other open source licenses! Man this topic gives me headaches. It's like there is no correct answer, just varying degrees of how screwed I am or will be.
 
Last edited by a moderator:
I want to weigh in on the debate too! Fair warning: i'm a bit of an open-source junkie, so take my rhetoric with a grain of salt. Also, i'm a wannabe python developer, so this really amounts to me shouting "SHOW ME UR CODES", but still.

Firstly, the case for free as in beer (as in no cost to use, regardless of whether the code is available or not):
-The biggest effect will be a larger userbase. Any cost can be a serious hindrance to people when it can be so difficult to shuffle money around over the internet, but when the only obstacle to joining is a quick download and registration, a lot more people are willing to try. For an MMO, that's particularly important since so much of the game is the people in it. This will therefore lead to a better experience for all players.
-...which in turn will make you and Purple Pirate Productions better known and respected. Then, when your sophomore efforts are ready for release, you've already got a legion of fans willing to spend money on it. Not to mention, of course, "developed MMO with 3000 players" would look pretty cool on a resume.
-And, i expect, you're not intending to make this your prime source of income, at least not yet. Since all hosting, including the game server, can be done by ED for free, you certainly won't be losing any money in the process. Not to mention the fact that there are still donations to be had! Every player is a potential donor.

Secondly, the case for free as in speech (as in free to study, modify, and redistribute):
-Your concern with bots is legitimate, as an open client makes it that much easier to do, but they are certainly not stopped with closed clients. But doesn't the fact that people make and use bots show that there is something inherently wrong in the design of the game? If it's more fun to let a computer do things than to do them yourself, or the best way to get ahead is by constantly playing the same thing, then perhaps the game is not perfect. The game should instead be designed to reward new things rather than (literally) mindless grinding.
-The big gain in opening the code comes from external involvement. You may want to have most of the control over the game to yourself, but having many eyes watching for bugs and submitting potential improvements can help. It also allows for the potential of independently-created clients that can be made for different platforms or add specific functionality that might not be needed for the "core" client. Having this kind of freedom can be a further draw for more players.
-But most importantly, you get to feel all warm and fuzzy about providing something that people will be able to use forever, whether by playing the game or copying parts of the source. Particularly if you free the server as well, people will be able to keep running the game long after you've decided to never look at it again.

PS: This thread seems to have gone off-topic, but since the OP's involved, it's cool, right?
 
Tempel said:
I want to weigh in on the debate too! Fair warning: i'm a bit of an open-source junkie, so take my rhetoric with a grain of salt. Also, i'm a wannabe python developer, so this really amounts to me shouting "SHOW ME UR CODES", but still.
Fair enough. I'm more than willing to debate this issue, really, so long as I'm not called evil at the end if I decide to stick with closed source. :)

Tempel said:
Firstly, the case for free as in beer (as in no cost to use, regardless of whether the code is available or not):
-The biggest effect will be a larger userbase. Any cost can be a serious hindrance to people when it can be so difficult to shuffle money around over the internet, but when the only obstacle to joining is a quick download and registration, a lot more people are willing to try. For an MMO, that's particularly important since so much of the game is the people in it. This will therefore lead to a better experience for all players.
-...which in turn will make you and Purple Pirate Productions better known and respected. Then, when your sophomore efforts are ready for release, you've already got a legion of fans willing to spend money on it. Not to mention, of course, "developed MMO with 3000 players" would look pretty cool on a resume.
I agree on this. I do intend to make it free as in beer. It might not be free as in speech, and if you want champagne I might charge. (I'm a big fan of microtransactions and cash shop models ;) ) But yes, definitely free to try, free to play. This, by the way, brings along with it its own set of problems, in the way of being unable to keep troublemakers out, which ranges from cheaters, to abusive undesirables to botters and gold sellers. But in this case I agree the net positive will greatly outweigh the negative.

Tempel said:
-And, i expect, you're not intending to make this your prime source of income, at least not yet. Since all hosting, including the game server, can be done by ED for free, you certainly won't be losing any money in the process. Not to mention the fact that there are still donations to be had! Every player is a potential donor.
Well, shedding a little light on my personal situation here is probably necessary. Without going into details I hit a rough patch during my late teens (I'm 25 now) and basically half-flunked/half-got kicked out of highschool and got shuffled off onto a disability pension. I've only ever had one carreer ambition; to make games for money. It's hard to get hired in the Netherlands in what little games industry we have when you're an engineer. When you're like me, it gets that much harder. So - even though it might be naive - deep inside I hope this will make me enough to live off.

So, to make that clear, whether anyone feels its naive or not, this is more or less my career future we're talking about here. I've worked hard to become as good as I can at this stuff for a reason, it's not just a hobby for me.

Tempel said:
Secondly, the case for free as in speech (as in free to study, modify, and redistribute):
-Your concern with bots is legitimate, as an open client makes it that much easier to do, but they are certainly not stopped with closed clients. But doesn't the fact that people make and use bots show that there is something inherently wrong in the design of the game? If it's more fun to let a computer do things than to do them yourself, or the best way to get ahead is by constantly playing the same thing, then perhaps the game is not perfect. The game should instead be designed to reward new things rather than (literally) mindless grinding.
I fully agree! In fact I have considered doing something to spite the bots, and if I decide to do it it may in fact contribute greatly to me deciding to go free as in speech: sell gold myself.

I've been playing MMOs for a long, long time, so I have no great illusions about the importance of player status inside games. Yes, it's best if you have the time to sit down and earn your achievements, but not everyone finds that fun. People will get ahead through real life financial means regardless of what I try to do about it. It's obviously a service that some lazy players want. I've often considered buying gold myself, but never did because botters and gold sellers ruin a lot of things in the game incidental to providing said service. Spam most notably.

Where's the sense in letting them get money from players for a service I could provide just as well, (and probably at more reasonable rates) all the while polluting the virtual landscape? Some thoughts on this are welcome, actually.

Tempel said:
-The big gain in opening the code comes from external involvement. You may want to have most of the control over the game to yourself, but having many eyes watching for bugs and submitting potential improvements can help. It also allows for the potential of independently-created clients that can be made for different platforms or add specific functionality that might not be needed for the "core" client. Having this kind of freedom can be a further draw for more players.
On the other hand it might turn into an arms race between users adding features deemed unacceptable by the majority of users and those users who frown upon it adding counter measures. This could get pretty messy. I don't know of any open sourced clients for MMOs to see which way this statistically swings.

Tempel said:
-But most importantly, you get to feel all warm and fuzzy about providing something that people will be able to use forever, whether by playing the game or copying parts of the source. Particularly if you free the server as well, people will be able to keep running the game long after you've decided to never look at it again.
I'd feel a lot warm and fuzzier if people in my vicinity stopped frowning on me because I'd become a contributing member of society. ;) That may be an unfair argument, but personal reasons do weigh in this! However, as to the last bit of "never looking at it again". If it got that far then I would definitely open source both the client and server, and you can quote me on that.

Tempel said:
PS: This thread seems to have gone off-topic, but since the OP's involved, it's cool, right?

I like to think so. ;) Heck I'd been meaning to have a discussion about this already, to see if there was anything I wasn't seeing and hear all the arguments. I just never could think of a good way to broach the subject.
 
Last edited by a moderator:
Back
Top