Skip to main content
Source Link
Two pi
  • 918
  • 4
  • 3

The language usually isn't the most critical aspect of game development. However, certain aspects of a language could make it more or less suitable for game development.

  • Data Management - Games are ultimately about data. Probably the most critical decision you make when you build a game is how the data will be managed. Pick a language that has good data management features. If all you've got is arrays, that's fine, but Objects, Structures, and advanced data types like linked lists and trees are often extremely helpful. Sure, you can build these things yourself, but it's great if they're already a part of the language.
  • Object-oriented - Games are one area (GUIs are another) where the object-oriented paradigm really shines. It really makes sense to think of the map as an object, each player as an object, items and inventory as objects, and so on.
  • Event-driven - This really goes hand-in-hand with OOP. Games are about events: the passage of time, user input, objects bonking into each other, robot zombie oppossums falling out of the sky, whatever. It's best if the language already has robust support for event-handling. Most OOP languages already have this.
  • Access to libraries - Typically you'll rely on some sort of rendering library to do the graphics work. You'll want a language to have a binding to at least the most basic libraries (DirectX / Direct3D for Windows, SDL / OpenGL for everything else) It's even better if you have access to some higher-level libraries that simplify the process.
  • Ease of use - Writing a game is hard. It's even harder if you're wrestling with your programming language. Often this is subjective, because a language is easy if you already know it. However, some languages (like Python) have a clean syntax and seem to stay out of the way. Java and C++ are great languages, but if you're not completely comfortable with their way of thinking, you'll fight the language more than write code.
  • Performance - You may be surprised that this factor is so low on the list, but I think that's appropriate. Certainly you don't want a language that prevents your game from playing at an adequate speed, but usually the language is not the problem with slow games, algorithms and data structures are the real logjams. Some quite impressive games have been built with Flash, which is about as slow as a modern game development platform can be. Optimize when necessary, but not before.

All in all, the programmer is a lot more important than the language. There is no perfect game programming language, but there are several that are good. I've taught and written about game programming in several languages: C++, Java, Python, and Flash. My current favorite gaming language is Python. It meets most of the criteria above. While Python is sometimes criticized for being slow, it usually relies on graphics engines written in C/C++ for the heavy lifting. Also, it's quite easy to write a critical section in C++ and run it from Python as an external module.

Hope this helps...

Post Made Community Wiki