In which languages are high-profile games like Half-Life 2, Crysis, Quake 4 and Red Alert 3 and so on written in?
This includes game design tools, scripting tools, and so on.
In which languages are high-profile games like Half-Life 2, Crysis, Quake 4 and Red Alert 3 and so on written in?
This includes game design tools, scripting tools, and so on.
C and C++. LUA is a common script language used in games as well (check here for a list of games using it).
I would guess C/C++ and assembly language for the main game engine and some kind of scripting language for customization, testing and modding like lua, javascript or some custom scripting language.
Pretty much exclusively C++ with a smattering of assembly.
Some will include a 'hand-rolled' scripting engine to make life simpler. This is usually interpreted (or byte-code interpreted).
LUA (www.lua.org) is a commonly used scipting engine.
C++ primarily though with heavy use of various APIs and libraries.
One of the (unfortunate) reasons is that most games are developed for multiple platforms including game consoles, and these game consoles do not support any runtime environments (JVMs, .NET, etc.). So one is left programming "on the metal". This is the case for Sony consoles, and I think that also for XBOXs and Nintendo's.
I work for a major game publisher and all of the answers given of C/C++ and LUA are in fact what are used for a majority of games (not just ours). I have yet to see any assembly used for any of the games I've been involved with.
The container for the game to interact with the various underlying platforms (PC, Wii, XBOX, PS2/3) are all based in C/C++ as well.
Half-Life2 is entirely in C++, in fact they release an SDK for mod development which I think includes about half the game's source code. They even develop their own chain of tools (at least for mapping).
Although I haven't been following the HL2 Mod scene for over a year so I can't say anymore.
I know for a fact that the Football Manager series is written exclusively in C++, with Java being the choice for the installer. I'd assume that, as everyone else has mentioned, all other games are written in C/C++ with a touch of Assembly Language.
Note: I've heard rumours that Rollercoaster Tycoon was written entirely in Assembly Language. Anyone want to weigh in on this?
C/C++ has 95% of the PC market, on mobile devices J2ME is pretty strong. For games scripting LUA and Python are pretty popular.
Disney is doing some games with their free engine Panda3D, it's Python or C++. Perhaps worth a try if you don't know C++. Panda3D
If you would like to start working on games then I would recommend [Game Institute][2]. These are in depth courses "from zero to hero". You can start with entry level C++ and then progress with DirectX, Physics, AI etc. I'm doing DirectX there, it's really good.
[2]: http://www.gameinstitute.com/"Game Institute"
Generally C++ is used for the core of the gaming engine, that is, the graphics, physics and audio pipeline. Assembly is hardly ever used because most modern compiler support the x86 SSE intrinsics (or equivalent for the chosen platform) to access the vector pipeline of the CPU. These intrinsics look like generic function calls but translate nearly 1:1 to the actual SIMD instructions. (This isn't specific to SSE btw, AltiVec's system is rougly identical). Most of the game-play coding happens in scripting languages such as Lua or python because these generally aren't the performance bottlenecks and thus have different requirements (ease of use primarily) the use of scripting languages also removes an entire class of issues: memory allocation bugs.
However, there is another class of programs in a game. The shader programs. These do a couple of different things; they are (most of the time) responsible for the skinning / bones animations, lighting, texturing and other materials. Writing shader programs is generally the same as SSE programming as you are working on a vector processing unit (that means it supports instruction level parallelism). Generally these are written in Cg (Cross platform), HLSL (DirectX) or GLSL (OpenGL). However, due to GPU limitations (instruction limitations, limiting the number of texture fetches or registers et cetera) these are often rewritten in assembly for performance reasons.
C++ is where it's at now, but there is a gradual trend towards high level languages for game logic and dropping into native code only for computationally intensive functionality like graphics, networking, physics.
Regarding assembly in game programming - the big studios generally license an engine from someone else, which encapsulates away all the low level stuff like graphics. Engine writers undoubtedly do use languages lower level than C++ - graphics shaders and console platforms with unique hardware come to mind. Often this stuff is done in a C-like language.
If you look in the ads section of an games 'industry' magazine such as Edge, you'll see lots of ads for engines and middleware. Games developers either use these layers, or they roll their own - an example might be Valve's 'Source' engine.
These layers are typically written in C or Assembler. They provide a compatibility layer to reduce development time for cross-platform games. Just like GTK lets you forget whether you're coding for Windows or Linux, these libraries let you forget whether you're coding for Xbox, PC or PS3. Having said that, there's lots you can't take for granted (differing memory constraints, controller maps, corporate standards...)
They also provide lots of the performance critical stuff that modern games rely on - physics simulation, fast and realistic rendering, all that jazz.
Once you've got that stuff down, you want to tell the engine what to do. Approaches to doing this vary. I know Jeff Minter's 'Space Giraffe' reads level definition files in a 'language' that looks like line noise to anyone but the developers.
But many, many, modern games adopt the approach of building a script interpreter into the engine. This is because people are productive in scripting languages, and publishers like productivity! Python is a fairly common choice because it has always been embeddable in applications (Civilization 4 uses Python). LUA is popular for similar reasons - lightweight and embeddable.
So the approach is, in your C/C++ code, you create a bunch of functions/classes that can be called to set up and run a game. Then you use the scripting language's embedding tools to bind theses functions/classes into entities that can be invoked from scripts.
I guess I should mention this because it surprised me when I first heard it, but the PS2 games in the Jak & Daxter series were coded in Common Lisp.
C/C++ for high profile games most certainly.
However I'm guessing the subtext of this is 'what language should I learn to code to get into the games industry', which is a subtly different question.
If you're really interested in getting the 'high-profile' games development (and I'd caution against it as received wisdom is that this is a very high turnover, burnout liable, relatively low paid field prone to recurrent death marches) then you've got to be a C/C++ wizard with a high level of mathematical skill. However if you're willing to settle for something a little less glamorous then consider development for mobile phones, handhelds and the like. Although the competition is still fierce the teams are smaller and it's still feasible to develop something profitable with just one or two people (realistically a coder and a graphics designer). Your choice of language is also much wider - Java on many mobile platforms, Objective C on the iphone, and even any of the .net languages if you're going for windows mobile.