• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Solid_Spy

What counts as "Code Plagiarism"?

14 posts in this topic

Hello, I have been learning game development and programming in C++ with OpenGL for about a year and a half, and one of the things i've always worried about is whether or not I might end up "plagiarising" while programming. Sure, I haven't released anything yet, and probably won't for YEARS, but i've always been worried about whether or not I could end up "accidentally" plagiarising.

 

I mean I'm, let me put it this way. My conscience, is pretty much existent, to put it plainley, and I most Certainley do NOT want to create my ultimate "Dream Game", and live my life as a fraud telling everyone that I programmed the game all by myself, even if I plagearized without even knowing it.

 

like for example, I've decided to VOW to NEVER, EVER, Copy and Paste code. I never do it, unless it is my own, and in my own words. However, could it still be plagiarism regardless?

 

Like, lets give a silly example:

 

Lets say i'm using a Graphics API, and I forgot the name of the initialization function, and whether or not it is camel case or not.

 

I look up on the internet (Stack Overflow), and someone shows in an example that it is:

GEngine * gEngine = new GEngine();
EngineDesc engineDesc = new EngineDesc((*void)0, false, true, true, NULL);

What i will generally do is type the code out into my engine, and change the name to my own, as well as look at the function to see what it does exactly, but is this enough? I know it sounds like a silly question, I mean I might know what the first Line of code means, but what about the second one? I might not even know what the parameters are for, but i'll use the function anyways, and it will make the Graphics Engine work regardless. If I type it in and I don't know what it does (E.G. Don't research the whole function), would that count as plagiarism?

 

I know it sounds like i'm being REALLY overreactive about this, but I feel like this is really is a pressing issue for many programmers who may also struggle with this (irrational?)fear , and I don't want to fall into the trap of being the "programmer who says he made his own game engine, when he really just plagiarized many other peoples original code".

Edited by Solid_Spy
1

Share this post


Link to post
Share on other sites

Unless there's a lawyer aboard here on gamedev, you're probably not going to get responses that will stand up in court. However, there are things you can do, such as look for copyright claims in the documents you read, the sites they're are posted to, etc. You can also look at documentation for any APIs you use. E.g., go to the OpenGL site and look at their license.

 

FYI, from circ61.pdf, Copyright Registration for Computer Programs. www.copyright.gov:

Copyright protection is not available for ideas, program logic, algorithms, systems, methods, concepts, or layouts

I am not a lawyer so I won't attempt to interpret that for you. For my own use, I wouldn't lose any sleep regarding variable names or snippets. I'd like to see someone try to copyright "float f" or "int i"

Edited by Buckeye
2

Share this post


Link to post
Share on other sites

FYI, from circ61.pdf, Copyright Registration for Computer Programs. www.copyright.gov:

Copyright protection is not available for ideas, program logic, algorithms, systems, methods, concepts, or layouts

I am not a lawyer so I won't attempt to interpret that for you. For my own use, I wouldn't lose any sleep regarding variable names or snippets. I'd like to see someone try to copyright "float f" or "int i"

I'm not a lawyer either, but I do know that there are Patents out there regarding certain algorithms, especially Encryption algorithms, and Global Illumination in Computer Graphics.

Edited by Solid_Spy
0

Share this post


Link to post
Share on other sites

I agree with Buckeye, however, I live by a moral code of not typing a single line unless I know EVERYTHING that it does. I do not write code until I understand every aspect of it.

Yeah, Thats kind of something i'm thinking of doing by default. I mean, it's probably the best i would be able to do anyways. I can't just memorize every single line of code and all it's parameters (thank GOD for intellisence), so I guess this would be the best option.

0

Share this post


Link to post
Share on other sites

I am no lawyer either, but I think you can safely assume that constructs that are in widespread use, at least are safe.  Once, even simple things like XOR-ing the mouse cursor on a monochrome image was once patented.  I think it was Xerox, who owned that patent.  GIFs were patented once too, but luckily patents expire eventually.  For more advanced (modern) algorithms, however, I would make sure it is not patented.

 

(Honestly, I wouldn't bother as long as I were inventing the algorithm myself, accidentally violating a patent.  There are too many patents to check to be sure you are not violating any patents anyway, but I would never do on purpose.  I know this may be ill advised, so do as I say, not do as I do, if you want to stay safe.  I might change my mind after reading the other answers you get in this thread...)

1

Share this post


Link to post
Share on other sites

I'm not a lawyer either, but I do know that there are Patents out there regarding certain algorithms, especially Encryption algorithms, and Global Illumination in Computer Graphics.


Maybe I'm wrong, but I don't think you were looking for legal advice or advice regarding patent violation.

Plagiarism is a concept that exists separate from copyrights, patents, and other legal constructs. Even if it was totally legal to copy other people's code line-by-line without ever mentioning the source, it would still be plagiarism. Quoting whoever wrote this for Wikipedia: "Plagiarism is not a crime per se but in academia and industry it is a serious ethical offense, and cases of plagiarism can constitute copyright infringement."

If you're writing code all by yourself as a hobby, it's up to you to set your goals for what you want to get out of programming. If you just want to put something together to see it work, I wouldn't worry much about copy-and-paste or starting with whole files from the Internet. If it's something you want to make public in some way, that's where the legal issues start to pop up. If you're going to put this on a resume, and claim you implemented whatever you copied out of some tutorial, you better be able to answer questions about the algorithm, but the API probably won't come up. And, if you're copying stuff for your job, be prepared to be fired for not submitting original work whenever someone catches on.
 

What i will generally do is type the code out into my engine, and change the name to my own, as well as look at the function to see what it does exactly, but is this enough?


It depends. If it's really just one or two lines, and the only real problem to solve was looking up the API, sure, it's enough. However, I'd expect a professional programmer to know how to look up this information in the API documentation instead of getting some random code off the Internet. In a code review I'd ask what all the arguments do. If your answer is that it was like that on some website you copied, you don't really have to worry about immediately losing your job, but you're performance review is going to mention that you willingly submit code that you don't even understand. Meanwhile, no one is going to care about whether a variable name was renamed or not, unless you violate some naming convention.

Hypothetically, if you were working on a game and submitted a whole new class of a few hundred lines or more, and somebody recognized it as being the same thing as some class out of an open-source project, except with different comments and variable names, no, it was definitely not enough.
 

I don't want to fall into the trap of being the "programmer who says he made his own game engine, when he really just plagiarized many other peoples original code".


IMO, you're rationalizing being one of these guys. If you really wanted to make your own engine, you should be able to get by referencing algorithms, math, APIs, etc. - without needing to look up online which actual arguments to pass to which functions. Edited by Pink Horror
1

Share this post


Link to post
Share on other sites

 

I don't want to fall into the trap of being the "programmer who says he made his own game engine, when he really just plagiarized many other peoples original code".


IMO, you're rationalizing being one of these guys. If you really wanted to make your own engine, you should be able to get by referencing algorithms, math, APIs, etc. - without needing to look up online which actual arguments to pass to which functions.

 

 

Everyone is learning at some point, even professionals.  Eventually you get better at what you are doing.  Sometimes looking at examples can help clearing up things that are not always easy to grasp.  I am sure everybody does it.  Not saying you should just cut and paste.  You should still write your own code, but looking at other code is healthy and makes it easier to clear up things that may not be so clear from teaching books or documentation.

 

Edit: On the other hand, what is so bad about citing your sources?  There is a lot of products in use today that has an "endless" list of legal stuff for using other people's "stuff".  If you have an iPhone, for instance, have a look at "Legal Notices" in Settings -> General -> "Legal Notices".  Spotify: Help -> Show Licences. 

Edited by aregee
1

Share this post


Link to post
Share on other sites

I was reading about this on Friday. If you want to avoid copyright infringement you need to do the following:

 

1) Get a team to look at the API and write a specification document

2) Get lawyers to look over document for any patent/copyright infringements

3) Get a completely different team to implement the specification knowing nothing about the original implementation.

2

Share this post


Link to post
Share on other sites

Just as a note, copying things from stackoverlflow.com is perfectly safe, since everything you share there get  Creative Commons Attribution Share Alike license

 

I'm sure most sites like it works similarly

 

Fully understanding any code you include in your project is of course a good idea in general :)

Edited by Olof Hedman
2

Share this post


Link to post
Share on other sites

Edit: On the other hand, what is so bad about citing your sources?  There is a lot of products in use today that has an "endless" list of legal stuff for using other people's "stuff".  If you have an iPhone, for instance, have a look at "Legal Notices" in Settings -> General -> "Legal Notices".  Spotify: Help -> Show Licences.


I'd prefer for someone to directly copy and then cite the source vs. copying and trying to modify the code so it doesn't look like the source any more. If you copy something and cite the source, it's not really plagiarism any more, because you're not attempting to make it look like your original work.

Just as a note, copying things from stackoverlflow.com is perfectly safe, since everything you share there get  Creative Commons Attribution Share Alike license


If you copy code, it can be "perfectly safe" from any copyright concerns and still be plagiarism.
1

Share this post


Link to post
Share on other sites
Moving to business forum.

Plagiarism is a concept in school, so ask your teacher about the policies. In the rest of the real world, it is copyright that concerns us.

