Lazy Foo' Productions
SDL Forums SDL Tutorials Articles OpenGL Tutorials OpenGL Forums
News FAQs Contact Donations
Lazy Foo' Productions FAQs
Last Updated 6/10/19
This page has answers to frequently asked questions regarding the site. 90% of the questions I get e-mailed to me are answered here.
Most Common Questions
Q: Where is your e-mail?
A: It's on this page. Keep reading, it's there.
The majority of e-mails I get are questions that are answered in the FAQs. I had to keep burying my e-mail deeper because so many people would just refuse to spend a minute glancing over the FAQs to see if their question was already answered. Odds are your question has been answered already here, too.
It's not that I don't like getting e-mails. Bug/typo reports are great, keep them coming. I just don't like getting e-mails to questions that I have already answered.
Q: Can I put your tutorials on a public repository?
People seem to think because the tutorials are free that it means they can do anything with them. I may in the future want to have a tutorial site as a business and letting people do whatever they want with the code puts me in a sticky situation regarding intellectual property law. I put them on my site because I want them to be on my site.
Q: Can I port your code to Java/Perl/Python/C or translate your tutorials to another language?
A: No. From what I learned in my business law course, copyright law is sticky to say the least. If I do allow people to translate my tutorials who has rights to those translated tutorials is a complete mess. I'd rather just not deal with it.
Q: Can I use your code for an open source project?
A: I do allow my code to be used in certain cases (like a non-profit project for school if you ask for permission) and you can read more about it further along in the FAQs. I tend to be more lenient with closed source projects.
But I have a question for those of you than want to make your game open source: Why? And why do so many of you want to release it under GPL or LGPL or any other license that gives up a lot of your rights?
I know there's a lot of cool projects that are open source, but what do you actually have to gain by releasing the source? Odds are your project won't be the Linux kernel of open source gaming and if it was super popular, would you really like to give up your rights in case your game becomes the next Flappy Bird (which at one point was making $50,000 a day)?
Some of you want to put up your personal projects on GitHub for a portfolio because you hope to get a job in the industry. There's usually three problems with using my source code:
1) If an employer is looking at your GitHub, they want to see code you personally have made. Showing them projects that uses a lot of another person's code is not a good look.
2) A big mistake a lot of students if that they put everything they ever made in their portfolio. Odds are if you're using my tutorials you've just barely finished your intro to C++ course. I've seen the application process in different studios and they usually only spend a minute or two glancing over your work. You do not want them to see the gaming project you made after you just completed your intro to C++ course. Make sure to only have your best work on there so you know they'll only see you at your best.
3) The tutorials are designed to communicate key ideas of game programming the simplest way possible. The simplest code is not always the best structured code. For a real game project I would probably use an Entity-Component-System Architecture (I recommend Googling that if you're interested in game engine architecture) but using an Entity-Component-System Architecture to teach basic texture rendering is just going to bloat the code. However, in a real game project that you want to show off to a potential employer you're going to have the game engine structured like an operating system (because most game engines are structured like operating systems) which means you want your code to significantly different than the simplfied code in the tutorials.
If you're still interested in using my source code for an open or closed source project you can find out more here.
Q: Should I use SDL or SFML? Should I use OpenGL or Vulkan? Should I use Unity or Unreal? What kind of computer should I get for game development? What books do you recommend for game development? Can you look at my portfolio? Do you know how to get this feature working on Android? etc
A: Guys, my e-mail is not a free consultancy service. I can't be everbody's personal tutor. Please only contact me if you have an issue with a specific page on the site.
For general questions like this, you're better off asking on stack overflow. You'll get many more people answering you much faster than I can.
Q: Hey I see you have a Facebook and Twitter. Does that mean if you don't reply to my e-mail immediately I should spam you on there?
A: Please don't.
I check my e-mail more often than I check social media so e-mail the best way to get into contact with me. If I haven't e-mailed back it's because I don't have time to answer it right now or most likely it was already answered in the FAQs.
Q: I found a bug/typo in the site/source code, where do I report it?
A: Contact me at my gmail address.
I admit that the tutorials were a bit rushed, so there's going to be mistakes here and there. Don't be shy, I want my tutorials to be bug free.
Q: How long will it take to for you to get back to me?
A: A while.
I work in the gaming industry which is prone to over time and I go to grad school. I basically only have a few pockets of free time to work on the site.
Q: I don't get tutorial/article X.
A: Well contact me and I'll try to explain it better and maybe make adjustments to the tutorial.
It is in my interest that people learn from my tutorials. If people can't learn from my tutorials, honestly what good are they?
Q: Can you bundle up all the tutorials/articles?
A: Sorry, but because of bandwidth issues I can't do that. Also bundling up every tutorial for a single download would cost me hits. What ever little money the site makes through ads helps pay for the hosting bill. Hosting a website isn't free you know.
Can I use Lazy Font?
A: Yes, under 3 conditions.
The conditions go as follows:
1) The font must be used in a game, either by using the font to render text or in a graphic in the game.
2) You must not sell your game for profit if it uses the font.
3) You must acknowledge Lazy Foo' Productions' copyright to the font. The acknowledgement can be either with in the actual game itself or in a text file distributed with the game.
I am claiming copyright on Lazy Font in the unlikely case somebody actually makes money off of it. I understand it's hard to find fonts when you're starting out, so you newbies can use my font for your games under the above conditions.
Get the latest version of the font here.
Q: Can I use your code to make a game?
A: Basically my rules are:
1) If you're using it for a closed source program, go nuts.
2) If you're using it for an open source program, please cite the chunks of code you used with something like:
/*This piece of code was originally from Lazy Foo' Productions
(http://lazyfoo.net/)*/
3) If you're using it for a GPL, LGPL or other such program which gives public rights to the code, I'm going to have to say no.
4) If you're using it for a tutorial, you're going to have to use your own original code.
You still need contact me and show me specifically the code you plan to use and what you're going to do with it so I can approve.
Q: Can I use your code to make a tutorial?
A: Again, No.
I went through the trouble of making all my own code, and so should you.
Q: Can I use your code to make a book and sell it for money?
A: No and any book that does is unauthorized.
Q: Can I link to your site?
A: Of course. It's just more hits for me.
Q: If I link your site will you link mine?
A: Sorry, I don't do link exchanges.
Q: Do you plan to make any more tutorials/articles?
A: Maybe in the future, but currently I want to make personal research projects and prototypes. We'll see what the future holds.
Q: I have a program/article, can you post it on the site?
A: Sorry, I have a no user content policy. Ignoring the copyright issues, I barely have time to manage my own material. I don't have time to manage other people's content.
SDL Tutorial FAQs
Q: How much C++ do I have know to start game programming?
A: For my SDL tutorials, you must have a decent handle on the following concepts:
Operators (+, -, *, /, ++, --, +=, -=, etc)
Controls (if, else, switch)
Loops (while, for)
How to use a template.
Bitwise and/or.
The articles might require you to know more, but they'll mention it beforehand. Of course the more C++ you know, the better. To make anything complex you'll need to know inheritance, polymorphism, templates, and STL. Eventually you'll need to know exceptions, operator overloading and the whole language.
Make sure you know these concepts well. Don't just skim over them in a C++ reference book. It doesn't matter how much Java/Python/C#/Visual Basic/ASM/HTML/whatever you know. You have to know C++ to be able to learn from the tutorials/articles.
Q: How much Math do I have know to start game programming?
A: For the SDL tutorials, all you need is a good handle on geometry, but the more math you know the better.
Q: Why SDL?
A: First off it's a very lightweight and easy to use API making it ideal for beginners. Secondly it works on multiple operating systems so these tutorials can teach a wider audience.
Q: Tutorials 2-54 won't compile, what's wrong?
A: Read over tutorial 1 and make sure you set up SDL correctly. SDL is a third party library so you have to set it up yourself.
Q: Tutorials 6-54 give me errors with IMG_Load/TTF_Init/Mix_OpenAudio.
A: Tutorials 6-54 use the SDL_image extension library to load images. I require SDL_image to be used early on in the tutorials because:
1) I can then use PNG images which are smaller than bitmaps. This means less bandwidth use.
2) It's important to know how to set up extension libraries. I might as well teach you how early on.
In the zip file for every tutorial program, the readme.txt file tells you which libraries you need to link against. Make sure you have all the proper libraries set up.
In my tutorial set, I use SDL_image, SDL_ttf, and SDL_mixer. It's a good idea to have them all set up ASAP.
Q: Where are the SDL 1.2 tutorials?
A: They're still in the same spot.
Q: I have an issue with the 1.2 tutorials
A: Sorry but they are no longer being updated. All SDL tutorial updates are done on the SDL 2.0 tutorial.
OpenGL FAQs
Q: How much C++ do I have know to start these tutorials?
A: For my tutorials, you must have a decent handle on the following concepts:
Inhertance and Polymorphism
I also recommend having experience with simpler 2D graphics API like SDL before jumping into OpenGL.
Q: How much Math do I have know to start these tutorials?
A: You should know vector math and matrix multiplication. If you don't know these, I have an OpenGL math primer article designed for people that have taken high school geometry. It won't teach you everything you need, but it should be enough to get you started with OpenGL.
Q: Why freeGLUT?
A: As I mentioned in the the first tutorial, freeGLUT may not be the most feature rich API but it's good at creating quick and dirty OpenGL demos which these tutorials use.
freeGLUT is probably not what you want to use to publish a full application (I mention other libraries in the first tutorial), but for testing OpenGL code it does the job.
Q: Why are you using the fixed function pipeline? That makes you worse than Satan.
A: Because I've tried to do an OpenGL tutorial set that uses programmable pipeline from the the start and the test audience just wasn't getting it. These tutorials aren't here to regurgitate theory to people who already know graphics programming, they're here to help out beginners. Having concepts like GPU pipelines go over their heads isn't very helpful.
So this tutorial set uses fixed function built in capabilites as a stepping stone to modern programmable pipelines. In the end, they're learning OpenGL 3.0+ code anyway. Besides, many of the code graphics algorithms (like Phoung Shading), were developed in the 1970s. The algorithm hasn't changed, only the tools to implement it have.
Q: Tutorials won't compile, what's wrong?
A: Read over tutorial 1 and make sure you set up freeGLUT and OpenGL correctly. freeGLUT is a third party library and OpenGL typically isn't linked by default so you have to set it up yourself.
Q: Will you be making 3D tutorials?
A: To make a decent 3D tutorial set, I would have to triple the size of the current tutorial set. That's something I just don't have time for right now.
Misc FAQs
Q: What's your e-mail?
A: lazyfoo At gmail. <- I have to type it like that or spambots will get to me.
Q: Did you really have to hide your e-mail like that?
A: I'm not against getting e-mails (questions do make my tutorials better) but at least 9/10ths of the e-mails I get are answered in the FAQs. This can only mean people don't read the contact page and just fish for an e-mail. It's better for people to skim through the FAQs before e-mailing me so we both don't waste time.
If you have any other questions, feel free to contact me.
Copyright Lazy Foo' Productions 2004-2019