Programming Languages

    In software design there are a great many concepts and areas of thought that need to be addressed prior to starting the development of the project. In game development this is no different than any other software development project. The first thing that needs to be addressed is the programming language that will be used for the project. It sounds very obvious however new developers do not always consider this when they start to design the game. Sometimes the most comfortable language is chosen or other times it’s what the developer is told they must use for the project.

    So what language is the best one to use for game development? The simple answer is YES because every major language can be used for all types of development. However, the long answer is NO because each has their own specialty and focus. Because of this simple fact It is important that the new developer knows a little bit about each language so that an educated choice can be made. This will reduce development headaches and hopefully development time.

    C/C++ is the most common language on the market for development. This is because it is considered the ‘father’ of modern languages. It is also the lowest level language on the market. Low level language means that it is close to machine code while high level is further away. This also means that there are a great many aspects of a C++ project that need to be handled by the developer because the language does not handle them by default. The advantage is that C++ can be compiled for Windows, Linux, Unix, Mac OS, 32bit or 64bit kernels. With the diversity and flexibility of C++ many major projects are still written. If speed is a factor, such as a game project, then this is the language of choice. The problem with C++ is that as mentioned there are a lot of considerations that need to be made during the development process. The second problem is that C++ code is not easily portable to a different platform, however well designed modular code could solve this problem but this will be explained in Object Oriented Programming [OOP].

    C# is the successor to C/C++ and is becoming used more often. C# is a high level language which means the developer can focus on the program and less on hardware specific design issues. C# is designed for windows development but has the capacity through XNA to produce projects for the Xbox360. C# can also be used as a web development language through .NET but this will be discussed later.

    Java is the most unique language because it can run on any platform as long as a Java Virtual Machine [JVM] is installed. Unlike C++ which needs to be compiled for each kernel a Java application is compiled one time and can be run anywhere. This provides a massive deployment opportunity however the cost is speed. Java programs are interpreted in real-time which means that the compiler needs to convert the semi-compiled language into machine code constantly. The performance hit is worth it if an ultra-mobile application is desired.

    PHP or Ruby are web based languages that like Java are interpreted in real-time. They suffer a higher performance hit as they are not partially compiled and they are also not well suited for most game development. This is because they are designed for general web page development and not live interactions. However with the support of JavaScript Frameworks and AJAX concepts it is possible to run a game using these languages as the work horse.

    So out of these languages it is easy to see that because each has its own strengths the proper language needs to be chosen for the project. To make it simple there are a few questions that can be asked prior to choosing the language.

  1. What OS(s) will the game run on?
  2. Is speed or direct hardware access required?
  3. Is the game single player, multiplayer, or server based?
  4. Desktop or Web based?

    The four questions will help the developer decided what language to write the project in. However, a simple solution is if the project is going to be designed for a standalone desktop application on windows that requires high performance then C++ is the best choice. However if it is going to be web based with high speed and graphics the developer will end up with Java. See how the difference in the target platforms changes the desired application? This is the important thing to keep in mind when choosing the language.

1 comment so far

  1. Emmett Tamaro on

    I just want to mention I am all new to weblog and really savored you’re website. Almost certainly I’m planning to bookmark your blog post . You surely have exceptional articles. Appreciate it for sharing your web site.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: