Author Topic: Pixel Dungeon source code  (Read 9221 times)

Eben

  • High Priest
  • ****
  • Posts: 339
  • Controversializer
    • View Profile
    • SquidPony!
Re: Pixel Dungeon source code
« Reply #15 on: August 05, 2014, 08:58:24 PM »
If you had said that you needed pathfinding code - for example - I could have sent you a library of C routines that implement A-Star, Sight-gradient pathfinding, and Breadth-first search pathfinding, all licensed under the Artistic License.  If you had said you needed an implementation of poison, with damage over time, antidotes, a 'cure poison' spell and a 'slow poison' spell ... well, I'd have kept you in mind for when I finish what I'm planning to work on a week or two from now.

Why should we have gone on talking about Pixel Dungeon if we've already determined that it isn't what you want?  I'm asking what code functionality you would like to add to your library, If you can find it under a license that suits your needs.

I can find that stuff as well once I know I need/want it. The value to me in looking at other peoples' code is that I can get ideas for things I didn't even know I could need or want. For example, the Blacken library had code for dice rolling based on "1d6+2" style strings. Before I looked at that I hadn't even considered doing such a thing.

Short of other people putting up RFEs on my github or emailing me (both of which have happened), I like to see what other people are doing so I can make my own product better.

I have no idea if there are any nuggets in Pixel Dungeon or not, but because I'm a law-conscious individual (in the USA as Krice guessed) I'll not be able to find out. Unless someone else who's seen the code puts in an RFE for a feature they saw.

In particular I'm interested in Pixel Dungeon because it has been commercially successful, which makes it doubly rare to be open source and in my language of choice.

Omnivore

  • Bishop
  • ***
  • Posts: 154
    • View Profile
Re: Pixel Dungeon source code
« Reply #16 on: August 06, 2014, 06:32:24 AM »
GPL and similar are forms of licensing based on copyright law.  It is absurd to not look at GPL licensed source for fear of copyright violation.  Show me case law that says otherwise.


« Last Edit: August 06, 2014, 06:34:51 AM by Omnivore »

chooseusername

  • High Priest
  • ****
  • Posts: 329
    • View Profile
    • Email
Re: Pixel Dungeon source code
« Reply #17 on: August 07, 2014, 02:11:17 AM »
GPL and similar are forms of licensing based on copyright law.  It is absurd to not look at GPL licensed source for fear of copyright violation.  Show me case law that says otherwise.
You provide case law that shows it is safe for people to look at.  Oh wait, you can't.  Because that is an irrational assertion, as you well knew when you made the matching one yourself.  Being an open source fundamentalist, who hand waves away objection to your cause, helps no-one.

The GPL is a viral license.  It is what it was designed to be.  It removes one developer's freedom, as it gives another developer theirs.  It is rude to expect other people to take the risk, and just rely on your word that it is okay.

By the way, just so you can't imagine I dislike the GPL again, I have used software based on it in the past.  And I've released my own software based on it, which others have in turn used, in the past.  There's a lot of misunderstanding of the license, by people who haven't even read it.  And I've worked at companies where the complication of the license, has resulted in whatever was using it, not being adopted. And not because it would have been problematic to release the source code.  But because it is a legally problematic license, which makes things harder to use.
« Last Edit: August 07, 2014, 02:15:30 AM by chooseusername »

Bear

  • High Priest
  • ****
  • Posts: 308
    • View Profile
Re: Pixel Dungeon source code
« Reply #18 on: August 07, 2014, 04:13:20 AM »
I'm no partisan.  And besides, the whole effort of developing roguelikes really has nothing to do with the license.  Hopefully we've got more important things to discuss here.

Whatever license something is available under, you either use it and abide by the license, or you don't use it.  Both are honorable choices.  Neither is worth making a complaint.  If you don't like the GPL, nobody minds if you don't use that software. 


Omnivore

  • Bishop
  • ***
  • Posts: 154
    • View Profile
Re: Pixel Dungeon source code
« Reply #19 on: August 07, 2014, 05:06:35 AM »
You provide case law that shows it is safe for people to look at.  Oh wait, you can't.  Because that is an irrational assertion, as you well knew when you made the matching one yourself.  Being an open source fundamentalist, who hand waves away objection to your cause, helps no-one.

