> For the complete documentation index, see [llms.txt](https://kdoore.gitbook.io/cs2335/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kdoore.gitbook.io/cs2335/f20_bkup_v2/game-coding-structures/overview.md).

# Games Overview

In Project 1, we will create a very simple game so we can become familiar with the Unity Editor and using custom scripts to create GameObjects with custom behaviors. The **player's avatar gameObject's interaction** in the game-world will result in a **win or lose** final **gameState**.  As the **player's avatar gameObject** **collides** with other gameObjects, the **GameData score** and **health** values will change providing **feedback** to the player.  Designing video-games requires an understanding of **event-driven systems**, where **events** can cause changes in data-stored that are reflected in changes to the **gameState**.

## Game Requirements:

A simple list of essential game requirements:

1. Player Controlled Interaction
2. Meaningful Feedback
3. Win / Lose condition

**Games:**&#x20;

> A game is a voluntary interactive activity, in which one or more players follow rules that constrain their behavior, enacting an artificial conflict that ends in a quantifiable outcome. \[Eric Zimmerman]

**Game - System:**

> Game: A system that encourages learning through strong feedback mechanisms is a game. [ Daniel Cook](http://www.lostgarden.com/2006/10/what-are-game-mechanics.html)

**Mechanics:**&#x20;

> Mechanics - a "mechanic", something that connects players' actions with the purpose of the game and its main challenges.
>
> Game mechanics are concerned with the actual interaction with the **game state**, while **rules** provide the **possibility space** where that **interaction is possible**, regulating as well the **transition between states**. In this sense, **rules are modeled after agency, while mechanics are modeled for agency.**
>
> In this object-oriented framework, **rules** could be considered general or particular **properties of the game system and its agents**. **All objects in games have properties**. These **properties are** often either **rules or determined by rules**. These **rules are evaluated by a game loop**, an **algorithm** that relates the **current state of the game** and the **properties of the objects** with a number of **conditions** that consequently can **modify the game state.** For example, the **winning condition**, the **losing condition** and the effects of action in the player's avatar health are calculated when running the game loop. This **algorithm relates rules with mechanics**, exemplifying the applicability of an ontological distinction between rules and mechanics. [Michael Sicart](http://gamestudies.org/0802/articles/sicart)

**References:**

Zimmerman, E. Narrative, Interactivity, Play, and Games. In Wardrip-Fruin, N. & Harrigan, P. (eds), First Person, MIT Press, 2004.
