Language List for 2009

Published December 11, 2008
Advertisement
For me, 2009 is going to be a big year for game development. This is the year that I am going to move away from the hobbyist mindset and start treating this as a professional career. In practical terms, this means I need to consider how I can make quality games within a time budget rather than just focus on whatever takes my fancy (although there will still be a bit of that!)

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.
Previous Entry Silly poll
0 likes 7 comments

Comments

choffstein
Where is the esoteric, academic language? J/Forth/Io all seem like good choices for messing with your brain!
December 12, 2008 05:33 AM
_the_phantom_
I'm also wondering if you have given any consideration to using C# along with other .Net languages such as IronPython?

With regards to Lua, it is indeed nice and light but it does lack the huge standard library which comes with Python.

Usage wise, well you can think of it as extending C, the other option which is one I played with for a while is to have a small C 'boot' program which loads a script and have that run the game including loading other modules etc (which may or may not be C dlls). The nice thing which this is you only need to build the boot app once and it'll work with scripts forever [grin]
December 12, 2008 07:59 AM
Trapper Zoid
Quote: Original post by visage
Where is the esoteric, academic language? J/Forth/Io all seem like good choices for messing with your brain!

This list is more about those languages that I feel are best learning for development purposes. I'd love to play around with ML languages like OCaml some more, but with my current level of understanding I do not think it is best to consider a declarative programming language rather than an imperative one for day to day development.
December 12, 2008 01:16 PM
Trapper Zoid
Quote: Original post by phantom
I'm also wondering if you have given any consideration to using C# along with other .Net languages such as IronPython?

A teensy bit of consideration, but probably not enough [grin]. This list has been something that's been churning in the back of my brain as I work on non-related things, so it's been basd on my current level of knowledge of what is out there. .NET hasn't been something I've looked into in the past, so it hasn't been something I've seriously looked into.

My main concern with .NET is that I like being cross-platform and I develop on an iMac, so I'd be using Mono. I don't know how close Mono is to .NET, but even in the best case scenario that's an additional level of things that could go wrong that I'd need to test for. At least with the Python/Lua/C combinations I know I can rely on totally transparent C libraries for cross-platform functionality; I've done it before, so I know I can do it again.

Quote: With regards to Lua, it is indeed nice and light but it does lack the huge standard library which comes with Python.

I just don't know yet how much I need that standard library for game development. I probably won't need as much as I think. I'll need to trial both to make an informed decision.

Quote: Usage wise, well you can think of it as extending C, the other option which is one I played with for a while is to have a small C 'boot' program which loads a script and have that run the game including loading other modules etc (which may or may not be C dlls). The nice thing which this is you only need to build the boot app once and it'll work with scripts forever [grin]

That's kind of the architecture I'll aim for. My game framework has been slowly moving in that direction for a while. I've got a standard kernel approach that's very application neutral, and with an event driven architecture everything is extremely modular.

The new bit will be using scripts with this, but I'm sure there's enough info out there to make it a relatively painless learning experience. Fingers crossed! [smile]
December 12, 2008 01:30 PM
Telastyn
Do you need to learn any more languages? I mean if you know and like Python, how is it not suitable for your needs?
December 12, 2008 01:44 PM
Trapper Zoid
Quote: Original post by Telastyn
Do you need to learn any more languages? I mean if you know and like Python, how is it not suitable for your needs?

I've only really dabbled in Python. I've written a few small programs and used it for prototyping algorithms, but I haven't used it for anything large scale. I don't know how well suited it is for production code until I try. I do think though that it's well suited for everything in-house.

I feel Lua is worth a try because it seems good, aesthetically. It's simple, appears elegant (at least from my initial playing around with it), and the evidence I've read suggests it'll be a snap to integrate. I think it will "feel" a bit different from Python as a scripting language, so it's worth a test. Plus it was used in Monkey Island and Baldur's Gate, and that gives it irrational cred points [grin]. (Then again, Python was used in Freedom Force).

I used to be quite proficient in C, so it's not going to be hard for me to pick that up again.

All the rest are specific languages for specific tools; PHP for web work, ActionScript for Flash games etc. They're languages I'll need to learn but not necessarily become fluent in.
December 12, 2008 03:26 PM
_goat
Are you sure you want to go with C over C++? I don't see any advantages, and I see a lot of disadvantages. Most of the good bindings for Lua/Python are written in C++, FMOD uses C++, the Boost.SmartPtr classes are in C++... you lose a lot of already-written functionality. Furthermore, cross-platformness is a moot issue, really: We've been developing on the Wii, Xbox360, PSP, PC (Windows), and DS now, and they all support C++ well. And I mean well: So far, all Boost we've used has worked (header-only libraries, mind you). What we've found is that even Lua (our scripting language of choice) is too large/slow for the DS, and a lot of AI functions have been rewritten in C++ - which brings another point up: C++ 'maps' better to these scripting languages than C does.

Aaaaanyway, I think you're wrong about your choice of C over C++ for your backend language.
December 14, 2008 06:39 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement