Possible Duplicates:
Languages used for high profile games
What is the best language for game programming?
What programming language is used for video games?
I'm confused which language to choose
Possible Duplicates:
Languages used for high profile games
What is the best language for game programming?
What programming language is used for video games?
I'm confused which language to choose
C++ is the most predominant language for games.
Personally I feel that .NET languages offer much more productivity when starting from scratch (i.e. you don't have tons of existing libraries). There is no real performance issue (despite heated debates about this) because you will probably use an existing game engine that's already highly optimized for the time critical pieces.
C++ is used in many games, although C# is now being used by Microsoft & by XNA to program games.
From Wikipedia:
Once the game's initial design has been agreed upon, the development language must be decided upon. The choice depends upon many factors, such as language familiarity of the programming staff, target platforms (such as PlayStation or Microsoft Windows), the execution speed requirements and the language of any game engines, APIs or libraries being used.
Today, because it is object oriented and compiles to binary (the native language of the target platform), the most popular game development language is C++[citation needed]. However, Java and C are also popular. Assembly language is necessary for some video game console programming and in some routines that need to be as fast as possible, or require very little overhead. Fringe languages such as C#, Ada and Python have had very little impact upon the industry and are primarily used by hobbyists familiar with the languages, though C# is popular for developing game development tools. That may change soon, XNA being strictly for C#.
High-level scripting languages are increasingly being used as embedded extensions to the underlying game written in a low or mid-level programming language such as C++. Many developers have created custom languages for their games, such as id Software's QuakeC and Epic Games' UnrealScript. Others have chosen existing ones like Lua or Python in order to avoid the difficulties of creating a language from scratch and teaching other programmers a proprietary language.
Depends of which game.
Usually, two are used - one low level like C++ for 3D graphic engines and one highlevel like JavaScript, Python or Lua for scripting AI.
For learning purposes, try Allegro .
If you want to create a web-based game, then it's Flash or a full stack of web technologies like HTML, CSS, JavaScript and Ajax, SQL, Java...
Update:
Lua was used in Unreal Tournament, Half-Life, Neverwinter Nights, Quake III, Unreal II, FishFillets and more.
Almost all major games are programmed using C++, at least the engine and internals of the game. However, they use a variety of different scripting languages. Some are custom for the game or company, but often Python or Lua are used.
Choosing a language depends on your skill level with any language. You should go with a language you are most familiar with.
That being said, C++ is probably the most commonly used game programming language.
There are several good answers:
Some people chose to use other languages for games (older ones may use Visual Basic, Pascal, etc), but those are the building blocks of most modern games. Most modern languages provide the capabilities needed to write a game, but the bigger, multi-platform titles generally use some combination of the above.
This is not say that you can't create a game in whatever language you choose, from Perl to Python or Ruby, to Javascript or Objective C or even Fortran (the most unlikely candidate I can think of). All of the major languages include the parts you need.