Skip to main content
GameDev.net gamedev.net
🔒 Locked

Teaching game programming

Started by Broadway83 Jun 26, 2008 at 6:47 PM 30 replies 4.1k views
Original Post
Broadway83
Broadway83
My younger brother has recently started bugging me about teaching him to program. Unfortunately, his high school doesn't have any intro-programming classes. I'm less than excited about teaching and have been putting him off for quite a while In order to clear my conscience I figure I should at least point him in the right direction. So let me pose a few questions. My brother is 15, and I have seen some amazing things produced by younger members of this forum. Do any younger members have suggestions of books or tutorials that you found useful and would recommend to a friend? To those that have taught (or attempted to teach) high school students to program, do you have any advice on language, books, or tutorials? Or just any advice in general? Thanks
Dark Dude
Dark Dude
I started programming when I was 13, I am currently just 16 and considered an Intermediate-level programmer by someone I worked on for a project, who's currently 28...

All I can say is, I first downloaded the Dev-C++ compiler, although MSVC++ 2008 Express Edition is probably a better option. I then decided to learn C/C++, so I headed my way to CPlusPlus.com, and went through the tutorial there.

Once you complete the tutorial, you should probably set about learning Win32 basics, which is where theForger's Win32 Tutorial, which pretty much covers the ground levels of programming within the Windows environment.

From here, the options are wide depending on the game he wishes to make, although I suppose it will be graphically advanced, in which, the choice is narrowed to between OpenGL and DirectX. I couldnt get the hang of DX, so I started learning from NeHe's OpenGL Tutorial, which teaches you game programming with graphics in a way.

That's how I did it anyway <.<
infinitas
infinitas
Frankly; how smart is he?
If he's a real smart ass, and can do maths/logic without even thinking about it, start him at:
http://www.cplusplus.com/doc/tutorial/
Then throw him at google. While he may whine, spoon feeding never helps anyone, he must also have the motivation to want to learn it himself and figure it out for himself, otherwise he isn't going to go anywhere.

On the other side you could try with a higher language (Python/pygame, or even Java).

However it also depends on what you know TO be able to teach him. No point telling him to learn Python if you don't know it yourself.
oler1s
oler1s
I didn’t know our standard advice mattered based on age. Don’t start with C++. Start with Python or C# or another high level language. Go slowly, starting with the language and focusing on writing small programs. It’s the same whether you’re 10 or 50. Age is irrelevant.

So I highly disagree with the previous posters who talked about starting with C++. I also disagree partially with infinitas’ statement that it depends on what you know to be able to teach him.

Actually, if your brother is 15, why is he himself not posting here? Why is he not Googling? Why is he not taking the initiative by himself to learn? Teaching game programming is not like showing someone how to use e-mail. There are no 10 secret steps to memorize.
TheTroll
TheTroll
Something about teaching younger people. They like to see results. So everything you need, he needs to be able to actually see the program working and what he is learning without hours of typing.

theTroll
Broadway83
Broadway83
I agree that C++ might be a rough way to start. And while I make a living at it now, I didn't find it to be a friendly way to learn OOP or programming in general. I was considering pushing him towards either using scripting or C#. But I was hoping to hear from a voice of experience.

As for why he isn't posting . . . . I might be impatient, but I wasn't about to throw him onto the forums. I figure I can offer him some help without the forum flaming.

Plus, I'd rather he annoy me than other people hahaha
Maverick Programmer
Maverick Programmer
I started with a nifty tool called Gamemaker:
(gamemaker.nl)
It was a drag-and-drop (GUI) based game creator, but you also had the option to go "advanced" where you would could code. This got me to a point where I understood how to declare variables and run functions ( very similar to C ). Then, at the age of 11, I started C++. My dad had a book. (That thing was huge) and a compiler on the pc so I just sat and read it. I had no help what-so ever from any outside source (unless you count Google and website tutorials I would stumble upon) until I found GameDev.net at the age of 14 (est. time)

So in short:

