One of the first things on the agenda is to reacquaint myself with game programming. I have let programming in general slide a bit in 2008. I have done a bit of prototyping in Matlab and Python, but that is about it. It is somewhat understandable due to my focus on my studies, but it means I need to play catch-up in early 2009. Fortunately I do not think it will take me that long to get back into the swing of things, given that I am keen to get started and am prepared to fully immerse myself for a while.
The question to consider is which programming languages do I need to learn? This is a common question on this forum, and one which is not straight-forward to answer. I am posting this not so much to get a definitive answer from the community, but more to help explain my current intuition on what is best for me in my current situation and maybe get some pointers on aspects on which I might be mistaken.
For the overview, here is what my current intuition is on the languages I should learn for different tasks:
- General Purpose - Python
- Heavy Duty - C
- Scripting - Lua and/or Python
- Web - PHP, HTML/CSS, Python
- Additional - Flash/ActionScript
Farewell to C++
If in the forums I were asked the question "if I were to learn only one programming language for game development, which one should I choose?", then I would answer C++. C++ has the low level power of C, but with the higher level object oriented aspects that make large application development more bearable. It is also the most popular programming language for game development today (unless things have changed in the last few years!)
The problem is that the assumption in the question is flawed. You don't need to stick with just one programming language. It is better to pick a language that excels at the role you wish to employ it for.
I migrated to C++ from C ages ago. While I have been using C++ for my games for the last few years, I have found that once you dig deep into development there are a number of pesky annoyances that swarm around you like a cloud of mosquitoes. I like the use of classes and namespaces to organise code, although there are a slew of gotchas when using constructors you need to be careful with. Templates can be useful, but their use looks like someone ate a big bowl of punctuation and then threw up all over your code and the compiler errors that can cause are worse than reading the fine print in an EULA. I never really got the hang of the proper use of exceptions (C habits die hard), and I never saw the point of why operator overloading was added to the language.
I am also a bit sick of the object oriented-ness of C++, particularly with game development. While my earlier games were all object driven, lately I find myself drawn more towards event driven paradigms. While this can still be implemented using objects in C++, I've found myself feeling somewhat constrained by what I consider the "proper C++ way" to do things. This may be more psychological than a limitation of the language, but it is a negative for me.
The main thing C++ has going for it is that it is ubiquitous and thus has good support in the form of libraries, compilers, debuggers and profilers. However this advantage is dwindling now that many other languages are gaining in popularity. I don't think this reason today is strong enough to pick C++ by itself. My gut feeling is that I am better off shelving C++ for my own programming tasks and moving on to other languages.
Python - the General Purpose Language
Python is my current frontrunner for my go-to language for general purpose tasks. I have only really got into Python this year, but it's been great for prototyping things up. From what I have seen it has good library support for most things I would want to use it for. I have not yet looked into how good the debugger and profiler support is, but I am assuming there is a decent solution out there.
My only concerns for Python being my prime language for game development are its speed and how easily it can be used in general deployment. The first is most likely not an issue once I figure out the best way to profile and rewrite chunks in C. The second might be a bit thornier if the method is clunky or the result is bloated. However this is something I will need to test.
Regardless of those concerns, I feel Python is my best choice of language for in-house tools and utility scripts, so I will be spending more time learning how best to use this language.
C - the Heavy Duty Language
When a higher-order language is not fast enough, I will turn to C. Pure C is the language used for many libraries, and while C++ could also work pure C just feels right to me for this job. C also is better than C++ for cross-platform compilation and linking. Together with a scripting language I think it's perfect.
Scripting- Lua and/or Python
I think it's time I use a scripting language for the bulk of the game content. For game development there are two scripting languages that I think are appropriate, Lua and Python.
Since I am planning on learning Python anyway, there is an advantage to using this as the scripting language as well. Python also has great library support. Of the two, Python is the one I currently know best, and it fits in well if I think I should be writing my game primarily in a higher language. Under this choice, I would effectively be writing my game in Python, using additional C extensions for the heavy lifting.
However Lua appeals well to my aesthetics for how a game should be built - small and lightweight. While I currently don't know much Lua, it appears to be a simple, elegant language which should not be hard to pick up. It too will work well with C, but probably more if I think of it as a C program extended by Lua scripts.
I don't have enough information as to which would be better for my purposes, so my best option is to trial both in a small game first thing 2009 and see which feels more natural.
Web - PHP, HTML/CSS, Python
I also need to get started on the web development side of things. This will involve brushing up on my HTML and CSS, as well as picking up some basic PHP. I currently am a complete novice at PHP, but I don't think it'll be that difficult to pick up a working knowledge to maintain a website. This is also an area where I can use Python.
Additional - Flash/ActionScript
Finally, I'll be getting back into working with Flash and ActionScript. Flash is an excellent platform for prototyping game ideas, and I can post them on the web for people to play with a minimum of fuss. Given I'm into vector art this is a natural choice.
There's a lot of learning that needs to be done in 2009, but I think looks more daunting on paper than it actually will be. I figure I'll pick up my rusty C skills pretty quickly and get into Python and Lua with a minimum of fuss, and the web languages I can learn when applicable. I'm hoping that while this approach might mean I need to hit the books a bit in January, I'll be much more lean and efficient with development for the remainder of the year.