Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I have a 11-year old son who wants to do game programming. I've started him on C++ (C++11) and he's learned iostreams, looping, functions, logic and flow control. I'm using the standard library and no memory management at all.

But I would like to ask: What language would you suggest for a pre-teen (Python, ...)? What books would you suggest?

We looked at one book that was just for console ASCII games. I liked the C++ that it taught but I think he'll get bored without some graphics at some point.

share|improve this question

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

closed as not constructive by ChrisF Dec 4 '11 at 0:41

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. If this question can be reworded to fit the rules in the help center, please edit the question.

Assembly. If he understands, all else will be a breeze. –  Glenn Nelson Nov 8 '11 at 3:00
I suggest he learn the language of Linear Algebra. –  BlackJack Nov 8 '11 at 5:42
@compman: what does touch typing have to do with anything? Lots of professional programmers can't touch-type, so it's certainly not a requirement. –  tdammers Nov 8 '11 at 11:36
Object-oriented programming is not a silver bullet, and being stuck in an object-oriented mindset does more harm than not being exposed to OOP could ever do. I'm getting the impression that you haven't had much exposure to other (high-level) programming paradigms yet, as you seem to think of OOP as the one true way. There is no one true way. –  tdammers Nov 8 '11 at 13:10
What's wrong with making games on your TI 83 in BASIC like the rest of us? –  Ben Brocka Nov 8 '11 at 13:21

27 Answers 27

up vote 46 down vote accepted

Python... definitively.