Gamemaker.nl ( it also has a forum for development ) //Start him on this first
Beginning C++ ( you'll probably find it in your nearby library ) //After he feels like he could do more, go into C++
Beginning Game Programming by Michael Morrison ( uses Windows API [called GDI or something] ) //Take him into graphics land when he's ready
Beginning OpenGL Game Programming //3D graphics land after 2D gets boring

And if he needs help, send him my way. I like helping/tutoring. :p

I hope I helped any!
~PCN
Holy crap, you can read!
programmermattc
programmermattc
I was around 18 when I started programming so I was older than some of the other younger people on the forum. When I started I found a simple language like VB helped the most because it was simple and still taught me the general techniques of programming. VB holds your hand partially through development which is a major help compared to something like C++ where error messages and the language are a more learned/engrained knowledge. Plus, in VB you start with a form you can put stuff on, allowing images, sound, etc...

I'd say set him up with VB and give him little challenges. "See if you can program this button to put text in a text box." "Can you convert the number in the box if I click this button?" Just very simple things to build the understanding of general programming eventually leading up to classes and objects. Once he's a bit comfortable with it, see if he can make a simple game in VB or see if he wants to try a different language. Heck, send him my way, I'll give the kid some easy stuff to work on :D
=============================RhinoXNA - Easily start building 2D games in XNA!Projects
Sirisian
Sirisian
^ oh god no. Not VB :P It took me a long time go get my twin brother to switch to C# from VB. (I used VB6 and VB.NET extensively in high school along with C++ and looking back I can't stand the syntax).

I didn't seem to have a problem picking up C++ when I was 13. However it wasn't until I was 14 that I think I understood why I was using OOP and how to do inheritance and such correctly. I used a cheap book called Sam's Teach Yourself C++ in 24 hours. It's not the best, but it does cover the basics. (I own the 21 day version and it looks much better).

Since I'm 19 now I've seen people go through their first year of CS (I opted out of the low level classes) and they used C#. You gain solid OO ideas which would make learning C++ later much easier since a lot of people I've met got tripped up with the pointers and couldn't see the big picture.
Maverick Programmer
Maverick Programmer
Quote:

I used a cheap book called Sam's Teach Yourself C++ in 24 hours. It's not the best, but it does cover the basics. (I own the 21 day version and it looks much better).


That was the huge freak'n book that I had to self teach myself! It scare the crap outta me! 0.o

DO NOT START HIM ON THAT!

It would be like making junior high kids recite Homer's Odysee... in French!

Please... spare him. 0_0
Holy crap, you can read!
programmermattc
programmermattc
Quote:
Original post by PCN
Quote:

I used a cheap book called Sam's Teach Yourself C++ in 24 hours. It's not the best, but it does cover the basics. (I own the 21 day version and it looks much better).


That was the huge freak'n book that I had to self teach myself! It scare the crap outta me! 0.o

DO NOT START HIM ON THAT!

It would be like making junior high kids recite Homer's Odysee... in French!

Please... spare him. 0_0


The 21 day version of the book taught me C++ (I had problems learning it before that). It's the only book I have for C++ and doubt I need another one. I hope you're talking about the 24 hours one PCN. In fact, I took that 21 day book and didn't even read it in front of a computer, I read it before bed each night without trying it and I got the basis of probably most of my C++ info from it.
=============================RhinoXNA - Easily start building 2D games in XNA!Projects
cdoty
cdoty
Quote:
Original post by oler1s
Don’t start with C++.


I gotta disagree a little there. Start with an intro to C, and then show him some SDL examples. He should be able to understand how to use C by modifying the SDL examples. He'll be learning two things at once, SDL and C. That's how I got started learning C (it was FastGraph examples back then). It's always easier to learn when you are working on or towards something, and you're driven to learn new things in the process. And, using a toolkit like SDL hides a lot of the beginning code needed to get started.

The starting program becomes something as simple as:

int main()
{
callfunctiona();
callfunctionb();

somesortofwait();

return 0;
}

For an actual SDL program (with descriptions), check here:
http://wiki.gp2x.org/wiki/Writing_an_SDL_Hello_World
Check out Super Play, the SNES inspired Game Engine: http://www.superplay.info
guywithknife
guywithknife
I would advice against starting anyone off on C++ regardless of age.
My personal choice for teaching someone to program (games or otherwise) is Python as it's easy to understand, allows you to ignore complex details until ready to learn them, has plenty of libraries available and anything learnt will translate well to other languages. For more details on why I recommend Python (and not just as a beginner language) read my post here.

For game programming in Python you can use Pyglet (which I recommend) and Pygame (which is also quite good). For some good books on Python, try How to Think Like a (Python) Programmer or Dive into Python.

Good luck.
cdoty
cdoty
Quote:
Original post by issch
I would advice against starting anyone off on C++ regardless of age.


Why? They don't need a full understanding of C++ to use it. It's probably enough to understand main() and how function calls work. They can learn more as they need it. They will quickly need to learn 'if', 'else', and 'for'.

Check out Super Play, the SNES inspired Game Engine: http://www.superplay.info
Maverick Programmer
Maverick Programmer
Quote:

I hope you're talking about the 24 hours one PCN.


Yes, that's the one I meant. :D
Holy crap, you can read!
guywithknife
guywithknife
Quote:
Original post by cdoty
Quote:
Original post by issch
I would advice against starting anyone off on C++ regardless of age.


Why? They don't need a full understanding of C++ to use it. It's probably enough to understand main() and how function calls work. They can learn more as they need it. They will quickly need to learn 'if', 'else', and 'for'.

There are many reasons.
Practically, because C++ is not a very efficient language from a productivity point of view (for a beginner). In Python you can get instant feedback through the interactive interpreter and it requires significantly less effort to whip some interesting graphics together. Instant (or minimal effort) feedback is important for beginners to stay motivated. Python also insulates you from trivial tasks such as declaring variables (type inference is one reason I love functional programming languages) and managing memory.

Then theres the other reasons. C++ is a beast of a language with many hidden traps. Even expert programmers trip up in C++ as was proven by Washu's quiz. There are simply too many things in C++ that seem trivial, but in fact are not. This is certainly not something a beginner should need to deal with.
The old header file model leaves a lot to be desired for too and, in my experience, is just a point of confusion for beginners.
Finally (not really finally, I'm sure I or someone else could add to this list), manual memory management is something lots of people do badly. Again, not something a beginner should need to worry about.

Don't get me wrong, I don't mean to bash C++. I actually use it a lot myself (or used to before I started using Python more), however, C++ simply has too many pitfalls and too few redeeming factors (does it have any??) as a beginner language.
Maverick Programmer
Maverick Programmer
Quote:

Practically, because C++ is not a very efficient language from a productivity point of view (for a beginner). In Python you can get instant feedback through the interactive interpreter and it requires significantly less effort to whip some interesting graphics together. Instant (or minimal effort) feedback is important for beginners to stay motivated. Python also insulates you from trivial tasks such as declaring variables (type inference is one reason I love functional programming languages) and managimg memory.


Like I said, get Gamemaker.
( gamemaker.nl )
Holy crap, you can read!
guywithknife
guywithknife
Quote:
Original post by PCN
Quote:

Practically, because C++ is not a very efficient language from a productivity point of view (for a beginner). In Python you can get instant feedback through the interactive interpreter and it requires significantly less effort to whip some interesting graphics together. Instant (or minimal effort) feedback is important for beginners to stay motivated. Python also insulates you from trivial tasks such as declaring variables (type inference is one reason I love functional programming languages) and managimg memory.


Like I said, get Gamemaker.
( gamemaker.nl )

I agree. I didn't mean to say those are the reasons Python should be used, just that they are the reasons C++ should not be used.
AgentX
AgentX
I learned to program in BASIC on my Atari 800 (and later on a Commodore 64) when I was in junior high. But by the time I was in high school, I had given up programming. I had little to no exposure to computers from Windows 3.1 to Win98. Around the time Win98SE was released I bought my first PC and spent the next year playing catch-up (and lots of games!). After discovering I could change the gameplay in Rogue Spear by just editing some "text" files, I decided to get back into programming. After trying to wrap my brain around some online tutorials, I went out and bought a book: Herbert Schildt's "Teach Yourself C". It was exactly what I needed at that time. Since then I have bought a few of his other books and have been a little disappointed, so I am not saying "Go buy Herbert Schildt books!" However, "Teach Yourself C" had the perfect pace and content to introduce me to C. In retrospect, I wish I had just jumped right into C++, because wrapping my structured BASIC/ANSI-C brain around OOP took me quit awhile. IMHO, the big mistake a lot of beginning C++ books make is teaching C++ like you would teach C, and only getting into the OOP stuff in later chapters. I would love to see a beginner's book that on page one assumes no prior programming experience and begins with an introduction to classes and objects. A book for beginners doesn't need to devote entire chapters to discussions of variables, data types, operators, arrays, "Hello World", cout... Those things can be taught on an explain-as-you-go basis while teaching object-oriented programming. Wow! Sorry for the long rant, I will step off the soap-box for now...
ZachMeyer
ZachMeyer
I actually started "programming" (if you could call it that) when I was 12 using QUEST from the Synthetic-Reality game Well of Souls. That scripting language was very simple and although it did not teach me good programming practices, I did learn a little bit about how to do programming procedures (GOTO, gahh!)

Then, when I was 13-14, I moved to VB6 (being .NET was very new and I was scared of it) and I wrote some pretty neat stuff, but after a while I gave up on it and moved to VB.NET 2005 (.NET 2.0). I programmed in VB.NET 2005 for about 6 months before giving up on its debilitating syntax.

I tried to learn C++, but I knew it wasn't the right time for me yet, so I moved to C# which is kinda like some weird VB/Java/C crossover language and I have been writing code in C# for nearly 2 and a half years now and I consider myself semi-professional at doing it (don't stick it to me :P).

Now I am 17, 1 year left till I graduate, and I am finally learning C++ (well, I have learned the basics, so I am moving into DirectX 9.0c and the math). I read the book "Learning C++ Through Game Programming: First Edition" and "Sams Teach Yourself C++ in 24 hours: Fourth Edition" and I found the Sams book to be a better reference book becuase Learning C++ Through Game Programming is a more fun approach and does teach you a lot.

That was basically how I got started with programming. So here is what I would recommend.

C# - Don't buy any books, I have never read a book and I can write C# code from memory

C++ - "Learning C++ Through Game Programming: First Edition" as a workthrough book, and "Sams Teach Yourself C++ in 24 Hours: Fourth Edition" as a reference book.

VB - Please don't

[EDIT]

Another thing is that if your brother is too lazy to post on a forums or to go googling, programming isn't for him. Programming is about initiative, and that is a very hard thing to come by (trust me, I know from many failed projects).
MSN Contact: zachmeyer@movie-boards.com

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.