Game programming
   HOME

TheInfoList



OR:

Game programming, a subset of
game development Video game development (or gamedev) is the process of developing a video game. The effort is undertaken by a developer, ranging from a single person to an international team dispersed across the globe. Development of traditional commercial PC ...
, 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 invo ...
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, controller, keyboard, or motion sensing device to generate visual feedback. This feedbac ...
. 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 anal ...
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 ...
, 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 ...
,
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 ...
,
audio programming Programming is a form of music production and performance using electronic devices and computer software, such as sequencers and workstations or hardware synthesizers, sampler and sequencers, to generate sounds of musical instruments. These mus ...
, and
input Input may refer to: Computing * Input (computer science), the act of entering data into a computer or data processing system * Information, any data entered into a computer or data processing system * Input device * Input method * Input port (disa ...
. 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 by players and programmers alike). In some genres, e.g. fighting games, 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 open world, although there are ...
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 games or related software, such as game development tools. Game programming has many specialized disciplines, all of which f ...
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 * Independe ...
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 game, life simulation video games developed by Maxis and video game publisher, published by Electronic Arts. The franchise has sold nearly 200 million copies worldwide, and it is one of the best-selling ...
'' by getting programmers to experiment with several ideas.


Prototyping

Programmers are often required to produce prototypes 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 programming. A prototype is generally used to ...
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. 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 ...
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 producers 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 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 ...
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 , whi ...
, while low-budget and casual games might not enter testing until a release candidate 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 testing 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 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 impr ...
" 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 ...
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 tha ...
. 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 ...
, 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 ...
. 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. 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 ...
s, APIs or
libraries A library is a collection of Document, materials, books or media that are accessible for use and not just for display purposes. A library provides physical (hard copies) or electronic media, digital access (soft copies) materials, and may be a ...
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 te ...
s, the language selected may be little more than a matter of preference. Language bindings 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 tha ...
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 ...
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 tha ...
s; for example, C, C++, 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 mo ...
. 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 * ...
-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 ...
, 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 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 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 produced handmade playing cards ...
,
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, Washi ...
, 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. ...
,
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 that can either be docked for use as a home console or used as a portable device, making it a ...
,
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 i ...
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 scien ...
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 the game. Lua 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 th ...
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'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 ...
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, ...
'
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''. Initially developed for PC first-person shooters, it has since been used in a variety of genres ...
.


APIs and libraries

A key decision in game programming is which, if any, APIs and
libraries A library is a collection of Document, materials, books or media that are accessible for use and not just for display purposes. A library provides physical (hard copies) or electronic media, digital access (soft copies) materials, and may be a ...
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. 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 s ...
. 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 ...
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 ...
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 ...
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 regions of the world. It is Nintendo's fifth major home game console, ...
, 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 generati ...
, PSP and Microsoft Windows.


Graphic APIs

Today, graphics are a key defining feature of most games. While 2D graphics used to be the norm for games released through the mid-1990s, most AAA games now boast full 3D graphics, 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 ...
''. 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 te ...
platform is Microsoft Windows. Since it came pre-installed on almost ninety percent of
PCs 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 techn ...
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 ...
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 games or related software, such as game development tools. Game programming has many specialized disciplines, all of which f ...
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 so ...
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, whic ...
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-accele ...
& Vulkan (API). 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 ...
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, Washi ...
, 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 ...
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 ...
, 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 200 ...
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'', 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 offerin ...
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 State ...
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 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 Network, networking and networked may refer to: Science and technology * Network theory, the study of graphs as a representation of relations between discrete objects * Network science, an academic field that studies complex networks Mathematic ...
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 manufacturers 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. Early word processors were stand-alone devices dedicated to the function, but current ...
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 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 multipl ...
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
CPU A central processing unit (CPU), also called a central processor, main processor or just processor, is the electronic circuitry that executes instructions comprising a computer program. The CPU performs basic arithmetic, logic, controlling, a ...
s 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 generati ...
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 daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ef ...
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 engineering 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 daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ef ...
. Some hobbyists may use software packages that help with game development, such as Adobe Animate,
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 ...
,
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 Win ...
, pygame, Adventure Game Studio, GameMaker Studio, 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 g ...
,
Pixel Game Maker MV Pixel Game Maker MV (released as "Action Game Tsukuru" (アクションゲームツクール) in Japan) is a 2D action game production software published by Playism. It allows for the creation of 2D games without the need for programming. The s ...
, or Construct.


See also

*
List of gaming topics The following 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 device. The word ''video'' in '' ...


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 wiki

Game Development Wiki -GDwiki
{{Authority control Video game development