2

This is my first time posting here and I'm sorry if any of my questions are silly. This is my first time dealing with open source code and licenses.

I'm working on a small game engine and I decided to use this person's tutorial as my starting point. His engine is available on GitHub under the Apache 2.0 license.

I, too, decided to put my engine under the same license, but I don't have any intentions of distributing my engine/ code in any way. I am building this engine (which I may not even finish) purely for educational and self enrichment purposes, but since I will have the code on GitHub I know that anyone can access it.

I didn't exactly fork this person's engine over to my project, what I'm doing is following along with his tutorial from day one starting from the ground up and reimplementing his ideas into my own using methods and design patterns that I'm learning/ want to explore.

On occasion, I do take some of his code to use if, for example, I don't have an interest in learning how to program a particular subsystem or if at the moment I don't have an idea for how I would reimplement something as my own.

How would I go about applying the license to these individual code files that I'm taking from the developer? If they are in a folder is it enough to include the license in the folder or do I have to include the license in each file?

Additionally, I understand that I must include a report with all the changes done to files I modify? Where would this file go and what constitutes modification vs. my own work. Say, for example, I use someone's algorithm under the Apache 2.0 license but rewrite about 85% of it to work for my use case and keep 15% of it original. At what point would something count as being original rather than modified?

1

How would I go about applying the license to these individual code files that I'm taking from the developer?

If the file contains a comment with a reference to the license and a copyright notice, then you must keep that intact. Also you must make sure that the full text of the license can easily be found within your repository.

When you start making changes to a copied file, there are two possibilities

  1. If you are using the same license for your own code, add a copyright notice of your own next to the existing copyright notice(s).
  2. If you are using a different license for your own code, add your copyright and licensing information above the existing block and separate the two with a statement along the lines of "this file contains code under the following license:".

Additionally, I understand that I must include a report with all the changes done to files I modify?

No, the Apache 2.0 license does not require that you keep a detailed record of what you changed. The license only requires an indication that you changed something and that is accomplished by adding your own copyright notice.

[...] what constitutes modification vs. my own work. Say, for example, I use someone's algorithm under the Apache 2.0 license but rewrite about 85% of it to work for my use case and keep 15% of it original. At what point would something count as being original rather than modified?

If you do not start out with an empty file, then every change you make to that file is both a modification and your work. If you look at a more granular scale, then when you add a new function from scratch to an existing file, then the function is your original work but at the same time it is a modification of the file.

2
  • Thank you so much for the insight. I have one more followup. I noticed that at the end of the the Apache 2.0 license there's a small section of that includes a small copyright notice along with a link to the full Apache license that can be added to the top of a file like this: github.com/kubernetes/kubeadm/blob/master/kinder/main.go I assume that you mean that I must keep that intact, but what if the developer did not include that in their files? Should I still include it just to be on the safe side? They also didn't fill in the copyright at the top. – Jesus Hernandez Jun 11 at 20:02
  • You are fine to share it in the form the original authors share it. Of course it never hurts to include the full license text, even when it wasn't included in the original. – planetmaker Jul 12 at 8:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.