Languages suitable for writing games with
From DmWiki
If you are looking through this to find a first language, the vastness of the information is likely to be bewildering. Try not to worry too much about the language, since over the years you will learn a large number of languages. Instead find something for which you can easily get a compiler or books, and of which you like the look and feel.
| Name | Object-Oriented? | Advantages | Disadvantages |
|---|---|---|---|
| C | No. See C++ | A small, elegant language. Still used in games worldwide, has great support for most game-related APIs. Can be written very efficiently. | Most game developers are now moving to C++, for its organisational benefits. C at times is too simplistic for large projects. C leaves a lot of manual work to the developer (e.g. memory allocation, array bounds checking), and this is often a source of bugs |
| C++ | Yes. | One of the most popular languages for game development. Has excellent support for just about everything. | Can be hard to learn at the start and suffers from most of the same problems as C - a lower level language has lower level bugs, with memory allocation and bounds checking.
|
| C++.NET | Yes. | Allows C++ code to make use of the .NET Framework and libraries and engines targeting it while providing access to all of the native C++ libraries. Allows the writing of managed code (for simplicity and preventing many of the problems of native C++) yet native (unmanaged) code can be used as needed for performance optimizations and the like. | Carries with it many of the complexities of C++ and can be hard to learn for starting out with as opposed to working with other .NET Languages such as C#. Managed code is slightly slower (though not noticeably so for most games. Example: QuakeII [1] (http://channel9.msdn.com/ShowPost.aspx?PostID=20543#20543)) and the use of unmanaged code also provides the same disadvantages as with native C++.
|
| C# (C-Sharp) | Yes. | A very clean, modern and well thought out language designed for rapid, high productivity development. It has a growing developer-base and a strong Microsoft backing and takes the best of both worlds from C++ and Java. Once compiled, a program will run on any platform with Mono (http://www.go-mono.com) or the .NET Framework installed on it (portability similiar to Java) and can work seamlessly with any of the numerously .NET Languages available (VB.NET, C#, JScript.NET, Boo, etc). | Game development with C# is relatively new and the usage of C++.NET (for access to existing object-oriented C++ libraries) only works with Windows at the moment, however there have been commercial products developed using Managed DirectX and there are several strong 3D engines and toolsets available for it. Also, Mono currently does not support XNA, and while a Mono.XNA (http://code.google.com/p/monoxna/) project has been started, it does not currently have any released versions and is likely lacking full feature support; therefore, XNA games most likely will not run on Linux and other Mono-supported platforms at this time.
|
| VisualBasic.NET (VB.NET) | Yes. | Based on Microsoft's Visual Basic (VB), Visual Basic .NET (VB.NET) is a computer language that can be viewed as an evolutionary development from VB version 6.0 and earlier. The changes in the computer language are targeted to use Microsoft's .NET Framework and to bridge the gap between it and other .NET languages such as C#. Visual Basic .NET is, in general, syntactically similar to Visual Basic, but includes object-oriented features and an object hierarchy based on the .NET framework that makes
| |
| Visual Basic | Yes, but very limited. | Visual Basic (VB) is an event driven programming language and associated development environment created by Microsoft. It is derived heavily from BASIC. VB enables Rapid Application Development (RAD) of graphical user interface (GUI) applications, easy access to databases using DAO, RDO, or ADO, and easy creation of ActiveX controls. A programmer can quickly put together an application using the components provided with Visual Basic itself.
| |
| BlitzBasic (BlitzMax, Blitz3D, BlitzPlus) | No.(Except for BlitzMax, which has OOP.) | Blitz BASIC is a programming language (BASIC dialect) for the Amiga computer, originally made by Acid Software from New Zealand. More recently, a Blitz BASIC compiler has been developed for the PC, coming in four forms - Blitz Basic 2D, BlitzPlus ,Blitz3D, and BlitzMax. BlitzMax is Object Oriented and a 3D module for BlitzMax is due to arrive soon.
| |
| Python | Yes. | A greatly loved scripting language, has a great following and a good set of game-related libraries. There is also IronPython (http://www.ironpython.com), an implementation for .NET that is much faster and allows access to the .NET Framework and libraries written in other .NET Languages. | For a complete game, Python may lack some speed, however it serves as a great scripting language for games written using other languages.
|
| Boo | Yes. | Boo (http://boo.codehaus.org) is a .NET language that is strongly typed with much of its syntax inspired by Python and Ruby. It offers the speed of C# with the flexability that more dynamic languages like Python provide. Type inference, the ability to switch between procedural and object-oriented code, and the general 'what you code is what you get' nature of Boo make it an eye-catcher on both Windows and Linux. | As an up-and-coming language, Boo is still behind the curve on stability and many bugs still exist within the compiler infastructure itself. Like most projects growing up, its not very well documentated, either. If you use Boo, be prepared to make a few trips to the forums or IRC to report bugs or get help dealing with its syntax. |
| JScript.NET (JavaScript) | Yes. | Not as powerful as the other .NET languages and is more geared towards scripting then application development. | |
| Java | Yes. | A language liked by academics because of it's aim at structural perfection. Once compiled, the program will run on any computer with a Java runtime installed. Commercial - such as Chrome - can be developed with it. | Not as well supported by game libraries, but this seems to be getting better, however the J# language or use of Mono (http://www.go-mono.com) will allow it to be used with the .NET Framework the game engines and tools available to it. |
| sdlBasic | No. | This is simple and free version of Basic intended for beginners to write 2d games using the SDL API. It uses an experimental code exporter to convert source code to C++ to be compiled. Source code runs on all ports of the interpreter regardless of the platform it was developed on. | It is less powerful than Python when used in conjunction with the PyGame (http://www.pygame.org) bindings and less flexible. Although the code converter allows compiling under C++ the conversion is still fairly primative and leaves the programmer to have to look through a large linker library of source code to understand what goes on inside. |
| Object Pascal | Yes. | This is Pascal's newer counterpart. Made popular by Borland's Delphi development studio. It is object oriented, and has more compiler support from various companies including a couple with support for usage with the .NET Framework. (Delphi 2005 and Chrome) | Object Pascal is still not incredibly popular, and gaming libraries tend to target it less than say C or C++, but it still widly used. |
| Pascal | No. See Object Pascal | A quite simple language, which is well known amongst many older programmers | Small, if any game programmer following. Mainly seen as a dead language |
| ActionScript 1.0/2.0 (part of Flash) | Yes. | Has great built-in support for all game fundamentals. Compiled programs can run in any browser, at any size. Has a colorful and creative developer base | Does not have enough speed for FPS style games, however is perfect for action/adventure/puzzle type games. |
| Director | Yes. | Has built in hardware accelerated 3d support. | Large plugin, not available for some platforms. Language is quite untidy. |
[edit]
Resources
For computer setups to try a language, see Development setups
