# GameClass

A script class that defines the game mode. Only one instance of this class is made.

**Kind:** API page

**Environments:** Game

## Game

[Open the full Game reference](../Game-Script-Environment/Classes/GameClass.md)

This is the first script that will be run.

The game script is responsible for creating and managing [worlds](../Game-Script-Environment/Userdata/World.md).

Can receive events sent with [sm.event.sendToGame](../Game-Script-Environment/Static-Functions/sm.event.md#sendtogame).

### Fields

| Name | Type | Description |
| --- | --- | --- |
| `network` | [Network](../Game-Script-Environment/Userdata/Network.md) | A [Network](../Game-Script-Environment/Userdata/Network.md) object that can be used to send messages between client and server. |
| `storage` | [Storage](../Game-Script-Environment/Userdata/Storage.md) | (Server side only.) A [Storage](../Game-Script-Environment/Userdata/Storage.md) object that can be used to store data for the next time loading this object after being unloaded. |
| `data` | any | Game start data. |
