Game programming

Game programming is the branch of programming related to creating video games. Game programming is considered a very difficult task because—unlike database or event-driven programming—the software must run in real-time.

Education
There are many game programmers with little formal education in the subject, having started out as hobbyists and doing a great deal of programming on their own, for fun, and eventually succeeding because of their aptitude and homegrown experience. However, most job solicitations for game programmers specify a bachelor's degree (in mathematics, physics, computer science, "or equivalent experience").

Increasingly, universities are starting to offer courses and degrees in game programming. Any such degrees should offer a well-rounded education that includes all the fundamentals of software engineering.

Programming languages
The most common programming language used in commercial game development is C++, due to its object-orientated design, speed, and flexibility. However, for functions where speed is crucial, Assembly language is often used.

The C programming language was once also used in commercial game development, and remains a popular programming language among hobbyists and indie video game developers.

Another popular language among indie developers is the Java programming language. However, early versions of Java suffered from slower execution speed and higher memory usage, which made it unsuitable for commercial games.

Disciplines
For detailed information check Game programmer

The programmers, who usually work in teams, are divided according their area of expertise: gameplay, graphics, audio, physics, network, artificial intelligence, and tools/middleware programmers are just some examples.

Game engine programmer
Game engine programmers create the base engine of the game, including the simulated physics and graphics disciplines.

Artificial intelligence programmer
An AI programmer develops the logic of the game to simulate intelligence in enemies and opponents. It has recently evolved into a specialized discipline, as these tasks used to be implemented by programmers who specialized in other areas. An AI programmer may program pathfinding, strategy and enemy tactic systems. This is one of the most challenging aspects of game programming and its sophistication is developing rapidly.

Sound programmer
Sound programming has been a mainstay of game programming since the days of Pong. Most games make use of audio, and many have a full musical score. Many games use advanced techniques such as 3D positional sound, making audio programming a non-trivial matter. With these games, one or two programmers may dedicate all their time to building and refining the game's sound engine, and sound programmers may be trained or have a formal background in digital signal processing.

Scripting tools are often created and/or maintained by sound programmers for use by sound designers. These tools allow designers to associate sounds with characters, actions, objects and events while also assigning music or atmospheric sounds for game environments (levels or areas) and setting environmental variables such as reverberation.

Gameplay programmer
A gameplay programmer focuses on a game's strategy, implementation of the game's mechanics and logic, and the "feel" of a game. This programmer may implement strategy tables, tweak input code, or adjust other factors that alter the game. Many of these aspects may be altered by programmers who specialize in these areas, however (for example, strategy tables may be implemented by AI programmers).

Scripter
In early computer games, gameplay programmers would write code to create all the content in the game—if the player was supposed to shoot a particular enemy, and a red key was supposed to appear along with some text on the screen, then this functionality was all written as part of the core program in C or assembly language by a gameplay programmer. More often today the core game engine is usually separated from gameplay programming. This has several development advantages. The game engine deals with graphics rendering, sound, physics and so on while a scripting language deals with things like cinematic events, enemy behavior and game objectives. Large game projects can have a team of scripters to implement these sorts of game content.

Scripters usually are also game designers. It is often easier to find a qualified game designer who can be taught a script language as opposed to finding a qualified game designer who has mastered C++.

UI programmer
This programmer specializes in programming [[wikipedia:user interfaces|] (UIs) for games. Though some games have custom user interfaces, this programmer is more likely to develop a [[wikipedia:library (software)|library] that can be used across multiple projects. Most UIs look 2D, though contemporary UIs usually use the same 3D technology as the rest of the game so some knowledge of 3D math and systems is helpful for this role. Advanced UI systems may allow scripting and special effects, such as transparency, animation or particle effects for the controls.

Input programmer
Input programming, while usually not a job title, or even a full-time position on a particular game project, is still an important task. This programmer writes the code specifying how input devices such as a keyboard, mouse or joystick affect the game. These routines are typically developed early in production and are continually tweaked during development. Normally, one programmer does not need to dedicate his entire time to developing these systems.

Network programmer
This programmer writes code that allows players to compete or cooperate together, connected via a LAN or the Internet (or in rarer cases, directly connected via modem). Programmers implementing these game features can spend all their time in this one role, which is often considered one of the most technically challenging. Network latency, packet compression, and dropped or interrupted connections are just a few of the concerns one must consider.

Game tools programmer
The tools programmer can make game development heaven or unbearably difficult. Tools are used on almost every game for tasks such as scripting, importing or converting art, modifying behaviors or building levels. Some tools, such as an IDE, 3D graphics modelling software and Photoshop are COTS products, but many tools are specific to the game and are custom programmed. It is the tools programmer's job to write the tools that handle these game-specific tasks. Some tools will be included with the game, but most will not. Most tools evolve with the game and can easily consume all of several programmers' time. Well written and fairly bug-free tools make everyone's development tasks easier. Poorly written or poorly documented ones can seriously hamper development and jeopardize the project. Due to time constraints, however, many tools are not carefully implemented.

Porting programmer
Porting a game from one platform to another has always been an important activity for game developers. Some programmers specialize in this activity, converting code from one operating system to work on another. Sometimes, the programmer is responsible for making the application work not for just one operating system, but on a variety of devices, such as mobile phones.