Software Engineering; Programming Language
Game programming is a type of software engineering used to develop computer and video games. Depending on the type of game under development, programmers may be required to specialize in areas of software development not normally required for computer programmers. These specialties include artificial intelligence, physics, audio, graphics, input, database management, and network management.
While many video games are developed as homebrew projects by individuals working in their spare time, most major games are developed by employees of large companies that specialize in video games. In such a company, the process of creating a video game begins with a basic idea of the game's design. If enough people in the company feel the idea has merit, the company will create a prototype to develop the concept further. The prototype gives form to the game's basic story line, graphics, and programming. It helps developers decide whether the game is likely to do well in the marketplace and what resources are needed for its development.
Games that move past the prototyping stage proceed along many of the same pathways as traditional software development. However, video games differ from most other software applications in that elements of the game must continue to run in the absence of user input. Programmers must therefore create a game loop, which continues to run the program's graphics, artificial intelligence, and audio when the user is not active.
Game programmers often use object-oriented programming (OOP). This is an approach to software development that defines the essential objects of a program and how they can interact with each other. Each object shares attributes and behaviors with other objects in the same class. Because many video games run hundreds of thousands of lines of code, an object-oriented approach to game development can help make the code more manageable. OOP makes programs easier to modify, maintain, and extend. This approach can make it easier to plan out and repurpose elements of the game.
Game programmers use the same basic tools as most software developers. These tools include text editors, debuggers, and compilers. The tools used are often determined by the type of device the game is intended to run on. Games can be developed for a particular computer platform, such as Windows, Apple, or Linux. They can also be developed for a gaming console, such as the Wii, Xbox, or PlayStation. Finally, games may be developed for mobile platforms such as Apple's iOS or Google's Android operating system.
A wide variety of programming languages are used to create video games. Some of the most commonly used programming languages in game development are C++, C#, and Java. Many video games are programmed with a combination of several different languages. Assembly code or C may be used to write lower-level modules. The graphics of many games are programmed using a shading language such as Cg or HLSL.
Game developers often use application programming interfaces (APIs) such as OpenGL and DirectX. They also rely heavily on the use of libraries and APIs to repurpose frequently used functions. Many of these resources are associated with animation, graphics, and the manipulation of 3-D elements. One driving force in game development has been the use of increasingly sophisticated visual elements. The video game industry has come to rival motion pictures in their use of complex plotlines, dazzling special effects, and fully developed characters.
Game programmers regularly report high levels of stress as they are pressured to produce increasingly impressive games every year. There is intense competition to produce better special effects, more exciting stories, and more realistic action with each new title. Some game companies have been criticized for the high demands and heavy workloads placed upon game developers.
—Scott Zimmer, JD
Harbour, Jonathan S. Beginning Game Programming. 4th ed. Boston: Cengage, 2015. Print.
Kim, Chang-Hun, et al. Real-Time Visual Effects for Game Programming. Singapore: Springer, 2015. Print.
Madhav, Sanjay. Game Programming Algorithms and Techniques: A Platform-Agnostic Approach. Upper Saddle River: Addison, 2014. Print.
Marchant, Ben. “Game Programming in C and C++.” Cprogramming.com. Cprogramming.com, 2011. Web. 16 Mar. 2016.
Nystrom, Robert. Game Programming Patterns. N.p.: Author, 2009–14. Web. 16 Mar. 2016.
Yamamoto, Jazon. The Black Art of Multiplatform Game Programming. Boston: Cengage, 2015. Print.