A game is a structured form of play that involves a set of rules and the possibility of competition and reward. Games may be played alone or with others; they can be a form of entertainment or a means of social interaction, or both. Games can require skill, strategy, luck, or a combination of all three. They can be viewed as art (such as jigsaw puzzles, board games and card games) or entertainment (such as spectator sports and video games). They may also perform educational, simulational, or psychological functions.

There are many ways to define a game, but most definitions share certain features. A key factor is that games must have some kind of goal, a specific outcome that players will work towards. This orients players’ participation throughout the game and sets it apart from other leisure activities such as reading, watching TV, or listening to music.

Games can be any sort of entertainment, from a 2D Tetris block to a fully immersive virtual world, and can be enjoyed by individuals or groups; for fun or for achievement; on computers, consoles, or mobile devices; by amateurs or professionals; and with an audience that is not participating in the game (such as spectators at a baseball game). They are often thought of as a form of entertainment separate from, but overlapping with, other forms such as movies, TV shows, books, etc. This difference is sometimes argued as the primary distinction between games and other entertainment media, although it is also possible to argue that there are some similarities.

The concept of a game has been an important one for researchers in a variety of fields. Philosophers of computer science have studied the nature of games and their relationship to the quotidian; psychologists have examined how games influence mental and physical well-being; and sociologists have investigated the cultural meanings of gaming.

A common view in game studies is that games are something more than simply entertainment; they are a medium of life with their own embodied practices, norms and culture. This approach has led to investigations of topics such as the role of gaming in societies with different political regimes; how games are marketed to consumers; and the effects of games on the economy, society, and the individual.

The development of a game takes place in three primary stages: programming, production and testing. Programming involves creating a game’s functionality in a software programming language, and includes defining attributes like victory and loss conditions, obstacles, rewards, and so on. Production involves putting together assets like characters, scenery, and sound effects. This can be done in studios or independently by small teams of developers. Testing is essential to ensure that the game works as intended and can be used in a live environment. This process can be aided by the availability of data on player behavior collected by the games companies themselves. There are ongoing calls for games companies to make this data available to independent scientists to enable research on the effects of games.