Tuesday, March 6, 2012

Games programming - choosing a first language

Introduction
Recently my son has taken an interest in programming (well a bit...) and I thought that was a good excuse for a diverting my attention occasionally and helping him learn in an entertaining manner.

The first hurdle was choosing a language. We originally had a bit of fun with "scratch" and although it helped with the basics doing anything of note quickly became rather painful. However with the concept of logic and variables understood it was a useful exercise.

Next I tried to encourage him with Python; I often use this at work; and thought it clear and precise with a large platform base and mature libraries. No luck however - he simply didn't get interested.

I could go on and laugh at showing him the perversities of Perl (love it) and the obtuse nature of Basic variants. Suffice to say nothing really gelled.

Of course the flash of Flash was a strong contender in his eyes; but the closed-source nature and the limited number of supported platforms put me off.

So in the end the obvious choice was JavaScript.

Why JavaScript?
Personally I was dragged screaming and kicking to JavaScript. This was not out of any kind of stubbornness and an unwillingness to learn something new; it was just that I couldn't see the point. I knew Perl, Python, PHP, C, Tcl and so on - so what did Javascript offer me -  or my son?

However the answer is of course obvious; it is pervasive across browsers and available across different operating systems. More recently with HTML 5 features - particularly the canvas - dynamic graphics are relatively easy.

Performance was always an issue but newer browsers and platforms offer more than enough processing power to pull off most things a 10 year old might want to program.

So JavaScript it is!

No comments:

Post a Comment