C++ is nice and a sure value, knowing it will pretty much enable him later to quickly grasp any other language in the family (Java, C# etc). BUT it is also arcane and complex. Some aspects of its syntax are rather difficult and unpleasant.

Python has definitive advantages here for the learner :

  • The REPL : To be able to whip up a console and try right away some syntax and get results is a very powerful learning tool. You get immediate feedback, which tickles more efficiently the brain's reward mechanism, thus making learning more fun for one, but even more important, makes lessons easier to remember.

  • Extensibility : It is easier to jump from python to another language because many of them are directly accessible from it. He can then have some quick expeditions in other languages while staying in the comfort of the already acquired knowledge. Jython, Iron Python or C++/C through CPython's natural extention mechanisms.

  • Cost : a lot of good material and good environments are available for free with Python. Though this is not limited to Python, it is certainly a cultural trait as the community has always been open and transparent.

On the negative side though is Python does offer a lot of line to hang oneself with. That said, with your supervision (I assume here you, yourself, are a programmer) you can help guide him towards the good practice.

Having said that though... the biggest influence would most likely be yourself !

Python (or any other languages for that matter) could be the best possible academic language, but it is useless if you cannot help ! So regardless of my opinion of Python here, if you feel more comfortable teaching him C++ because this is what you know best then C++ would most likely be the best choice for both of you.

a little something I stumbled upon that might prove useful : Pygamezine

This also might prove useful : Intro to Python ecosystem

share|improve this answer
+1 for Python. If not Python, LUA. Both are used extensively in gaming nowadays, so learning them is paramount. –  TyrantWave Nov 8 '11 at 10:33
I second python, and more specifically I would recommend starting with the text game exercises in this free e-book inventwithpython.com –  jhocking Nov 8 '11 at 13:07
You can do lots of great stuff in Python and it's a great language to learn in. –  Ben Brocka Nov 8 '11 at 13:21
If Python give you rope, C++ gives you a fully-staffed rope factory. –  Donal Fellows Nov 8 '11 at 14:45
@Donal Fellows - Guess the question then is: Does the child want to play with a rope, or become a manger of a rope factory? –  Buttons840 Nov 8 '11 at 20:04

C# or Visual Basic with XNA Game Studio.

Through the XNA Game Studio, your son can compile the code into binaries for Windows Phone, XBox, or Windows itself. The platform is rather stable; i.e. you don't have to worry about hardware driver compatibility because the framework takes care of it.

There are also many XNA related resources on the web, such as XNA Developer Center, XNA Resources and Riemers XNA Tutorials.

Your son can also publish his first game easily through Microsoft's App Hub for Windows Phones, or to XBox Live.

share|improve this answer
don't bother with VB.NET. Teach him the OOP stuff straight. –  mauris Nov 8 '11 at 5:21
+1, conditional on your choice being C# and not god-awful-VB. –  pwny Nov 8 '11 at 6:46
@thephpdeveloper: And VB.NET isn't OOP because? Don't get me wrong, I don't see why you would choose VB. –  Steven Jeuris Nov 8 '11 at 13:29
Heaven forfend that a child might learn to code without semicolons! –  Joel Brown Nov 10 '11 at 22:04
@thephpdeveloper, might I suggest that your assumption is not correct? The C# and VB teams now work together. –  Benjol Nov 11 '11 at 8:25

Scratch - designed by MIT folks for exactly this purpose. According to http://scratch.mit.edu/ kids have uploaded over two million programs!

See at http://scratch.mit.edu/channel/featured what kids can do and share with others. Most importantly, they can take another kids project and continue working with it.

share|improve this answer

I'm a big C++ person, but when instructing kids, you can either spend a lot of time on the C++-centric stuff (pointers, smart pointers, containers) and then moving on to using libraries and learning about setting up your environments and builds and graphics and all that, but it's not very immediately rewarding.

I think Python with pygame would be a pretty good choice, they already have working examples and Python is easy to get set up and running. It's a simpler language to teach and you are freed from some of the learning overhead that comes with C++.

edit: more importantly Python has the REPL and your son can learn by typing in commands and getting responses in real time. Don't need to go through the build process like in C++, and it can make testing and experimenting much quicker.

I might be in the weird camp, but I think HTML5 <canvas> and javascript is starting to look like a really good environment/language to build games in. Some demos here: http://www.canvasdemos.com/type/games/

share|improve this answer


  • It works on any platform.
  • It comes with a simple IDE.
  • It's designed to get started with simple 2d graphics but also does 3d.
  • You can get games running on your Android phone, and put them on the Android Market.
  • You can put games on the web as Java applets, or as Javascript with Processing.js.

This is a valid Processing program:


and so is this:

for(int i=0;i<10;i++)

My 10-year old nephew and I recently worked on this simple game involving exploding tanks:

Bomb the Tanks (164 lines of code)

share|improve this answer


ActionScript 3.0 and/or JavaScript.


  • It was a great way for me to learn how to program. When I got bored of programming I could do some fun animations in adobe flash pro without knowing any code and work that into my game with a few lines of code.
  • There are plenty of tutorials all over the internet for ActionScript games (a.k.a. flash games).
  • Tons of videos on youtube for making flash games and flash animations.
  • Its a large industry for indie game developers. Check out armorgames.com, addictinggames.com, kongregate.com, gamesloth.com, pogollama.com, and many others.
  • Learning two languages (ActionScript & JavaScript) isn't that hard. ActionScript 3.0 has quite a few similarities with JavaScript. Granted, they are both more relaxed than say, Java.

Tools Needed:

Adobe Flash Pro - You can do without it which makes developing FREE, but it makes animation/graphics simple and fun. I would suggest looking into a student license on ebay if you aren't using it for commercial uses.


A few good FREE resources for learning to make Flash Games:

  • Getting Start Tutorial on Kongregate rocks.
  • StackOverflow is my fav for asking questions
  • Adobes documentation is great once you learn how to use it
  • Check out mochiads.com, and mochibot.com for some simple ways to monetize your games and track their performance/apply updates easily.

Get your game played:

An added benefit to making flash games is that a large distribution network is already in place. We would typically release a game on newgrounds.com and a few other sites. These games are then taken and placed on other flash game sites and soon your getting thousands of views, sometimes even millions without much work (if the game is fun). Pretty simple process.

Get Paid:

Games that received more views were ones we got sponsored which is pretty easy as well. When they got sponsored, the sponsor wanted to make sure it got distributed so they got their moneys worth. Just ask a game site to sponsor you and they will typically offer you anywhere from $100-$3,000. Hallpass.com was our best sponsor at the time, arcadecabin.com wasn't bad either.

Why Did I Say "And/Or JavaScript"?

I feel like flash games will be dying down soon (1-3 years). HTML5 Games (the name is very misleading) typically runs faster than flash games and can run on iOS. Google also has a hard time indexing flash content since its compiled. There are many other reasons, just google it and you'll see what I mean. An added benefit is that by knowing javascript you could build some really cool web apps.

share|improve this answer

Disclaimer: I know nothing about HTML5... but,

What about: Learning HTML5 Game Programming: A Hands-on Guide to Building Online Games Using Canvas, SVG, and WebGL


Technically it is Javascript, but at least it will be a marketable skill.

share|improve this answer

I would say Python.

It should be easier and more fun to learn than C++, at least as a first programming language, because you want to start seeing the magic happen as soon as possible.

As for games, Pygame is a decent library (or set of modules to be more precise) for creating games.

Finally, there's a nice book called "Dive Into Python" which is free and available online -> http://www.diveintopython.net/

share|improve this answer

There is no one best answer, but I think the ideal beginner's language should meet the following criteria:

  • A simple 'hello world' should present as few unexplained constructs as possible (this means strict OOP languages are probably out), and the language should keep overall boilerplate low.

  • The syntax, semantics, and standard libraries should be consistent and intuitive.

  • Simple tools: the language should be perfectly usable without an IDE. An IDE is fine and all that, but you don't want the learning curve of the IDE overshadow that of the language itself.

  • Easy-to-use library/package mechanism. Extending the functionality should be easy and straightforward.

  • A decent, easy-to-use game routines library. You don't want to confront a beginner with the complexity of OpenGL shaders or the DirectX API. Getting to the point where something moves on the screen is the point where people usually get hooked, so it is crucial to reach this point as quickly as possible.

  • Imperative. For two reasons: 1. Computers are imperative at the hardware level, so understanding imperative programming helps in understanding how computers work, which is a great advantage at higher abstraction levels; 2. Imperative programming is the most obvious way to approach a programming problem - you want the computer to do something, so you break it down into subtasks and explain it just like you would run someone through a procedure. Object-oriented, functional, logic, and other paradigms are a bit harder to grasp and explain, despite their ultimately superior expressivity.

Of all the languages I've ever used, none meets all the above, but Python is pretty close. Pascal would be good too, if only there were a decent modern ecosystem with good game libraries. Plain old C might be an option, but the big challenge here is understanding pointers and memory allocation. C++ is way too complex; BASIC is nice but, just like Pascal, lacks a good ecosystem (except for VB.NET, but that's not really the imperative BASIC I'm talking about anymore).

share|improve this answer

I'm young enough to have been in your son's position (though I didn't have anyone to consult). I got into programming because I wanted to write games. I learnt C and enjoyed writing little 2D games using raw OpenGL based on example code I found on the web.

The biggest problem I faced was that when I was creating these games was that I had no idea how to correctly structure components and how to prevent spaghetti. I also had no intention of learning at the time, I didn't see the point.

So whatever language you choose, explain that programming languages are there mainly for developers, not computers and please put emphasis on composability, proper code structure, writing testable code and the importance of functional purity.

share|improve this answer

ECMAScript specifically because it's implemented in JavaScript and ActionScript, which lend themselves to learning event-oriented client-driven programing.

Additionally making a game in either language is relatively simple to do at a very low level. I think it's a good way to learn while staying interested.

share|improve this answer

I have fond memories of learning POV Ray when I was about that age. I know, it's not a game programming language, but it is a formal language, it can produce spectacular images with a little effort, and it teaches understanding of analytic geometry.

I would also take a look at Processing. I never worked with it, but the executive overview on the website sounds like a fun language for a beginner:

Processing is an open source programming language and environment for people who want to create images, animations, and interactions. Initially developed to serve as a software sketchbook and to teach fundamentals of computer programming within a visual context, Processing also has evolved into a tool for generating finished professional work. Today, there are tens of thousands of students, artists, designers, researchers, and hobbyists who use Processing for learning, prototyping, and production.

share|improve this answer

The first thing I wrote as a kid was a game in some obscure version of basic from a (now) long dead computer manufacturer. But I still enjoyed it... I think it doesn't matter so much what he learns to program in so long as he has an interest in it and enjoys doing it.

That said, I'd say C++ and assembler maybe a bit too ambitious, but thats just my view anyway. I'd probably favour python (along with pygame, as another poster has mentioned). Seeing graphics and gameplay on the screen, that you've created yourself, would be a very rewarding experience.

share|improve this answer

Game programming in C#

enter image description here

The first games to make are quite doable: it begins with a Tetris & Snake clone.

share|improve this answer

I'd start him off with a game engine, like Unity, which has a lot of good tutorials and a pretty gentle learning curve. Being able to add a rigidbody component to a ball and then watch in bounce in roughly 10 seconds is a pretty good way to get started.

share|improve this answer

I recommend C. Since he's still a kid and a novice in programming he must have a strong foundation on basic programming concepts. C is neither high level nor low level and it serves well specially for system programming with the help of pointers. beginning with C++ will refrain your son from having a deep and clear understanding about how things work.
If you learn C well,moving into any other language would take only few days

When it comes to game development I like to use C++.

share|improve this answer

What about Small Basic by Microsoft ? (yes it's a variation of basic but with a good IDE) http://msdn.microsoft.com/en-us/beginner/ff384126.aspx It's not a heavy weight like c#, c or c++, but it's a good start .. and here's a game starter cook book http://msdn.microsoft.com/en-us/beginner/c2c8bac8-1f1e-41af-9b8a-7f7b82372685.aspx

share|improve this answer

I would give +1 on Dan Neely's answer on greenfoot. But I would like to give more information. It is written in java and uses java. It is built for beginners to programming. It is actually about teaching a programming languages.

Main advantages are :

  • It has a book written using that platform which teaches java. http://www.greenfoot.org/book

  • There are video lessons, which is great for starting.

  • A lot of different scenarios (games) exists.

  • A lot of classic games are already implemented. You may try to clone them with your son.

    • Hold the wall scenario: 3730
    • Bomberman scenario : 3726
    • Tetris scenario : 335
    • Snakes scenario : 2555
    • Classic platform games scenarios : 3532
    • Pacman scenario : 3639
  • It has built in API for game specific features, Collision Detection, easy to use mouse and keyboard support. These are not hard to write but when your aim is to write games, a nuisance. http://www.greenfoot.org/files/javadoc/

  • It has a good debugger, therefore teaching about debugging would be easier.
  • It has a scratch pad (try code without compile) to teach about simple things.
  • It has a packaging mechanism available, therefore your child may easily share his games with friends.
  • Of course it is java therefore a lot of libraries available.

Difference between XNA,unity etc and greenfoot is. Greenfoot is about teaching programming language using a Game coding platform. It is designed with this purpose. Others are game coding platform.

share|improve this answer

Kodu, Phrogram (formerly Kids Programming Language), or Greenfoot would both be good choices if you wanted to quickly build something interactive. All three are designed to allow rapidly wiring up simple games so that you can have something cool to play after only a few hours of effort.

I'm having trouble finding kodu samples in text form (pictures make it look like it might be mostly graphical, and I don't want to stream video from work).

Phrogram uses a simplified version of the visual studio IDE and has a VB derived syntax. Beyond the small code snippets in its help material I'm not having much luck finding any sample programs. Phrogram is a commercial application ($49 for the base module, with several $15-20 addons), Kodu and Greenfoot are both free.

Greenfoot is based on Java but has a number of constructs that make a simple game mostly an exercise in wiring parts together with simple code. The 4 part blog series Teaching my Daughter to Code gives a good walk through for creating a simple game in it.

share|improve this answer


Ruby is a great language for kids because it's simple, intuitive, and easy to learn. There's even a project to encourage kids to start programming in Ruby called Kids Ruby. It's a free, downloadable application that allows you to write and run Ruby scripts and games.

Another similar, but not kid specific resource is TryRuby.org. It's a fun way to play and learn how to start programming in Ruby.

share|improve this answer
Adults can't learn things that aren't simple. Just saying...if I were learning how to program, I would appreciate starting with a powerful, useful programming language that was designed to be syntactically simple and easy on the programmer using it. –  Andrew Nov 15 '11 at 22:34

If the goal is to create games, you can took a look at GameMaker, which is a platform to build games. This is a combination of drag and drop level and event creation, with the possibility to program in its own languange (GML).

This is especially aimed at creating games from a high level approach, but it can also help for understanding the very basics of OO, like classes, objects and inheritance. For a kid, I think this would suit nicely for a start in (game) programming!

share|improve this answer

One of my early games were written in vb6 windows. Perhaps C#+WinForms may be acceptable to him as it gives him GUI and is easy to use.

Unity3d may be good.

share|improve this answer

Google App Inventor looks like a fun visual programming language for building Android apps. Would be a great way to get into mobile device programming.

share|improve this answer
This is not really ideal for Game programming actually :/ –  xsace Nov 8 '11 at 19:38


  • Imperative
  • Simple syntax
  • Readily-available graphics functions
share|improve this answer

Tom Wright mentioned Flip in passing at CodeKen 2011 (yesterday)

Disclaimer:I've not got further than finding the homepage, I've no idea whether it corresponds to your requirements or not.

share|improve this answer

I am surprised no one has mentioned DarkBASIC. That was the language I really learned to program with, I believe I was about 14 at the time.

Edit Just saw where it was mentioned and misspelled in the comments =).

share|improve this answer

Alice or Kojo. These learning environments are made for kids, they are fun to use, and don't contain initial hurdles like professional languages do.

share|improve this answer

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