Not a lawyer but someone who asked basically the same question to a lawyer...

Copyright is about people and organizations attempting to protect valuable content they have created.

When you get helpful content from a book, website, or other source designed to educate people, double-check the license for the site and content. If the code sample specifically states a copyright notice, such as GPL or BSD or other similar license, follow it. Otherwise use your brains.

When you buy a book or visit a help website, consider: Are they attempting to protect that valuable content? Or are they publicly speaking the content with a clear intent that it be shared and used elsewhere?

There are four factors that go into copyright claims: Purpose and character, nature of the work, substantiality, and effect of the use.

In your case the purpose and character of the original work was to educate people about how to use a concept, the nature of the work has transformed from educational material to a game, the published game might use the entire concept taught but that piece is a tiny part of the game, and the effect of using it in your game is not going to alter the value of the material as it exists in the book or web site.


Unless copyright is specifically claimed in the code sample, it is generally safe to include source code snippits found on educational and tutorial web sites as a small part of a larger product. However, if it specifically does include a notice (like the GPL or BSD license that require every source file be properly marked with a copyright notice) then that applies instead.
2

Share this post


Link to post
Share on other sites

 I was reading about this on Friday. If you want to avoid copyright infringement you need to do the following:

 

1) Get a team to look at the API and write a specification document

2) Get lawyers to look over document for any patent/copyright infringements

3) Get a completely different team to implement the specification knowing nothing about the original implementation

 

I'd like to know where you read that on friday :)..

I've developed software (and music--also great fodder for copyright discussions) for decades, ranging from companies that everyone on the planet has heard of to tiny companies no one ever knew existed.

We never did anything remotely like that "to avoid copyright infringement".  

Step 2) there in particular is massively expensive, and I've never known that to be done as a matter of course.

 

What that does look like is how you might go about reverse-engineering something and be (semi) safe, from a legal perspective (i.e a 'clean room' implementation of an existing piece of software).  I don't get the idea that's at all what the original question was about.

 

Frob (as always) gives great answer.

To avoid copyright infringement, write your own code from scratch.

That said, you can use common sense.  If you look up a bubble-sort algorithm in a common textbook and implement it in 'C, you aren't infringing on any copyright.

if you look up something on StackExchange, etc, use it is a reference.  If there's not much to the code (aside from simply an example of proper coding or API usage), then copying and altering it is almost certainly fine.  That said, don't cut and paste willy-nilly from the internet, unless you are very aware of (and confident in!) the licensees associated with the content.

0

Share this post


Link to post
Share on other sites

Frob (as always) gives great answer.

Maybe replace 'always' with 'usually'. :-)

I appreciate being put on a pedestal as much as the next person, but believe me, I make mistakes just like everyone. I try to look things up, speak from experience, and explain my thought processes, but there have been times where things I have posted have contained flaws.

I hope people will call it out if they see something wrong with the posts.
1

Share this post


Link to post
Share on other sites

If discussing the ethical aspect of plagiarism (independent of copyright issues), one answer is to put a link in the source code to where you found the solution. This is useful for yourself (if looking at it years later, and you wonder why on earth you put that code there, or what it does), and is also indicating to anyone else reading the source that you're crediting your sources.

 

Just as a note, copying things from stackoverlflow.com is perfectly safe, since everything you share there get  Creative Commons Attribution Share Alike license

 

I'm sure most sites like it works similarly

 

Fully understanding any code you include in your project is of course a good idea in general smile.png

 

Careful - CC BY SA would require giving attribution. The "share alike" would also require the source code that references the copied source code (and presumably any compiled binaries) to also be under CC BY SA. This would be a pain for commercial users (who presumably don't want their programs to be freely distributable), and also potentially Open Source (since CC BY SA isn't commonly used for source code, so you'd have to worry about compatibility with licences like GPL, BSD etc).

 

If you are using code from elsewhere, in my opinion you should be very careful about what the licence is.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0