# Map

### Introduction

The Map object is a standard object created by the FlatRedBall Wizard. The Map object is defined in the GameScreen but is also available

### Map in GameScreen

Typically the Map object is a LayeredTileMap defined in the GameScreen and has its SetByDerived property to true.

![](/files/63Y6vye8X112CyWONn0D)

If not using the wizard, the Map object is optionally created when adding a new GameScreen in a new project.

![](/files/cqgJ85AFYKfd85kWgI6W)

Using a Map object is recommended, whether it is created through the wizard or the Add Screen dialog.

### Map in Level Screens

Level screens should also have a Map object. Each Level screen will automatically have a Map object since the Map object in the GameScreen has its **SetByDerived** set to **True**. By default new levels will have a TMX object added automatically.

![](/files/HJGbaqli6y2JZFLfiPFq)

When using the default options, a new level will have a TMX file in the Files folder and a Map object in the Map folder.

![](/files/G9AWzSFl8U62iMKewQYu)

Under the default setup (as set up by the new screen dialog), the Map object in the level will reference the TMX file.

![](/files/y0vljWVITsj5qIvup7aw)

#### Optional - Assigning Map to a TMX File

If your game does not have the Map object assigned to a TMX file you may need to manually make the connection between the object and the file. This can happen if you delete the default TMX file, or if you are manually adding the TMX file at a later time. To assign the Map object to use the TMX file, drag+drop the TMX File onto the Map object in your Level screen.

<figure><img src="/files/5SHY7R8y1CYagMbAd3mL" alt=""><figcaption></figcaption></figure>

Alternatively, you can assign the Source properties on the map object: ![](/files/y0vljWVITsj5qIvup7aw)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flatredball.com/flatredball/glue-reference/objects/map.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
