Tuesday, 26 February 2013

Programming language fan-boys (and girls)

Wow! I’ve been programming in one form or another all my working life (20+ years) and had no idea that such a thing as the programming-language fan-boy existed until I recently started looking into which language would be best used to program an independent computer game.

I was using C#.Net at work lately and I've just discovered the XNA tool-kit, which can be used to develop games for MS Windows, Windows phones, and the Xbox 360... And I have access to all of those.
After a quick play; it isn't busy at work lately, we’re waiting for a systems upgrade before starting the next project; I can definitely say I've developed a bad case of 'shiny object syndrome.'

I don't have any ideas as yet, but I probably will be writing something using this system, if just to see what I can come up with, so I’ve decided to give writing my own Indi game a decent go. I’ll probably write it to work on windows to begin with and maybe try to get it on to xbox-live or something. Although unlike a lot of the comments I’ve read on various message boards, I’m going into this with my eyes open, and with realistic expectations.
 I do currently program commercial programs for a living, just not games ones. I have learnt a lot of languages over the years, as and when I needed them, but haven’t really given any one system much more credence than the others. I do have a personal preference for older (lower level) non-object-orientated stuff. I mostly use VB.net just now, and sometimes find myself fighting it more than using it. C# seems to be a bit better, because I think it gives you a bit more freedom in your code, but I still find these object-based very high level languages restrictive. Then again, I program a 30+ year old video games console in assembly language (machine code) for fun, so I freely admit that my view may be slightly scued in this.

There do seem to be a couple of constants though:

1) The current commercial games producers (especially the console-based ones) pretty much exclusively use C++ for producing game code. So if you are planning to gain employment by a commercial games published you should learn to use, and probably also build up a portfolio in, the C++ language.

2) If you are planning on building and distributing an independent game yourself, the language you use to write it isn’t really that relevant, and may mostly depend on the platform, or platforms, you intend to release your game for.

The fan-boy-isms in programming do seem to be centred on games programming in perticular, and the participants do all (mostly) seem to fit into a specific age and experience demographic. Not that I’m dismissing this, just stating a fact as I’ve observed it. Not that I’m saying the wider world of programming doesn’t have its advocates and naysayers, but I’ve never seen this directed with such ferocity, fervour, zeal, and conviction as in the world of (indi?) games programming.

I’ve read a lot about people saying C++ is best for games; because it’s low-level, the industry standard, and that it’s also harder to learn; making much of the fact that it has no ‘garbage collection’ and you need to ‘memory manage’ the systems variables yourself.
  • Now, I think this can be misleading. To me at least, the original C wasn’t all that low-level in the first place. Yes you could do some low-level things, but that dosn't make the language itself low-level.  
I remember first programming in Turbo Pascal, and thinking it very high-level at the time. Even some of the old home-computers' ROM based Basic languages had you changing, reading and calling memory addresses directly, as well as directly managing memory space. Some even let you  directly add assembly language routines, so that’s all fairly low-level stuff. Assembly, now that’s proper low-level, and I’m certainly not saying that there aren’t advantages to that in certain situations.

I’ve also heard it said that the newer high-level languages, especially the .Net languages are easier to understand, hence better to learn and start off on.
  • This I would have to disagree with, if only on a purely personal basis. Perhaps it’s because I started my career way-back-in-the-day; where we had standard COBOL , Pascal and the new-ish C; no object-orientated stuff, but I initially found it extremely restricting and frustrating to be ‘forced’ to do things the high-level, black-box centric, VB.Net and C#.Net way.
It’s true that high-level can mean less freedom, but it can also mean les (low-level, or machine hardware based) problems, more intrinsic compatibility (depending on the systems used), and perhaps most importantly simpler and faster development times. A side-effect of this being that the code produced will have other standard-library things in there and may run slower than that produced in a lower-level language: but this is by no means a given.  On the other hand, if well written, high-level source code is intrinsically easier to follow, hence debug.

So what have I come away with after reading all this fan-person debating?
Well funnily enough it’s ‘Use what you want to use, unless you are aiming to get a job with an existing commercial games manufacturer. In which case use C++.’
No huge reveal there then...  But be aware of any platform restrictions this decision may put on your code.

For most independent games development I think the speed differenced between say, the unmanaged C++ and the managed C# (.Net) would be negligible, regardless of the many voices that site this as a reason to go the low(er)-level route.  I’m assuming they wouldn’t advocate writing a modern PC game entirely in Assembly, especially since a lot of these self-same people also seem to advocate the use of pre-rendered ‘game engines’ and various black-box type multimedia library systems.  Come on, you can’t really argue both side of the fence folks. Although having said that, a fair few independent developers seem to take great delight in re-inventing the proverbial programming-wheals to their own specifications. Good for them, I say. We have quite enough ‘engine’ generated sameness on the shelves already, thank you very much…

The current games industry seems to forget that it’s been shaped by the spectacular failures of the past just as much as by the runaway successes. Without past developers experimenting with the media, the industry we have today may not even have existed. For all their turbulence, the independent programmers and a lot of the upcoming programmers/developers do have a passion and the urge to create. I just hope the current trend of increasing exposure to the non-mainstrem continues, grows, and flourishes. In the eighties there was no such thing as an ‘alternative’ game, they were all alternative.


  1. hi you have a great blog and i am also a blogger

    visit my blog at:

  2. I am wondering which programming-language use the producer of the slots machines?

  3. This comment has been removed by the author.

  4. The complete blogs are really inconceivable and definitely everyone will share this information. best free games

  5. What a great sort of the information regarding to the games development for window phone and also for the window platform. i played the flash games but the window games are of the great. i often played Dress up games.

  6. Thank you for sharing valuable information. Nice post. I enjoyed reading this post. The whole blog is very nice found some good stuff and good information here Thanks.