Fear mongering is irrational. 

Nothing in 1452 years of copyright case law leads me to believe that any of the following logically equivalent cases are true:
  • An artist violates copyright if they view works of their contemporaries and then creates a new painting or sculpture that contains any element of anything they have viewed.
  • A fiction author violates copyright if they read any copyrighted works in their target genre and then write a story addressing any of the previously read topics or incorporating any similar plot devices.
  • A programmer violates copyright if they read any copyrighted source code and then solve the same problem in their own works.

All of the above cases are equally absurd. 

Copyright are exclusive rights granted to the author or creator of an original work, including the right to copy, distribute and adapt the work. Copyright does not protect ideas, only their expression or fixation.  There are various, and ever evolving, limitations and exceptions to copyright.  Copyright is not a patent.

Finally, as to fear mongering, adjudication of copyright issues is expensive in time, money, and reputation.  In the absence of clear inarguable violation and/or a copyright holder willing to spend tens of thousands or more USD in enforcement, an independent software developer is relatively safe. 

In the final analysis: what Bear said above.

Cfyz

  • Bishop
  • ***
  • Posts: 194
    • View Profile
    • Email
Re: Pixel Dungeon source code
« Reply #20 on: August 07, 2014, 10:41:04 AM »
Quote from: Omnivore
Nothing in 1452 years of copyright case law leads me to believe that any of the following logically equivalent cases are true <...> A programmer violates copyright if they read any copyrighted source code and then solve the same problem in their own works.
False statement. Oracle vs. Google case has shown one indeed can be attacked because of the code that simply looks copied. This time it ended good. However, it did happen once and monstrous Google being on the receiving end must have contributed greatly to the result.

Omnivore

  • Bishop
  • ***
  • Posts: 154
    • View Profile
Re: Pixel Dungeon source code
« Reply #21 on: August 07, 2014, 11:43:57 AM »
Quote from: Omnivore
Nothing in 1452 years of copyright case law leads me to believe that any of the following logically equivalent cases are true <...> A programmer violates copyright if they read any copyrighted source code and then solve the same problem in their own works.
False statement. Oracle vs. Google case has shown one indeed can be attacked because of the code that simply looks copied. This time it ended good. However, it did happen once and monstrous Google being on the receiving end must have contributed greatly to the result.

I suggest you reread the case.  Google did indeed copy the Java API.  The initial pro-Google settlement was overturned by the district court, yet the district court did not rule out a 'Fair Use' exception.  The case is still contested and further actions are indicated.

My quoted argument still holds.

Furthermore, the argument of mine you quote bears no resemblance to the Google v Oracle case.  The employees of Google did not merely read the Oracle copyrighted source and then implement their own version of a similar algorithm, they copied a portion (~7000 lines) of the Oracle source.
« Last Edit: August 07, 2014, 11:57:00 AM by Omnivore »

Cfyz

  • Bishop
  • ***
  • Posts: 194
    • View Profile
    • Email
Re: Pixel Dungeon source code
« Reply #22 on: August 07, 2014, 12:40:38 PM »
Quote from: Omnivore
My quoted argument still holds.
Well, if taken literally the statement is undeniably true right now, my bad. However, the initial question was whether is it safe to look at the source code or not.

Quote from: cnet.com
The jury similarly found that Google did not infringe on English-language comments in CodeSourceTest.java and CollectionCertStoreParameters Test.java or source code in seven "Impl.java" files. However, it agreed that Google did infringe on the rangeCheck method in TimSort.java and ComparableTimSort.Java.
Here is the code of rangeCheck:
Code: [Select]
/**
 * Checks that {@code fromIndex} and {@code toIndex} are in
 * the range and throws an appropriate exception, if they aren't.
 */
 private static void rangeCheck(int length, int fromIndex, int toIndex) {
     if (fromIndex > toIndex) {
         throw new IllegalArgumentException(
             "fromIndex(" + fromIndex + ") > toIndex(" + toIndex + ")");
         }
     if (fromIndex < 0) {
         throw new ArrayIndexOutOfBoundsException(fromIndex);
     }
     if (toIndex > length) {
         throw new ArrayIndexOutOfBoundsException(toIndex);
     }
 }
