# sm.world.createWorld

Creates a new world object.

**Kind:** Function

**Environments:** Game

## Game

``` { .lua .api-signature }
sm.world.createWorld( filename, classname, terrainParams?, seed? )
```

[Open the full Game reference](../Game-Script-Environment/Static-Functions/sm.world.md#createworld)

**Availability:** Server only

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `filename` | string | The world script filename. |
| `classname` | string | The world script class name. |
| `terrainParams` *(optional)* | any | The world's terrain parameters. (Optional) |
| `seed` *(optional)* | integer | The world's seed. Defaults to 0 (Optional) |

**Returns:**

| Type | Description |
| --- | --- |
| [World](../Game-Script-Environment/Userdata/World.md) | The created world object. |
