C是经典的“支柱语言”，也就是使用开放和关闭的花括号将一些表述组合在一起的有结构的goto-less语言。这是之后许多语言中所呈现的方式（包括C++, Java, C#, ActionScript, PHP）。C语言的无尽结构的一个优势便是一旦你理解了如何基于C语言完成某事，你便能够将其带到其它语言中（并且几乎没有任何改变）。例如C和PHP中的if(), while(), and for()表述都是相同的。也就是说如果你熟悉了C语法，它将在之后带给你非常大的帮助。
资源：尽管Kernighan和Ritchie的《The C Programming Language》是该主题的“经典”著作，但是该书只是快速地提及该主题，甚至未能让编程新手们好好理解。不过还有其它值得推荐的相关书籍，如《C How to Program》，《C Programming: A Modern Approach》和《C Primer Plus》。
资源：关于C++的一本完美的新手书籍是Steve Heller的《C++: A Dialog》。这是一本节奏适度且容易理解的书，非常适合编程新手。
还有更加全面的方法，即Bruce Eckel的《Thinking in C++》系列将通过1600页内容告诉你所有你需要知道的C++。
Objective-C是MAC OS X和ioS编程的主要语言，也是专属于苹果的语言。它支持各种开发技巧，功能，程序库以及许多能够凸显该语言的额外功能。该语言支持处理2D和3D图像（基于OpenGL）的广泛嵌入式程序库，这能够帮助许多小型游戏开发者通过使用强大且原生的解决方法创建自己的第一款游戏。其它程序库也能够帮助游戏开发，特别是手机游戏开发。还有一个突出的功能便是引用计数垃圾收集器，与非常复杂的内存管理系统相互协作。
缺点：Objective-C是专属于苹果的语言，因此你需要拥有一台苹果计算机，运行最新的Mac OS X版本才能开发你的应用。另外一件需要注意的事是该语言的有些语法规则可能会让新手感到困惑。方法调用远未达到标准，类定义也会引起没有C/C++经验的新手的困惑。此外，如果你计划面向iOS开发应用的话，你便需要掌握基于较高层次的内存管理知识。
可移植性：没有。任何基于Objective-C进行编写的内容都必须属于苹果的产品。如果未基于其它语言重新编写，你便不能移植Objective-C项目到任何平台上。也就是说Objective-C只适用于Mac OS X和iOS开发。
尽管从表面上看其结构与C和C++类似，但是Java的后端表现却与这两种语言不同。比起编译Java源代码到原生及其代码中，Java编译器将编译由Virtual Machine或VM所运行的“字节码”。Java字节码是一种汇编语言，但却不是与特定处理器有关系的汇编语言。Java VM是字节码的运行时解释器，将为你的机器目标处理器解释字节码。这一方法的优点在于，如果目标及其拥有可兼容的Java VM或Java所承诺的“编写一次就能够在任何地方运行”，你便可以在不同机器间移动Java字节码，并且可以无需做出任何改变而运行。这一方法的缺点在于Java字节码并不是原生机器代码，尽管像“及时”编译器能够完善VM性能，但实际上你是在运行时间做一些解释，这将引起较小但却可衡量的性能打击。
但是在服务器编程方面，Java便扬眉吐气了。VM的一大优势便是，它并非真正的处理器，只是一个模拟，所以销毁VM并不是多大的问题。如果你对于Java VM感到困惑，这并不会真正影响基本的操作系统，你大可以选择关闭并重新开始，并且不需要重启整个机器。再加上Java的内存管理模式是源自C++和C语言，所以像分配内存（无需将其带回之前的系统）这样的问题便不再是多大的问题了。像这样的系统非常适合服务器环境。服务器可以突然出现并在必要的时候消灭VM且不会对潜在OS造成任何影响。同样地，GUI问题也并不适用，如果你的服务器软件看起来并不壮观，它便一点都不重要，除非你想要给服务器管理员留下深刻印象。今天你将会发现许多商业大型多人游戏在服务器端使用了Java。Three Rings的多人游戏便是个很好的例子，他们不仅在客户端，同时也在服务器端使用了Java语言。
Java发挥重要作用的另一个领域便是手机市场。J2ME（Java 2，Micro Edition）是带有删节类程序库（游戏包注：专门为在手机和其它较小的设备上运行而设计的）的Java VM的微小版本。实际上，如果你包含了手机目标群体，Java可以说是现在最受欢迎的平台之一。
.NET Languages（特别是C#何Visual Basic）
.NET是微软对于Java VM的基本答案。实际上，.NET是以整体技术命名的。真正的VM名字是CLR（公共语言运行时），之前所谈论的关于Java VM的一切内容都适用于CLR，但也有一个例外：CLR从一开始便不是用来“匹配”单一语言，就是Java那样。因为这样，有许多语言使用了CLR去执行后端处理。不管是像COBOL和FORTRAN这样的早前语言还是像Python这样的现代语言都能够瞄准CLR。需要提醒你们的是，有些CLR项目是小型的单人项目，所以如果你在CLR版本中找到你最喜欢的语言也不要太过兴奋，因为在这里有些编译器还不够成熟。
简称VB.NET的Visual Basic是CLR执行以及对于微软已建立且受欢迎的Visual Basic环境的替换。尽管它仍被称为“Basic”，但却不再是全部大写，它与早前的BASIC解释器（贯穿于20世纪80年代所出售的所有计算机的ROM中）只带有少量的相似处。现在，它的语法与本列表中的其它语言非常相似，尽管它仍然未使用括号去整合某些内容。它同样也使用了更具对象导向型“点记法”去调用功能而不受语言的前CLR版本的更大的功能程序库。
不甘示弱的微软很快便基于微软的技术，也就是Windows，Internet Information Server（微软的网页服务器），CLR和SQL Server，组合了自己的PHP式的配置。尽管并不是免费的也不属于PHP联盟，ASP.NET却拥有所有技术支持费用能够买到的优势，且能够支持除PHP外的语言。如果你非常熟悉客户端的Visual Basic，你便能够基于ASP.NET在服务器端使用它。
Ruby on Rails （通常简称为Rails）本身并不是一种编程语言，但却是伴随着Ruby编程语言的一个类程序库架构。尽管Ruby本身是一种不具有重大改革性的对象导向型脚本语言，同时集成了Python和Perl，但是其Rails程序库却创造了系统改革。Rails程序库完全整合了MVC（Model View Controller）范式并致力于防止技术的重复。这让你能够基于较小的代码创造一个相对丰富的服务器系统。Rails使用者将能够自豪地炫耀基于少量代码所编写的网页论坛和社交网站。
与PHP一样，Ruby on Rails也是免费的。
What Language Do I Use?
By John Hattan
Like operating systems, software office suites, and computers themselves, there exist a large variety of computer languages. And the reason for such variety is the same as the reason for variety anywhere else — because there is not a single solution that solves all problems. Some languages are better at raw speed. Some languages make it easier to write crash-resistant code. Some languages are very good at parsing strings of text and work effectively on a server. Some languages have very large corporate investment. And some languages still exist because they are compatible with large amounts of existing code that is impractical to rewrite.
Your choice of language will affect the rest of your project, and it’s impossible to change languages in the middle of a project without a complete (or at least very extensive) rewrite, so it is not a choice you should make lightly. It is also not a choice that you should allow to be colored by your own personal preferences or the urging of friends. Your choice of computer language for your project should be well-researched and pragmatic. What counts most is the quality of your results and not that the language be worthy of your programming skills.
This article will cover some of the languages that are popular with game programmers. This list is neither complete nor deep. This article is intended to give you a bird’s eye view of the most popular game development languages out there along with a short overview and a few situations where they would be a good or a poor choice for a project.
One final note before you read the list. This list does include plenty of terminology that might not be familiar to you as a beginner, and there simply isn’t enough space to define everything. It is recommended that you keep Wikipedia handy for the terminology with which you are not yet familiar.
The C Programming Language is either the direct parent or a heavy influence to every other language discussed in this article. While it was itself derived from a couple of other languages that have fallen into disuse, C is now considered to be one of the “root” languages of computer science. Some other languages that predate C (COBOL, FORTRAN, Lisp, Smalltalk) are still in use today and owe nothing to C, but just about every language that’s been produced since the 1980′s owes at least some of its syntax to C.
C is a classic “brace language”, which is to say that it’s a structured goto-less language that uses the open and closed curly-braces to group statements together. It’s a structure that’s repeated in many of the languages that follow (C++, Java, C#, ActionScript, PHP). One advantage of the endlessly-imitated structure of C, braces and otherwise, is that once you understand how things are done in C, you can carry them over to the other languages with almost no changes. The if(), while(), and for() statements in C and PHP, for example, are basically identical. For that very fact alone, it is recommend that you familiarize yourself with C syntax, as it is something that you can keep with you.
Advantages: C is good for writing small fast programs. It is easy to interface with assembly language. The language itself as well as the library routines are standardized, so moving programs to other platforms can be a straightforward process if you plan ahead.
Disadvantages: The ability to write small programs quickly also works against C, as C is not normally used for object oriented programming[note], which is a method of structuring your code that’s better suited to large programs with distributed development, and large C programs can grow disorganized easily. While many very large projects have been written in C (Unix, Windows, Oracle), managing a large C-based project requires more discipline than in languages that are built around more modularity.
Portability: While the core of the language itself and the ISO function calls are very portable, these calls are limited to control flow, simple memory management and simple file handling. Modern user-interface constructs, like menus, buttons, dialog boxes, etc., are not portable between platforms, so you will need to either write your code to work with a third-party UI toolkit or plan to write your user-interface twice.
While the language was ahead of its time when it was created, the C library is showing its age. Many non-trivial library functions, like memory management and strings, have a simplistic syntax that has been significantly tuned up in the language’s successors.
While C has been redesigned and re-standardized several times to keep up with the times, some of the syntax is counterintuitive by necessity. Some of the quirkier language constructs remain for the sake of compatibility with existing code.
Suitability for Beginners: Not very good. While the core of C is fairly compact and easy to grasp, many of C’s library calls are antiquated and are easier handled in some of its successor languages.
Resources: While Kernighan and Ritchie’s The C Programming Language is the “classic” book on the subject, the book does cover topics fairly quickly, and it might be too quick for a rank beginner at programming. Other well-recommended books include C How to Program, C Programming: A Modern Approach, and C Primer Plus
C++ is C’s most established “child” language. It was designed in the 1980′s as an extended version of C with support for “classes”[note], which are abstract data structures that aggregate primitive data types and algorithms into something that is better able to model real-world (or in the case of games, simulated-world) objects. C++ classes also support the concept of “data hiding” in which you can hide the underlying implementation of an object from the rest of your program. While this method seems a bit inscrutable, it is extremely useful when programming in a team environment. It allows you to agree on how the object’s interface is intended to work without regard as to how the object works internally. It’s a bit like saying “I’m giving you a job, and I don’t care how you do it as long as it gets done, and the result looks the way I want”.
Advantages: Supports the object-oriented (OO) paradigm very completely, which is much better than C for supporting large projects. Unlike C, it contains a very well-designed library of common data structures and algorithms.
Disadvantages: The syntax of C++ has grown larger and more complicated with each iteration, and the language is absolutely byzantine now. The syntax lends itself very easily to abuse and, while the language does support team programming very well, its huge and deep syntax can make code difficult to read.
Portability: Despite its roots in C, C++ has better portability than C[note]. This is because most modern portability toolkits are implemented as C++ object libraries rather than the old-style C function libraries. In addition, C++’s standard library and very useful Boost library is very standardized and cross-platform despite the complexity of both.
Suitability for Beginners: While the memory management and I/O operations in C++ are significantly easier to understand than C, C++ has a pretty high learning curve just from its sheer size. Thankfully, one doesn’t have to learn the entire language to be productive with it.
Resources: A perfect beginner’s book for C++ is C++: A Dialog by Steve Heller. It’s very well-paced and approachable, and it’s perfect for beginning programmers.
For a more comprehensive approach, Bruce Eckel’s monumental two-volume Thinking in C++ series will tell you all you need to know about C++ in only 1,600 pages.
As an added bonus, these books are available for free download. Google for them, and you should have no trouble finding the official sites.
C or C++: Short of “DirectX or OpenGL”, this is one of the most-asked questions when getting ready to learn the language. C++ is, with a couple of very minor exceptions, a proper superset of C. That means that all that C does, C++ does the same. Every C++ compiler will also compile C, and C-only compilers are very hard to find nowadays. While those facts might make it seem logical to start with C and then learn the “rest” of the language later, it is a better idea to learn classes and OO programming early on rather than having to “unlearn” techniques that don’t model the environment (real or simulated) very well.
Objective-C is an object orientated, strongly typed programming language with a dynamic runtime. In it’s nature, it is a superset of C. It inherits the majority of it’s basic syntax rules from C, while having some more major changes to the structure as well. That for instance would include method calls, overall definition rules and so on.
Objective-C is the primary language for MAC OS X and iOS programming and is an Apple exclusive. It supports a wide variety of development techniques, functionalities, libraries and many other bonus features that make this language stand out (for more information, see reference). The language supports a really wide range of built-in libraries for handling 2D and 3D graphics (OpenGL based) which can help a junior game developer in building his/her first game bu using a powerful, yet native solutions. Other libraries help game development as well, especially for mobile. Another standout feature is the reference counting garbage collector, working in a close collaboration with the very sophisticated memory management system (see reference).
Advantages: Objective-C is a powerful superset of C and can produce and run very powerful and flexible applications. It can utilize C/C++ code and through that it is easy to port new projects and extend the power of already existing such. The language possesses a really wide variety of helpful libraries and one of the best development environments in the face of Xcode. This is a powerful OOP language that can be used in many ways.
Disadvantages: Objective-C is an Apple exclusive, thus you need an Apple computer, running the latest version of Mac OS X in order to develop your applications. Another thing to note is that some of the syntax rules of the language can end up being confusing for the beginner to intermediate programmer. The method calls are far from the standard, the class definitions are also going to cause some confusion for beginners that have no experience in C/C++. Something else to note – knowledge of memory management on a higher level is absolutely required if you plan to develop apps for iOS.
Portability: There is none. What ever is written in Objective-C stays within the Apple products. You cannot port an Objective-C project to another platform without completely re-writing it in another language. The bottom line here is – Objective-C is only suitable for Mac OS X and iOS development.
Suitability for Beginners: Objective-C is not the most beginner friendly language, though it’s not the hardest one as well. You’ll have an easier time learning C# or Java, yet getting proficient in Objective-C is relatively easier then C++. A beginner will most certainly need to put in a lot of reading into concepts such as memory management, so on and so forth and that can be a painful process to go by if you are just starting out, however it will pay out in the long run.
Resources: Aside from the official Apple guides, there are a lot of free e-books on onlineprogrammingbooks.com – http://www.onlineprogrammingbooks.com/objective-c/
Objective-C memory management:
Objective-C for game development:
Objective-C compared to Java:
Objective-C compared to C++:
General iOS development compared to Android development:
Java is, for practical purposes, the first “post web” language. While some languages like Perl suddenly found their string-handling capabilities to be a natural for retrieving values and sending display-able HTML to web browsers, Java initially found its footing in the browser itself, first in the very interesting but monumentally quirky HotJava browser (written in Java itself), and later in the form of extensions for existing browsers.
Java, while on its face structured similarly to C and C++, behaves very differently on the “back end”. The Java compiler, rather than compiling Java source code to native machine-code, compiles to “bytecode” that is run by a Virtual Machine or VM. The Java bytecode is an assembly language of sorts, but it is not an assembly language that is married to a particular processor. The Java VM, which is actually a runtime interpreter of bytecode, will then interpret the bytecode for your machine’s target processor. The advantage of this approach is that Java bytecode can be moved from machine to machine and executed without changes provided that the target machine has a compatible Java VM or, as Java promised, “write once, run everywhere”. The disadvantage of this approach is that Java bytecode is not native machine code, and while technologies such as “just in time” compilers can improve VM performance, the fact is that you’re doing some level of interpretation at runtime, and that does entail a minor, but measurable performance hit.
The other disadvantage is that realities of Java have not lived up to the language’s early promises. While the idea of executing games inside web-pages captured everyone’s hearts almost immediately, the reality quickly set in that Java VM’s aren’t as compatible with each other as they should be, and a Java application or applet written on one machine using a particular VM may or may not run nicely on another machine with another VM version. “Write once, run everywhere” was snarkily renamed “write once, port everywhere”, which is to say that once you finished writing your Java code and it’s running beautifully on one platform, you then had the non-trivial task of making sure the application will actually run well and look nice on all systems.
The third disadvantage of Java came with its GUI. While the first “pass” at making a Java GUI used native OS controls (buttons, scroll bars, etc) and was reasonably small and fast, it wasn’t very deep. The next pass, Swing, looked better but performed worse and was entirely different from the original controls. And, worst of all, Sun (Java’s parent) was slow to add OS features that had been in existence in the underlying OS for years, like support for ClearType font rendering. Hence, Java applications always seemed to look a few versions away from state-of-the-art.
There is one place, though, where Java took a good hold and Java’s advantages outweighed its disadvantages, and that was in server programming. One big advantage of a VM is that since it’s not an actual processor but just a simulation of one, crashing the VM isn’t much of an issue. If you do manage to completely confuse the Java VM, that doesn’t really affect the parent operating system, and you can close and restart a session without having to reboot the entire machine. Couple that with the fact that Java’s memory management scheme is a generation evolved from that in C++ and C, and suddenly problems like allocating memory without releasing it back to the system became much less of a problem. And a system like this is perfect for a server environment. A server can pop up and kill VM’s as necessary without affecting the underlying OS. Also, the GUI problems don’t really apply, as it doesn’t matter if your server software doesn’t look spectacular unless you just want to impress server-admins. Today you’ll find many commercial Massively Multiplayer games that use Java on the server side. A good example would be the multiplayer games by Three Rings that are fully Java on the client as well as the server-side.
Another place where Java has very strongly caught on is in the mobile phone market. J2ME[note] (Java 2, Micro Edition) is a “miniature” version of the Java VM with a significantly truncated class library which is designed to run on mobile phones and other small devices. In fact, if you include the mobile phone demographic, Java is one of the most popular platforms in existence.
Advantages: Java’s Virtual Machine coupled with its memory management and automatic collection of no-longer-needed memory allows you to make software that is very robust and crash-resistant. It also has a strong tradition of extensive documentation[note].
Disadvantages: Java’s “write once, run everywhere” promise wasn’t fulfilled. The Java class libraries have been rewritten multiple times without removing old calls, so while the libraries are very backward-compatible with old code, there seems to be three ways of doing everything, all but one of which are discouraged as being “obsolete”.
Portability: Fairly good, but not as good as it should have been. Making an application in Java that is portable and uses the underlying OS’s latest features is almost as difficult to do in Java as in C++.
Suitability for Beginners: Reasonably good. While figuring out the “right” way to do things without bumping into a deprecated object is a bit of a pain for beginners wading through the language, the core of the language itself is well-designed and easy to understand. Also Java is a standard language for many university courses.
Resources: Oracle Inc., the Java authority, has plenty of great resources for Java programmers.
.NET Languages (specifically C# and Visual Basic)
.NET (pronounced “dot net”) is basically Microsoft’s answer to the Java VM. Actually, .NET is the name for the overarching technology. The actual VM’s name is CLR (common language runtime), and everything that was said earlier about the Java VM also applies to the CLR with one significant exception: the CLR was designed from the ground up to not be “married” to a single language, as Java was. And because of this, there are a whole host of languages that use the CLR to do the back-end processing. Everything from ancient legacy languages like COBOL and FORTRAN to modern languages like Python can target the CLR. Mind you, some of the CLR projects out there are little one-man projects, so don’t get too excited if you find your favorite language in a CLR version, as some of the compilers are far from mature.
C# and Visual Basic, both developed by Microsoft, are the most popular CLR-based languages. C# is a language clearly derived from Java, and it shares about 90% of Java’s syntax despite sounding more like something derived from C or C++. C# does have several nice language extensions that Java has been slow to add as well as a completely rewritten class library.
Visual Basic, which was briefly renamed VB.NET, is a CLR implementation and replacement for Microsoft’s established and popular Visual Basic environment. While it is still called “Basic” and is no longer in all-caps, it bears very little resemblance to the old BASIC interpreters that were burned into the ROM of just about every computer sold in the 1980′s. The syntax is now structured similarly to the other languages in this list, although it still doesn’t use braces to group statements. It also uses the more object-oriented “dot notation” to call functions rather than the large function library of the pre-CLR versions of the language.
Advantages: While Java does have a couple of minor efforts to compile languages to the Java VM, the CLR is designed from the ground-up to support this. Hence, there are several CLR-based languages, and it’s relatively easy to get them to communicate with each other.
The .NET technologies are very well-supported by Microsoft’s Visual Studio environment, which is a very mature and feature-rich development environment.
C# is the premier programming language for Microsoft’s XNA technology, which is a method of making games that are portable between Windows and the XBox 360 game console.
Disadvantages: Unlike Java, CLR applications can’t run as applets within web pages. While the “Silverlight” technology does allow this, it’s fairly late to the game and is not entrenched in browsers the way that Java and Flash are. Silverlight has also been discontinued after release 5.
CLR-based applications are much less portable than they should be.
Portability: While there are third-party efforts to port the CLR to operating systems other than Windows, the efforts in that direction are significantly smaller than the work being done in Windows. So while you might be able to create a very robust .NET application for Windows, your Mac and Linux efforts won’t be nearly as smooth.
Suitability for Beginners: Good on both counts (C# and Visual Basic). Both languages are straightforward and easy to understand. In addition, their tight integration with the Visual Studio environment makes setup fairly easy.
Flash and ActionScript
Flash is a bit of an unusual member of this list, as its roots do not exist with the language itself but with an animation tool. In the 1990′s, a couple of developers were dismayed at the size required to display animated graphics on web pages and the method by which they were displayed, so they developed a browser plug-in called “FutureSplash” as well as a drawing and animation tool that could create very compact vector-based animations. Macromedia, already a player in the interactive web-business with their Shockwave plug-in that could play content from their Director animation tool, purchased FutureSplash, renamed it “Flash”, and proceeded to take the browser animation market by storm.
A few years ago, Adobe introduced a tool called “Flex” which was an attempt to “grow up” Flash into something more suitable for building browser-based user interfaces and RIA (Rich Internet Application) content rather than just animations and games. While not a replacement for Flash, Flex is better suited for building user interfaces, as it is an XML-based programming language with rich UI support rather than an animation tool with a built-in programming language.
Advantages: Flash’s integrated drawing and programming tools make programming web-based games absurdly easy. The Flash environment, while not having the pedigree of Visual Studio, is extremely feature-rich.
Disadvantages: Flash, while a great environment for one person, does not support team programming very well.
While the Flex compiler is free, the very nice FlexBuilder Flex content-creation tool is not.
Unlike the other languages on this list, ActionScript is a client-only technology. While some kind of server-side ActionScript interpreter might prevent you from having to learn a separate server language, such a thing does not exist.
Portability: Flash runtime players are available on Windows, Mac, Linux, several breeds of mobile phone, and some game consoles. Not all devices support the same version of Flash, though, so you will need to learn the capabilities of each version and what you want to target before you get started.
Suitability for Beginners: Excellent, especially with its aggregation of drawing and animation tools. Although such ease of building in the Flash environment will not apply to other languages. A technique or build tool used in C++, for example, will likely have an equivalent in Java and vice-versa. The Flash development environment is unlike all others.
Resources: Just like Microsoft is one-stop-shopping for all of your .NET needs, Adobe is the place to go for Flash.
Python, unlike the previously-mentioned languages, did not start out as a large corporate or university project. It was much more of a grassroots effort among university students and, later, among people in the industry who liked the language’s structure as well as its lack of legacy features. The language itself is fairly compact and is easy to use. It is also easy to embed a Python language interpreter into existing projects, which is why you’ll see Python as an embedded scripting language in many games.
Python also functions well as a server language as it features many of the server-friendly attributes of Java. In fact, Python compilers exist that can compile Python code to both the Java VM and Microsoft’s CLR. Many services that you would recognize (YouTube, Google, and Yahoo) use Python extensively for back-end processing.
Python is also becoming quite popular in the gaming community with the user-supported PyGame library. PyGame is an object library that abstracts the well-established SDL cross-platform graphics library into something friendly and easy-to-use from Python. Several impressive arcade games have been written entirely in Python.
Advantages: Free and open-source. Very dedicated user community. Integrated fully into Google AppEngine, which is Google’s “pay to play” processing server.
Disadvantages: Virtually everything is handled not by a large corporation but by its user-community, so it might be a hard-sell to get a company to sign off on a Python-based project, although some very big players are now invested heavily in Python so Python now looks like much less of a “hobby language” than it used to be.
Portability: Pretty good. Most of the third-party libraries made for Python are built around portable technologies like SDL and OpenGL, so it’s not too difficult to write something in Python that will run on several platforms.
Suitability for Beginners: The Python language has an easy-to-follow syntax and is easy to learn. In addition, there are several good community-written tutorials out there.
Resources: Python.org is a well-organized home for all things Python. It is also the home of many active community forums where you can get your questions answered.
There are two things that you must know about assembly language.
The name of the language is “assembly”. The name of the tool that converts assembly language into low-level machine code is called an “assembler”. It’s a common mistake, even among experienced programmers, to call the language “assembler”. So please start out on the right foot by calling the language by its proper name.
Assembly language is, by default, the smallest and fastest language in this article. Since it is not a high-level language but is actually a mnemonic representation of your CPU’s instruction set, there is nothing written in a higher level language that can’t be done faster in assembly
And given fact number two above, you might think your search is over. After all, if a language is necessarily the smallest and fastest of the bunch, why not use it? In fact, why do other people bother with C or C++ or anything else when you can write your code in assembly and get the best results by definition?
That’s because the term “best code” doesn’t just refer to the raw speed and size of your program. There is the quality of readability, as you might need to hand some of your code over to a colleague so he can work on it. There is the quality of portability, as you might need to move your code to another operating system or hardware architecture. There is the quality of maintainability, which is the need to easily fix problems at the close of the project. There is the quality of abstraction, in which you can write code in terms of moving a character down a hallway rather than manipulating numbers in locations in memory.
And in all of those factors, assembly language comes in dead last. Assembly language is very difficult to read and maintain. Unless meticulously commented, it is of little use to anyone else inheriting the code. Fixing bugs and extending the existing code is difficult at best. You have to keep a constant eye on portability, lest you end up writing code that won’t even run on different processor models by the same manufacturer. And the closest you’ll get to “move the alien ten pixels to the left” are some register updates followed by several instructions to call the bitmap-display function.
In practice, assembly is almost never used for complete games. Assembly, when it is used, is used in parts of programs that do a lot of calculations and are called a lot of times. Sometimes whittling a few machine-instructions out of a function that is called millions of times can provide enough of a benefit to make the extra work worthwhile. But this is a process that isn’t undertaken from the beginning of a project. It is something done in early testing, after determining where the programming bottlenecks actually are.
Assembly language is not for the faint of heart, and if you’re reading an article to try to figure out what language to use, then you should probably look elsewhere.
Advantages: Is the fastest and most compact way to go if you know what you are doing.
Disadvantages: If you are reading this, you probably don’t know what you are doing. Prepare to spend a long time learning a million little tricks to shave off processor ticks here and there.
Portability: Worse than bad. Unless you are programming for the baseline processor, your programs might not even run on other “compatible” processors. For example, some special instructions on AMD processors are not available on Intel and vice versa.
Suitability for Beginners: Run away.
Resources: Assembly Language for Intel-Based Computers is well-recommended if you intend to write for Intel processors. If not Intel, check out the makers of your target CPU for technical resources.
While many of the languages mentioned above will work nicely on the server, some of the technologies around which they were built are rather archaic, and much smoother easier-to-use solutions are now available. The original standard for writing a custom back-end for web-pages was called CGI, and it was a simple standard for running a customized executable on the server-side, passing it data from the page that called it, and collecting text output and returning it to the user. And while it was simple to implement on the server-side, it really doesn’t model the interactive experience as the web is used today, and CGI-based solutions for interactive web-applications can be clunky at best.
PHP was one of the first true “embedded” scripting languages for the web, and in many ways it revolutionized the way that pages are scripted. While PHP can operate as a scripting language that takes input from a web form, processes it, and returns output, its real strength is its usage as a hypertext preprocessor. PHP, once configured to work as a preprocessor for a server, can process code that’s embedded the page itself. So rather than writing a piece of standalone code that will, for example, print out the current date in a page, you can just embed the PHP code directly into your web page that prints the date, and the code will be quietly replaced with the resulting text as it is sent to a browser. PHP also added a library of native commands to communicate with the free and powerful MySQL database, making storing and retrieving persistent data easy.
Another thing that made PHP instantly popular was the price. It was free, thus cementing it in the popular server configuration known as LAMP (Linux, Apache, MySQL, and PHP). The combination of these four technologies gave beginning or low-budget web designers an easy-to-use, scalable, and very powerful web setup for free. And as a bonus, it could run on low-cost hardware. And this fact was not lost on web developers. Today there are a large number of free or low price PHP scripts to perform just about any task, from simple user databases to complete “website in a box” setups.
Not to be outdone, Microsoft quickly put together their own PHP-esque configuration based entirely on Microsoft’s technologies, namely Windows, Internet Information Server (Microsoft’s web server), CLR, and SQL Server. While far from free and not in PHP’s league in the breadth of third-party scripts available, ASP.NET does have the advantage of all the tech support money can buy as well as support for languages other than PHP. If you’re familiar with Visual Basic on the client side, for example, you can use it on the server-side with ASP.NET.
But if you’re working within a budget, a LAMP setup will likely be a better fit.
Ruby on Rails
Ruby on Rails (often just called “Rails”) is not itself a programming language but is a class library built with the Ruby programming language. While Ruby itself is a not-very-revolutionary object-oriented scripting language that owes its heritage to both Python and Perl, it is the Rails library that makes the system revolutionary. The Rails library fully integrates the MVC (Model View Controller) paradigm and is designed to prevent as little repetition of technique as possible. And this does allow you to build a fairly rich server-based system with a minimum of code. And the Rails folks will proudly show off web-forums and social networking sites that have been written in an absurdly small amount of code.
Like PHP, Ruby on Rails is free.
Other Languages That Are Worth Mention
The sections above cover most of the languages that have a pedigree in the game development world, both on the client and server. That is to say that large scale or popular games have been written using these languages. There are, however, a couple of interesting technologies out there that, while not yet established as first-class languages for games, show lots of promise. It would not be surprising to see these languages score some major projects in the future.
D is a sort of “unofficial” grandchild of C, C++, and Java. It is the brainchild of Walter Bright, who is one of the pioneers of C and C++ compiler construction on PCs. Growing frustrated with the ever-growing class libraries as well as the fanatical need for backward compatibility, Mr. Bright decided to build something from the ground-up that took the best features of C, C++, and Java while jettisoning anything that didn’t have a very good reason for existing. And the result was a language that was tighter and easier to learn than its “parents” without sacrificing important features or runtime speed. D is what happens when you take language design away from the realms of the committee.
While D does jettison backward compatibility in the name of simplicity, it does have excellent methods for communicating with C code, so if you have a third-party library or some C source code that you are loath to rewrite, you can still talk to it without much difficulty.
That is to say that D would be the best of all worlds if it gained more support. It simply doesn’t yet have the huge libraries of code, wealth of tools, and base of user support of the other languages. Hopefully its support will grow and it will receive the attention it deserves, but that will take some time.
Early on it was clear that this article would not reach a satisfactory conclusion as to what language to use. Fact is, there’s very rarely a single solution that will solve all problems. Hopefully this list will at least whittle your choices down to two or three good candidates. The rest of the research is up to you.
Thankfully, virtually every solution mentioned above has a free implementation, so you can try out these languages and choose the one that you think will best suit your project.(source:gamedev)