Google might have copied thousands of lines but in the end the war was fought over individual pieces a dozen of lines in length. If you look at some source code you are more likely to write a similar one. With modules as small and trivial as rangeCheck or modules demonstrating some clever trick you might end up writing the same (or very similar) code unintentionally.

My point is, it's just damn scary. I can't guarantee that I would have implemented rangeCheck any differently, both code and comments (having looked at original code at least once and being bound by the similar code conventions).
« Last Edit: August 07, 2014, 12:49:16 PM by Cfyz »

Omnivore

  • Bishop
  • ***
  • Posts: 154
    • View Profile
Re: Pixel Dungeon source code
« Reply #23 on: August 07, 2014, 01:43:41 PM »
With modules as small and trivial as rangeCheck or modules demonstrating some clever trick you might end up writing the same (or very similar) code unintentionally.

My point is, it's just damn scary. I can't guarantee that I would have implemented rangeCheck any differently, both code and comments (having looked at original code at least once and being bound by the similar code conventions).

It would be very easy to implement a rangeCheck clone without ever seeing the original.  In cutting edge cases like Google v Oracle, we're once again seeing the effects of clueless judges and jurists being asked to render opinion beyond their capabilities.   Can you imagine the travesty of similar copyright litigation in an even more idiomatic language, say one with built in coding conventions such as Google's own Go?  Bring software patents into the picture and we can scare ourselves into immobility. 

So yeah, as things seem to stand at the moment, if you are a large company you probably don't want to take many chances of even giving the appearance of infringing on another large company's copyright.

As for me, I'm not going to lose any sleep over it.  If Bear (or anyone else reading this) wants to sue me because I read their copyrighted code (regardless of license) and some small part of my published code resembles some small part of theirs, go ahead, take your best shot.  I'll even go one step further and say that if I want to violate your copyright, I can easily do so and pretty much be gauranteed to get away with it.  The fear factor is way overblown.

Eben

  • High Priest
  • ****
  • Posts: 339
  • Controversializer
    • View Profile
    • SquidPony!
Re: Pixel Dungeon source code
« Reply #24 on: August 08, 2014, 06:20:12 AM »
Having spent some time thinking the arguments over and discussing things with other folks, I would have to agree that I've perhaps been overly paranoid.

However, if looking at code and re-implementing it is effectively risk free (or incredibly small risk), then why use GPL at all? You're basically just being a dick and wasting peoples' time by re-implementing code rather than just letting them use yours. You're not protecting your ideas and clever tricks at all (which is what patents are for).

So yeah, I've concluded that my fear was unjustified, but so is using GPL.

Omnivore

  • Bishop
  • ***
  • Posts: 154
    • View Profile
Re: Pixel Dungeon source code
« Reply #25 on: August 08, 2014, 05:43:18 PM »
However, if looking at code and re-implementing it is effectively risk free (or incredibly small risk), then why use GPL at all? You're basically just being a dick and wasting peoples' time by re-implementing code rather than just letting them use yours.

When I put a license on code I publish, I'm making a statement of intent. 

To me, GPL says "Here's some code you can freely use in your own GPL'd stuff".   Now there is no way that I'm going to know if someone violates that and uses it in a closed source commercial product.. but the violator will know and perhaps someday be motivated to give back something to the community.

If I want to be a dick and waste people's time, forcing them to re-implement, I don't publish the code at all.

In the case where you have Some Other License, if you want to use excerpts, snippets, from my GPL'd code, I'm not going to object, though I'd appreciate a attribution and an email.  That is the kind of thing you need to negotiate with the author of the package.

However if you want to wrap my entire GPL'd package in your SOL'd program, effectively turning my code into SOL'd code instead of GPL'd, well.. you're SOL (Shit Outta Luck).  Other authors may feel differently on a case by case basis.

Eben

  • High Priest
  • ****
  • Posts: 339
  • Controversializer
    • View Profile
    • SquidPony!
Re: Pixel Dungeon source code
« Reply #26 on: August 08, 2014, 10:05:04 PM »
« Last Edit: August 08, 2014, 10:09:48 PM by Eben »