Game programming, a subset of
game development
Video game development (or gamedev) is the software development, process of developing a video game. The effort is undertaken by a video game developer, developer, ranging from a single person to an international team dispersed across the globe. ...
, is the
software development
Software development is the process of conceiving, specifying, designing, programming, documenting, testing, and bug fixing involved in creating and maintaining applications, frameworks, or other software components. Software development invol ...
of
video games
Video games, also known as computer games, are electronic games that involves interaction with a user interface or input device such as a joystick, game controller, controller, computer keyboard, keyboard, or motion sensing device to gener ...
. Game programming requires substantial skill in
software engineering
Software engineering is a systematic engineering approach to software development.
A software engineer is a person who applies the principles of software engineering to design, develop, maintain, test, and evaluate computer software. The term '' ...
and
computer programming
Computer programming is the process of performing a particular computation (or more generally, accomplishing a specific computing result), usually by designing and building an executable computer program. Programming involves tasks such as ana ...
in a given
language
Language is a structured system of communication. The structure of a language is its grammar and the free components are its vocabulary. Languages are the primary means by which humans communicate, and may be conveyed through a variety of met ...
, as well as specialization in one or more of the following areas:
simulation
A simulation is the imitation of the operation of a real-world process or system over time. Simulations require the use of Conceptual model, models; the model represents the key characteristics or behaviors of the selected system or proc ...
,
computer graphics
Computer graphics deals with generating images with the aid of computers. Today, computer graphics is a core technology in digital photography, film, video games, cell phone and computer displays, and many specialized applications. A great de ...
,
artificial intelligence
Artificial intelligence (AI) is intelligence—perceiving, synthesizing, and inferring information—demonstrated by machines, as opposed to intelligence displayed by animals and humans. Example tasks in which this is done include speech re ...
,
physics
Physics is the natural science that studies matter, its fundamental constituents, its motion and behavior through space and time, and the related entities of energy and force. "Physical science is that department of knowledge which r ...
,
audio programming, and
input. For
multiplayer
A multiplayer video game is a video game in which more than one person can play in the same game environment at the same time, either locally on the same computing system (couch co-op), on different computing systems via a local area network, or ...
games, knowledge of
network programming is required (the resultant code, in addition to its performance characteristics, is commonly referred to as the game's
netcode
Netcode is a blanket term most commonly used by gamers relating to networking in online games, often referring to synchronization issues between clients and servers. Players often infer "bad netcodes" when they experience lag or when their inputs ...
by players and programmers alike). In some genres, e.g.
fighting games
A fighting game, also known as a versus fighting game, is a genre of video game that involves combat between two or more players. Fighting game combat often features mechanics such as blocking, grappling, counter-attacking, and chaining attac ...
, advanced network programming is often demanded, as the netcode and its properties (e.g.
latency) are considered by players and critics to be some of the most important metrics of the game's quality. For
massively multiplayer online game
A massively multiplayer online game (MMOG or more commonly MMO) is an online video game with a large number of players, often hundreds or thousands, on the same server. MMOs usually feature a huge, persistent world, persistent open world, alt ...
s (MMOGs), even further knowledge of
database programming and advanced networking programming are required. Though often engaged in by professional
game programmer
A game programmer is a software engineer, programmer, or computer scientist who primarily develops codebases for video game
Video games, also known as computer games, are electronic games that involves interaction with a user interface ...
s, there is a thriving scene of
independent
Independent or Independents may refer to:
Arts, entertainment, and media Artist groups
* Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s
* Independ ...
developers who lack a relationship with a publishing company.
Development process
Professional game development usually begins with a
game design
Game design is the art of applying design and aesthetics to create a game for entertainment or for educational, exercise, or experimental purposes. Increasingly, elements and principles of game design are also applied to other interactions, in ...
, which itself has several possible origins. Occasionally the game development process starts with no clear design in mind, but as a series of experiments. For example,
game designer
Game design is the art of applying design and aesthetics to create a game for entertainment or for educational, exercise, or experimental purposes. Increasingly, elements and principles of game design are also applied to other interactions, in ...
Will Wright began development of ''
The Sims
''The Sims'' is a series of life simulation video games developed by Maxis and published by Electronic Arts. The franchise has sold nearly 200 million copies worldwide, and it is one of the best-selling video game series of all time.
The games ...
'' by getting programmers to experiment with several ideas.
Prototyping
Programmers are often required to produce
prototypes
A prototype is an early sample, model, or release of a product built to test a concept or process. It is a term used in a variety of contexts, including semantics, design, electronics, and software programming. A prototype is generally used to ...
of gameplay ideas and features. A great deal of prototyping may take place during pre-production, before the design document is complete, and may help determine what features the design specifies.
Prototype
A prototype is an early sample, model, or release of a product built to test a concept or process. It is a term used in a variety of contexts, including semantics, design, electronics, and Software prototyping, software programming. A prototyp ...
s are developed quickly with very little time for up-front design and mostly act as a
proof of concept
Proof of concept (POC or PoC), also known as proof of principle, is a realization of a certain method or idea in order to demonstrate its feasibility, or a demonstration in principle with the aim of verifying that some concept or theory has prac ...
or to test ideas. They are not expected to work flawlessly, but are developed to try out new, sometimes exotic, ideas.
Game design
Though the programmer's main job is not to develop the game design, the programmers often contribute to the design, as do
game artists
A game is a structured form of play, usually undertaken for entertainment or fun, and sometimes used as an educational tool. Many games are also considered to be work (such as professional players of spectator sports or games) or art (suc ...
. The game designer will solicit input from both the
producer and the art and
programming lead for ideas and strategies for the game design. Often individuals in non-lead positions also contribute, such as
copywriter
Copywriting is the act or occupation of writing text for the purpose of advertising or other forms of marketing. The product, called copy or sales copy, is written content that aims to increase brand awareness and ultimately persuade a person or ...
s and other programmers and artists.
Programmers often closely follow the
game design document
A game design document (often abbreviated GDD) is a highly descriptive living software design document of the design for a video game. Oxland 2004, p. 240 Brathwaite, Schreiber 2009, p. 14 A GDD is created and edited by the development team and ...
. As the game development progresses, the design document changes as programming limitations and new capabilities are discovered and exploited.
Production
During production, programmers may create a great deal of
source code
In computing, source code, or simply code, is any collection of code, with or without comments, written using a human-readable programming language, usually as plain text. The source code of a program is specially designed to facilitate the wo ...
to create the game described in the game's design document. Along the way, the design document is modified to meet limitations or expanded to exploit new features. The design document is very much a "living document", much of whose life is dictated by programmer's schedules, talent and resourcefulness.
While many programmers have some say in a game's content, most
game producer
A video game producer is the top person in charge of overseeing development of a video game.
History
The earliest documented use of the term ''producer'' in games was by Trip Hawkins, who established the position when he founded Electronic Arts ...
s solicit input from the
lead programmer
In software development, a lead programmer is responsible for providing technical guidance and mentorship to a team of software developers. Alternative titles include ''development lead'', ''technical lead'', ''lead programmer'', or ''lead applicat ...
as to the status of a game programming development. The lead is responsible for knowing the status of all facets of the game's programming and for pointing out limitations. The lead programmer may also pass on suggestions from the programmers as to possible features they'd like to implement.
With today's visually rich content, the programmer must often interact with the
art staff. This very much depends on the programmer's role, of course. For example, a
3D graphics programmer may need to work side by side with the game's 3D modelers discussing strategies and design considerations, while an
AI programmer may need to interact very little, if at all, with the art staff. To help artists and level designers with their tasks, programmers may volunteer or be called upon to develop
tools and utilities. Many of these may be for a specific purpose and can be
buggy due to time constraints (time for development of such tools is often not included in a game's schedule) as well as because they are only for in-house use anyway. Many game tools are developed in
RAD
RAD or Rad may refer to:
People
* Robert Anthony Rad Dougall (born 1951), South African former racing driver
* Rad Hourani, Canadian fashion designer and artist
* Nickname of Leonardus Rad Kortenhorst (1886–1963), Dutch politician
* Radley R ...
languages for quicker development and may be discarded after the completion of the game.
Testing
The formal
quality assurance
Quality assurance (QA) is the term used in both manufacturing and service industries to describe the systematic efforts taken to ensure that the product(s) delivered to customer(s) meet with the contractual and other agreed upon performance, design ...
testing process, performed by professional
game tester
Game testing, a subset of game development, is a software testing process for quality control of video games. Moore, Novak 2010, p. 95 Oxland 2004, p. 301-302 The primary function of game testing is the discovery and documentation of software d ...
s, begins well into game development. High-budget titles may begin testing with the first playable
alpha
Alpha (uppercase , lowercase ; grc, ἄλφα, ''álpha'', or ell, άλφα, álfa) is the first letter of the Greek alphabet. In the system of Greek numerals, it has a value of one. Alpha is derived from the Phoenician letter aleph , whic ...
, while low-budget and casual games might not enter testing until a
release candidate
A software release life cycle is the sum of the stages of development and maturity for a piece of computer software ranging from its initial development to its eventual release, and including updated versions of the released version to help impro ...
is ready. The programmers' task is to fix errors and bugs as such are discovered by the QA teams.
Nearing completion
Final tasks include "polishing" the game, such as programmers fixing occasional bugs—from minor to catastrophic—that may arise during the last phases of
testing
An examination (exam or evaluation) or test is an educational assessment intended to measure a test-taker's knowledge, skill, aptitude, physical fitness, or classification in many other topics (e.g., beliefs). A test may be administered verba ...
.
Game developers may have a
beta test
A software release life cycle is the sum of the stages of development and maturity for a piece of computer software ranging from its initial development to its eventual release, and including updated versions of the released version to help impro ...
ing period, but the definition of such varies from developer to developer. Often a beta contains all of the game's features, but may have a few bugs or incomplete content. Few games are given a public beta period, for example, to measure stress tolerance for game
server
Server may refer to:
Computing
*Server (computing), a computer program or a device that provides functionality for other programs or devices, called clients
Role
* Waiting staff, those who work at a restaurant or a bar attending customers and su ...
s.
When the game is deemed complete, it is said to have "
gone gold" and is shipped off to the publisher. Depending on circumstances, the publisher may then subject it to its own quality assurance or may begin pressing the game from the
gold master.
Maintenance
Once a game ships, the maintenance phase for the video game begins. Programmers wait for a period to get as many bug reports as possible. Once the developer thinks they've obtained enough feedback, the programmers start working on a
patch
Patch or Patches may refer to:
Arts, entertainment and media
* Patch Johnson, a fictional character from ''Days of Our Lives''
* Patch (''My Little Pony''), a toy
* "Patches" (Dickey Lee song), 1962
* "Patches" (Chairmen of the Board song) ...
. The patch may take weeks or months to develop, but it's intended to fix most bugs and problems with the game. Occasionally a patch may include extra features or content or may even alter gameplay.
Duration
Most modern games take from one to three years to complete. The length of development depends on a number of factors, but programming is required throughout all phases of development except the very early stages of game design.
Tools
Like other software, game development programs are generated from
source code
In computing, source code, or simply code, is any collection of code, with or without comments, written using a human-readable programming language, usually as plain text. The source code of a program is specially designed to facilitate the wo ...
to the actual program (called the ''executable'') by a
compiler
In computing, a compiler is a computer program that translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primarily used for programs that ...
. Source code can be developed with almost any
text editor
A text editor is a type of computer program that edits plain text. Such programs are sometimes known as "notepad" software (e.g. Windows Notepad). Text editors are provided with operating systems and software development packages, and can be us ...
, but many professional game programmers use a full
integrated development environment
An integrated development environment (IDE) is a software application that provides comprehensive facilities to computer programmers for software development. An IDE normally consists of at least a source code editor, build automation tools a ...
. Once again, which IDE one uses depends on the target platform.
In addition to IDEs, many game development companies create
custom tools developed to be used in-house. Some of these include prototypes and asset conversion tools (programs that change artwork, for example, into the game's custom format). Some custom tools may even be delivered with the game, such as a
level editor
In Video game, video games, a level (also referred to as a map, stage, or round in some older games) is any space available to the player during the course of completion of an objective. Video game levels generally have progressively-increasing ...
.
Game development companies are often very willing to spend thousands of dollars to make sure their programmers are well equipped with the best
tools
A tool is an object that can extend an individual's ability to modify features of the surrounding environment or help them accomplish a particular task. Although many animals use simple tools, only human beings, whose use of stone tools dates ba ...
. A well outfitted programmer may have two to three development systems and multiple monitors dominating their office or cubicle.
Programming languages
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, the execution speed requirements and the language of any
game engine
A game engine is a software framework primarily designed for the development of video games and generally includes relevant libraries and support programs. The "engine" terminology is similar to the term "software engine" used in the software i ...
s,
APIs or
libraries
A library is a collection of materials, books or media that are accessible for use and not just for display purposes. A library provides physical (hard copies) or digital access (soft copies) materials, and may be a physical location or a vir ...
being used.
For
personal computer
A personal computer (PC) is a multi-purpose microcomputer whose size, capabilities, and price make it feasible for individual use. Personal computers are intended to be operated directly by an end user, rather than by a computer expert or tec ...
s, the language selected may be little more than a matter of preference.
Language binding
In programming and software design, binding is an application programming interface (API) that provides glue code specifically made to allow a programming language to use a foreign library or operating system service (one that is not native to th ...
s for popular libraries such as
SDL and
Allegro
Allegro may refer to:
Common meanings
* Allegro (music), a tempo marking indicate to play fast, quickly and bright
* Allegro (ballet), brisk and lively movement
Artistic works
* L'Allegro (1645), a poem by John Milton
* ''Allegro'' (Satie), an ...
are widespread, and the performance gap between idiomatic code written in modern
compiled
In computing, a compiler is a computer program that translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primarily used for programs that ...
languages is negligible. The most popular languages are usually
procedural or
object-oriented
Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which can contain data and code. The data is in the form of fields (often known as attributes or ''properties''), and the code is in the form of pro ...
and implemented via
compiler
In computing, a compiler is a computer program that translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primarily used for programs that ...
s; for example,
C,
C++
C++ (pronounced "C plus plus") is a high-level general-purpose programming language created by Danish computer scientist Bjarne Stroustrup as an extension of the C programming language, or "C with Classes". The language has expanded significan ...
,
and
Java
Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's List ...
. However, developers may take into account
domain
Domain may refer to:
Mathematics
*Domain of a function, the set of input values for which the (total) function is defined
**Domain of definition of a partial function
**Natural domain of a partial function
**Domain of holomorphy of a function
* Do ...
-specific features, such as interfacing with the operating system, and resilience to
reverse engineering
Reverse engineering (also known as backwards engineering or back engineering) is a process or method through which one attempts to understand through deductive reasoning how a previously made device, process, system, or piece of software accompli ...
for online video games. Many games are not written in one language exclusively, and may combine two or more languages; For example,
Unity
Unity may refer to:
Buildings
* Unity Building, Oregon, Illinois, US; a historic building
* Unity Building (Chicago), Illinois, US; a skyscraper
* Unity Buildings, Liverpool, UK; two buildings in England
* Unity Chapel, Wyoming, Wisconsin, US; a h ...
, a popular game engine, has different pieces written in C, C++, and
C#.
For
consoles, the support of the target platform is usually the most considered factor. In the past, video games for consoles were written almost exclusively in
assembly
Assembly may refer to:
Organisations and meetings
* Deliberative assembly, a gathering of members who use parliamentary procedure for making decisions
* General assembly, an official meeting of the members of an organization or of their representa ...
due to limited resources in terms of both storage and processing speed. However, as technology has advanced, so have the options for game development on consoles.
Nintendo
is a Japanese Multinational corporation, multinational video game company headquartered in Kyoto, Japan. It develops video games and video game consoles.
Nintendo was founded in 1889 as by craftsman Fusajiro Yamauchi and originally produce ...
,
Microsoft
Microsoft Corporation is an American multinational technology corporation producing computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washing ...
, and
Sony
, commonly stylized as SONY, is a Japanese multinational conglomerate corporation headquartered in Minato, Tokyo, Japan. As a major technology company, it operates as one of the world's largest manufacturers of consumer and professional ...
all have differing
SDKs for their
Wii U
The Wii U ( ) is a home video game console developed by Nintendo as the successor to the Wii. Released in late 2012, it is the first eighth-generation video game console and competed with Microsoft's Xbox One and Sony's PlayStation 4.
The W ...
,
Nintendo Switch
The is a hybrid video game console developed by Nintendo and released worldwide in most regions on March 3, 2017. The console itself is a Tablet computer#Gaming tablet, tablet that can either be docking station, docked for use as a home video ...
,
Xbox One
The Xbox One is a home video game console developed by Microsoft. Announced in May 2013, it is the successor to Xbox 360 and the third base console in the Xbox series of video game consoles. It was first released in North America, parts of ...
, and
PlayStation 4
The PlayStation 4 (PS4) is a home video game console developed by Sony Interactive Entertainment. Announced as the successor to the PlayStation 3 in February 2013, it was launched on November 15, 2013, in North America, November 29, 2013 in ...
consoles, respectively.
High-level
High-level and low-level, as technical terms, are used to classify, describe and point to specific goals of a systematic operation; and are applied in a wide range of contexts, such as, for instance, in domains as widely varied as computer scienc ...
scripting language
A scripting language or script language is a programming language that is used to manipulate, customize, and automate the facilities of an existing system. Scripting languages are usually interpreted at runtime rather than compiled.
A scripting ...
s are increasingly being used as embedded extensions to the underlying game written in a compiled programming language, for the convenience of both the original developer and anyone who would wish to
mod
Mod, MOD or mods may refer to:
Places
* Modesto City–County Airport, Stanislaus County, California, US
Arts, entertainment, and media Music
* Mods (band), a Norwegian rock band
* M.O.D. (Method of Destruction), a band from New York City, US ...
the game.
Lua
Lua or LUA may refer to:
Science and technology
* Lua (programming language)
* Latvia University of Agriculture
* Last universal ancestor, in evolution
Ethnicity and language
* Lua people, of Laos
* Lawa people, of Thailand sometimes referred t ...
is a very popular choice, as its API is written in
ANSI C
ANSI C, ISO C, and Standard C are successive standards for the C programming language published by the American National Standards Institute (ANSI) and ISO/IEC JTC 1/SC 22/WG 14 of the International Organization for Standardization (ISO) and the ...
and the language is designed to be embedded into other applications.
Many developers have created custom languages altogether for their games, such as
id Software
id Software LLC () is an American video game developer based in Richardson, Texas. It was founded on February 1, 1991, by four members of the computer company Softdisk: programmers John Carmack and John Romero, game designer Tom Hall, and ar ...
's
QuakeC
QuakeC is a compiled language developed in 1996 by John Carmack of id Software to program parts of the video game '' Quake''. Using QuakeC, a programmer is able to customize ''Quake'' to great extents by adding weapons, changing game logic and ph ...
and
Epic Games
Epic Games, Inc. is an American video game and software developer and publisher based in Cary, North Carolina. The company was founded by Tim Sweeney as Potomac Computer Systems in 1991, originally located in his parents' house in Potomac, M ...
'
UnrealScript
Unreal Engine (UE) is a 3D computer graphics game engine developed by Epic Games, first showcased in the 1998 first-person shooter game ''Unreal (1998 video game), Unreal''. Initially developed for Personal computer, PC first-person shooters, i ...
.
APIs and libraries
A key decision in game programming is which, if any,
API
An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software Interface (computing), interface, offering a service to other pieces of software. A document or standa ...
s and
libraries
A library is a collection of materials, books or media that are accessible for use and not just for display purposes. A library provides physical (hard copies) or digital access (soft copies) materials, and may be a physical location or a vir ...
to use. Today, there are numerous libraries available which take care of key tasks of game programming. Some libraries can handle sound processing, input, and
graphics rendering
Rendering or image synthesis is the process of generating a photorealistic or non-photorealistic image from a 2D or 3D model by means of a computer program. The resulting image is referred to as the render. Multiple models can be defined ...
. Some can even handle some
AI tasks such as
pathfinding
Pathfinding or pathing is the plotting, by a computer application, of the shortest route between two points. It is a more practical variant on solving mazes. This field of research is based heavily on Dijkstra's algorithm for finding the sh ...
. There are even entire
game engine
A game engine is a software framework primarily designed for the development of video games and generally includes relevant libraries and support programs. The "engine" terminology is similar to the term "software engine" used in the software i ...
s that handle most of the tasks of game programming and only require coding game logic.
Which APIs and libraries one chooses depends largely on the target platform. For example, libraries for
PlayStation 2
The PlayStation 2 (PS2) is a home video game console developed and marketed by Sony Computer Entertainment. It was first released in Japan on 4 March 2000, in North America on 26 October 2000, in Europe on 24 November 2000, and in Australia on 3 ...
development may not be available for
Microsoft Windows
Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for serv ...
and vice versa. However, there are game frameworks available that allow or ease cross-platform development, so programmers can program a game in a single language and have the game run on several platforms, such as the
Wii
The Wii ( ) is a home video game console developed and marketed by Nintendo. It was released on November 19, 2006, in North America and in December 2006 for most other Regional lockout, regions of the world. It is Nintendo's fifth major ho ...
, PlayStation 3,
Xbox 360
The Xbox 360 is a home video game console developed by Microsoft. As the successor to the original Xbox, it is the second console in the Xbox series. It competed with Sony's PlayStation 3 and Nintendo's Wii as part of the seventh generation ...
,
PSP and Microsoft Windows.
Graphic APIs
Today, graphics are a key defining feature of most games. While
2D graphics
2D computer graphics is the computer-based generation of digital images—mostly from two-dimensional models (such as 2D geometric models, text, and digital images) and by techniques specific to them. It may refer to the branch of computer s ...
used to be the norm for games released through the mid-1990s, most
AAA games now boast full
3D graphics
3D computer graphics, or “3D graphics,” sometimes called CGI, 3D-CGI or three-dimensional computer graphics are graphics that use a three-dimensional representation of geometric data (often Cartesian) that is stored in the computer for the ...
, even for games which are largely 2D in nature, such as ''
Civilization III
''Sid Meier's Civilization III'' is the third installment of the ''Sid Meier's Civilization'' turn-based strategy video game series. It was released in 2001, and followed by ''Civilization IV''. Unlike the original game, ''Civilization III'' was n ...
''. However, purely 2D graphics have experienced a Renaissance with
indie game
An indie game, short for independent video game, is a video game typically created by individuals or smaller development teams without the financial and technical support of a large game publisher, in contrast to most "AAA" (triple-A) games. ...
s.
A well established
personal computer
A personal computer (PC) is a multi-purpose microcomputer whose size, capabilities, and price make it feasible for individual use. Personal computers are intended to be operated directly by an end user, rather than by a computer expert or tec ...
platform is Microsoft Windows. Since it came pre-installed on almost ninety percent of
PCs sold, it now has the largest user base. The two most popular 3D graphics APIs for Microsoft Windows are
Direct3D
Direct3D is a graphics application programming interface (API) for Microsoft Windows. Part of DirectX, Direct3D is used to render three-dimensional graphics in applications where performance is important, such as games. Direct3D uses hardware a ...
and
OpenGL
OpenGL (Open Graphics Library) is a cross-language, cross-platform application programming interface (API) for rendering 2D and 3D vector graphics. The API is typically used to interact with a graphics processing unit (GPU), to achieve hardwa ...
. The benefits and weaknesses of each API are hotly debated among Windows
game programmer
A game programmer is a software engineer, programmer, or computer scientist who primarily develops codebases for video game
Video games, also known as computer games, are electronic games that involves interaction with a user interface ...
s.
Currently, the most popular
Computing platform
A computing platform or digital platform is an environment in which a piece of software is executed. It may be the hardware or the operating system (OS), even a web browser and associated application programming interfaces, or other underlying s ...
is Google Android. Since it comes pre-installed on almost eighty percent of
Smartphones
A smartphone is a portable computer device that combines mobile telephone and computing functions into one unit. They are distinguished from feature phones by their stronger hardware capabilities and extensive mobile operating systems, which ...
sold, Android has the second largest user base, and increasing. Android uses
OpenGL ES
OpenGL for Embedded Systems (OpenGL ES or GLES) is a subset of the OpenGL computer graphics rendering application programming interface (API) for rendering 2D and 3D computer graphics such as those used by video games, typically hardware-accel ...
&
Vulkan (API)
Vulkan is a low-Overhead (computing), overhead, cross-platform API, open standard for 3D graphics and compute kernel, computing. Vulkan targets high-performance real-time 3D graphics applications, such as video games and interactive media. Vulka ...
.
DirectX is a collection of game APIs.
Direct3D
Direct3D is a graphics application programming interface (API) for Microsoft Windows. Part of DirectX, Direct3D is used to render three-dimensional graphics in applications where performance is important, such as games. Direct3D uses hardware a ...
is DirectX's 3D API. Direct3D is freely available from
Microsoft
Microsoft Corporation is an American multinational technology corporation producing computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washing ...
, as are the rest of the
DirectX APIs. Microsoft developed
DirectX
Microsoft DirectX is a collection of application programming interfaces (APIs) for handling tasks related to multimedia, especially game programming and video, on Microsoft platforms. Originally, the names of these APIs all began with "Direct", ...
for game programmers and continues to add features to the API. The DirectX specification is not controlled by an open arbitration committee and Microsoft is free to add, remove or change features. Direct3D is not portable; it is designed specifically for
Microsoft Windows
Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for serv ...
and no other platform (though a form of Direct3D is used on Microsoft's
Xbox
Xbox is a video gaming brand created and owned by Microsoft. The brand consists of five video game consoles, as well as applications (games), streaming services, an online service by the name of Xbox network, and the development arm by the na ...
, Windows Phone 7.5 smartphones and mobile devices which run the
Pocket PC
A Pocket PC (P/PC, PPC) is a class of personal digital assistant (PDA) that runs the Windows Mobile or Windows Embedded Compact operating system that has some of the abilities of modern desktop PCs. The name was introduced by Microsoft in 2000 ...
operating system).
OpenGL is a portable API specification. Code written with OpenGL is easily ported between platforms with a compatible implementation. For example, ''
Quake II
''Quake II'' is a 1997 first-person shooter video game developed by id Software and published by Activision. It is the second installment of the Quake (series), ''Quake'' series, but not a direct sequel to ''Quake (video game), Quake''. The game ...
'', which uses OpenGL, was ported from Windows to Linux by a fan of the game. OpenGL is a standard maintained by the OpenGL Architecture Review Board (ARB). The ARB meets periodically to update the standard by adding emerging support for features of the latest 3D hardware. Since it is standards based and has been around the longest, OpenGL is used by and taught in
college
A college (Latin: ''collegium'') is an educational institution or a constituent part of one. A college may be a degree-awarding tertiary educational institution, a part of a collegiate or federal university, an institution offering ...
s and
universities
A university () is an institution of higher (or tertiary) education and research which awards academic degrees in several academic disciplines. Universities typically offer both undergraduate and postgraduate programs. In the United States, t ...
around the world. In addition, the development tools provided by the manufacturers of some video game consoles (such as the Nintendo GameCube, the Nintendo DS, and the PSP) use graphic APIs that resemble OpenGL. OpenGL often lags behind on feature updates due to the lack of a permanent development team and the requirement that implementations begin development after the standard has been published. Programmers who choose to use it can access some hardware's latest 3D features, but only through non-standardized extensions. The situation may change in the future as the OpenGL architecture review board (ARB) has passed control of the specification to the
Khronos Group
The Khronos Group, Inc. is an open, non-profit, member-driven consortium of 170 organizations developing, publishing and maintaining royalty-free interoperability standards for 3D graphics, virtual reality, augmented reality, parallel computation ...
in an attempt to counter the problem.
Other APIs
For development on Microsoft Windows, the various APIs of DirectX may be used for input,
sound effects
A sound effect (or audio effect) is an artificially created or enhanced sound, or sound process used to emphasize artistic or other content of films, television shows, live performance, animation, video games, music, or other media. Traditi ...
, music,
networking and the playback of videos. Many commercial libraries are available to accomplish these tasks, but since DirectX is available for free, it is the most widely used.
For console programming, the
console manufacturer
A video game console is an electronic device that outputs a video signal or image to display a video game that can be played with a game controller. These may be home consoles, which are generally placed in a permanent location connected to a ...
s provide facilities for rendering graphics and the other tasks of game development. The console manufacturers also provide complete development systems, without which one cannot legally market nor develop games for their system. Third-party developers also sell toolkits or libraries that ease the development on one or more of these tasks or provide special benefits, such as cross-platform development capabilities.
Game structure
The central component of any game, from a programming standpoint, is the ''game loop''. The game loop allows the game to run smoothly regardless of a user's input or lack thereof.
Most traditional software programs respond to user input and do nothing without it. For example, a
word processor
A word processor (WP) is a device or computer program that provides for input, editing, formatting, and output of text, often with some additional features.
Word processor (electronic device), Early word processors were stand-alone devices ded ...
formats words and text as a user types. If the user doesn't type anything, the word processor does nothing. Some functions may take a long time to complete, but all are initiated by a user telling the program to do something.
Games, on the other hand, must continue to operate ''regardless'' of a user's input. The game loop allows this. A highly simplified game loop, in
pseudocode
In computer science, pseudocode is a plain language description of the steps in an algorithm or another system. Pseudocode often uses structural conventions of a normal programming language, but is intended for human reading rather than machine re ...
, might look something like this :
while (user does not exit)
check for user input
run AI
move enemies
resolve collisions
draw graphics
play sounds
end while
The loop may be refined and modified as game development progresses, but most games are based on this basic idea.
Game loops differ depending on the platform they are developed for. For example, games written for
DOS
DOS is shorthand for the MS-DOS and IBM PC DOS family of operating systems.
DOS may also refer to:
Computing
* Data over signalling (DoS), multiplexing data onto a signalling channel
* Denial-of-service attack (DoS), an attack on a communicat ...
and many consoles can dominate and exploit available processing resources without restraint. However, games for a modern PC operating system such as Microsoft Windows must operate within the constraints of the process scheduler. Some modern games run multiple
threads so that, for example, the computation of character AI can be
decoupled
'' Decoupled'' is an Indian English-language comedy web series for Netflix written by Manu Joseph and directed by Hardik Mehta. The series stars R. Madhavan and Surveen Chawla in the lead roles.
Plot
A misanthropic writer and his startup-foun ...
from the generation of smooth motion within the game. This has the disadvantage of (slightly) increased overhead, but the game may run more smoothly and efficiently on
hyper-threading
Hyper-threading (officially called Hyper-Threading Technology or HT Technology and abbreviated as HTT or HT) is Intel's proprietary simultaneous multithreading (SMT) implementation used to improve parallelization of computations (doing multip ...
or
multicore
A multi-core processor is a microprocessor on a single integrated circuit with two or more separate processing units, called cores, each of which reads and executes program instructions. The instructions are ordinary CPU instructions (such a ...
processors and on multiprocessor platforms. With the computer industry's focus on
CPUs with more cores that can execute more threads, this is becoming increasingly important. Consoles like the
Xbox 360
The Xbox 360 is a home video game console developed by Microsoft. As the successor to the original Xbox, it is the second console in the Xbox series. It competed with Sony's PlayStation 3 and Nintendo's Wii as part of the seventh generation ...
and
PlayStation 3
The PlayStation 3 (PS3) is a home video game console developed by Sony Interactive Entertainment, Sony Computer Entertainment. The successor to the PlayStation 2, it is part of the PlayStation brand of consoles. It was first released on Novemb ...
already have more than one core per processor, and execute more than one thread per core.
Hobbyists
The only platforms widely available for hobbyists to program are consumer
operating system
An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs.
Time-sharing operating systems schedule tasks for efficient use of the system and may also in ...
s, such as Android, iOS, Windows, Mac, Linux, etc. This is because development on game consoles requires special development systems that cost thousands of dollars. Often these must be obtained from the console manufacturer and are only sold or leased to professional game development studios. However, Microsoft used to distribute a game development framework,
XNA, which runs on both Microsoft Windows and Xbox 360. XNA was discontinued, but other projects like
MonoGame and
SharpDX are trying to allow the same access for game coding. Lately, Android is the most popular hobbyist platform of choice for mobile developers.
Some hobbyists also develop
homebrew games, especially for handheld systems or
modded consoles.
Some
software engineer
Software engineering is a systematic engineering approach to software development.
A software engineer is a person who applies the principles of software engineering to design, develop, maintain, test, and evaluate computer software. The term ''p ...
ing students program games as exercises for learning a
programming language
A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language.
The description of a programming ...
or
operating system
An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs.
Time-sharing operating systems schedule tasks for efficient use of the system and may also in ...
.
Some hobbyists may use software packages that help with game development, such as
Adobe Animate
Adobe Animate (formerly Adobe Flash Professional, Macromedia Flash, and FutureSplash Animator) is a multimedia authoring and computer animation program developed by Adobe Inc.
Animate is used to design vector graphics and animation for televi ...
,
Unity
Unity may refer to:
Buildings
* Unity Building, Oregon, Illinois, US; a historic building
* Unity Building (Chicago), Illinois, US; a skyscraper
* Unity Buildings, Liverpool, UK; two buildings in England
* Unity Chapel, Wyoming, Wisconsin, US; a h ...
,
Android Studio
Android Studio is the official integrated development environment (IDE) for Google's Android operating system, built on JetBrains' IntelliJ IDEA software and designed specifically for Android development. It is available for download on Windows ...
,
pygame
Pygame is a cross-platform set of Python modules designed for writing video games. It includes computer graphics and sound libraries designed to be used with the Python programming language.
History
Pygame was originally written by Pete Shinners ...
,
Adventure Game Studio
Adventure Game Studio (AGS) is an open source development tool primarily used to create graphic adventure games. It is aimed at intermediate-level game designers, and combines an integrated development environment (IDE) with a scripting language ...
,
GameMaker Studio
GameMaker (originally Animo, Game Maker ''(until 2011)'' and GameMaker Studio) is a series of cross-platform game engines created by Mark Overmars in 1999 and developed by YoYo Games since 2007. The latest iteration of ''GameMaker'' released ...
,
Godot,
Unreal Engine
Unreal Engine (UE) is a 3D computer graphics game engine developed by Epic Games, first showcased in the 1998 first-person shooter game ''Unreal''. Initially developed for PC first-person shooters, it has since been used in a variety of genres ...
,
Pixel Game Maker MV
Pixel Game Maker MV (released as "Action Game Tsukuru" (アクションゲームツクール) in Japan) is a 2D computer graphics, 2D action game production software published by Playism.
It allows for the creation of 2D games without the need fo ...
, or
Construct
Construct, Constructs or constructs may refer to:
* Construct (information technology), a collection of logic components forming an interactive agent or environment
** Language construct
* ''Construct'' (album), a 2013 album by Dark Tranquillity ...
.
See also
*
List of gaming topics
The following Outline (list), outline is provided as an overview of and topical guide to video games:
Video game – an electronic game that involves interaction with a user interface to generate visual feedback on a video, video device. The ...
References
External links
GameDev.net a leading resource for game development
International Game Developers Association (IGDA) a short 5 day short course offered by MIT with guidance from the mentors of the award-winning MIT Game Lab.
One ex-game programmer's experience in the game development industry
Wikis
2D Game Development wikiGame Development Wiki -GDwiki
{{Authority control
Video game development