# Set up the title screen and the ending

> Choose the title screen background and BGM in the game settings, and show an ending screen when the story ends

Finally, set up the title screen that appears when the game starts, and how the story ends.

## Title screen background and BGM

1. Click "Game settings" at the top of the screen, and choose "Title" on the right.
2. In the panel on the left, choose `library.webp` for "Background" and `quiet_night.wav` for "BGM."

The preview on the right shows the result right away.

![Game settings. Choose the title screen background and BGM.](/shots/en/t8-title-settings.webp)

![The title screen.](/shots/en/g8-title.webp)

In the game settings, you can also change the color and shape of the message window, the text size, the choice buttons, and the save and settings screens. You can check each one in the preview on the right as you choose.

## End the story

As it is, the game goes straight back to the title screen after the last line of narration, with nothing in between. Make it show an ending screen at the end of the story before going back.

1. In "Script," select the last line of narration ("On the way home, …"), and double-click "To title" in the "Flow" section of the parts panel.
2. Enter `good` for `ending` and `The Way Home` for `title`.

![The "To title" part, with ending and title filled in.](/shots/en/t8-ending.webp)

`ending` is the kind of ending: choose from `bad`, `normal`, `good`, `true` and `other`. The screen shows the words for the kind (GOOD END for `good`). `title` is the name of that ending, shown large under the words for the kind. In a game with several endings, write this line at each ending, with its own kind and name. The flowchart also shows the kind and name on the ending scene.

In code, one line is added after the last line of narration.

```
@scene-change hill_dusk.webp
On the way home, I walked down the hill, holding the {= game.book} to my chest.
@title-screen ending=good title="The Way Home"
```

## Play to the end

Play from the title screen to the end in a test play. At the ending, the screen goes dark for a moment and changes to the hill on the way home.

![The last line of the ending.](/shots/en/g8-last.webp)

After the last line, the screen goes dark and shows "GOOD END" and "The Way Home." Click to go back to the title screen.

![The ending screen, with GOOD END and the name of the ending.](/shots/en/g8-ending.webp)

If you close the window partway through, the game keeps your place in an autosave. Next time, click "Continue" on the title screen and pick it up from the "A" tab of the load screen that opens.
