WIPIVERSE All articles

Video game programming

Video game programming, also referred to as game programming, is the software development of video games. It is a subset of the broader field of game development. Game programming requires substantial skill in software engineering and computer programming in a given language, as well as specialization in one or more of the following areas: simulation, computer graphics, artificial intelligence, physics, audio programming, and input handling. For multiplayer games, knowledge of network programming is required; the resulting code, in addition to its performance characteristics, is commonly referred to as the game's "netcode." For massively multiplayer online games (MMOGs), further knowledge of database programming and advanced networking is required.

Development process

Professional game development typically begins with a game design, which itself may have several possible origins. Occasionally, development starts with no clear design in mind but as a series of experiments. Programmers are often required to produce prototypes of gameplay ideas and features during pre-production, before the design document is complete. Prototypes are developed quickly and act as proofs of concept or tests of ideas.

During production, programmers create source code to implement the game described in the design document, which is treated as a "living document" that changes as programming limitations and new capabilities are discovered. Programmers often interact with art staff, particularly in areas such as 3D graphics, and may develop in-house tools and utilities. Formal quality assurance testing, performed by professional game testers, begins well into development. Final tasks include "polishing" the game and fixing bugs. Once a game ships, a maintenance phase begins, during which programmers work on patches to fix bugs and occasionally add features or content. Most modern games take from one to three years to complete.

Tools and programming languages

Game programs are generated from source code by a compiler. Source code can be developed with almost any text editor, though many professional programmers use an integrated development environment (IDE). Common programming languages used in game development include C, C++, Java, C#, and assembly language, as well as scripting languages such as Lua, Python, and JavaScript. High-level scripting languages are increasingly used as embedded extensions to games written in compiled languages. Some developers have created custom languages for their games, such as id Software's QuakeC and Epic Games' UnrealScript.

A key decision in game programming is which APIs and libraries to use. Graphics APIs include Direct3D (part of Microsoft's DirectX collection) and OpenGL for Windows, as well as Vulkan and Metal on other platforms. Many libraries handle sound processing, input, and graphics rendering, and some entire game engines handle most programming tasks, requiring only game logic coding.

Game structure

The central component of any game from a programming standpoint is the game loop, which allows the game to run smoothly regardless of user input. Unlike traditional software that responds only to user input, games must continue to operate continuously. A simplified game loop checks for user input, runs AI, moves enemies, resolves collisions, draws graphics, and plays sounds in a repeating cycle. Modern games may run multiple threads to decouple computations such as character AI from smooth motion generation.

Hobbyists

The only platforms widely available for hobbyist programmers are consumer operating systems such as Android, iOS, Windows, Mac, and Linux, because development on game consoles requires special development systems that are typically sold or leased only to professional studios. Some hobbyists develop homebrew games, especially for handheld systems or modded consoles. Hobbyists may use software packages such as Unity, Unreal Engine, Godot, GameMaker Studio, pygame, and other development tools.

References

  • Wikipedia: "Video game programming" (https://en.wikipedia.org/wiki/Video_game_programming)
  • Wikipedia: "Video game programmer" (https://en.wikipedia.org/wiki/Video_game_programmer)
  • Wikipedia: "Video game development" (https://en.wikipedia.org/wiki/Video_game_development)
Browse

More topics to explore

    Browse all articles