Interfaces at run time
What is stacked on screen while the game runs. Where pages, Game UI and layers appear, and how the screen changes when the game starts, a page opens and the game ends.
While the game runs, what is on screen is stacked in layers. From the bottom up they are the stage, Game UI, pages and layers, and each one covers the ones beneath it.
- Confirm, promptsShown over the current screen, above every pageLayer
- Title, Config, Save, LogOne at a timePage
- Dialogue, Choice, Notifications, Quick menuShown automatically when the game startsGame UI
- Backgrounds and charactersShown when the game starts, driven by the storyStage
| Layer | In the UI panel | How it appears | When it exists |
|---|---|---|---|
| Layer | Any page | Opened by Show Layer or Show Confirm | At any time |
| Page | Interface Type set to Page | The entry page opens when the game launches; the others are opened by Go Page | At any time |
| Game UI | Interface Type set to Game UI | Shown automatically when the game starts; nothing opens it | During a game |
| Stage | Not in the UI panel | Shown by Start Game or Load Save | During a game |
The UI panel has no separate type for layers. Any page can be opened with Go Page or shown over the screen with Show Layer.
How the screen changes during a playthrough
The steps below follow one playthrough of a project created from the Skeleton template.
The game launches
- TitleTook the place of Splash, the entry pagePage
The game opens on its entry page, Splash. The UI panel marks it Entry page, and it cannot be deleted. Any page can be made the entry page with Set as Entry Page. There is no stage and no Game UI yet.
Splash shows a logo and a disclaimer, then runs Replace Page with Title. Title takes the place of Splash at the bottom of the stack, so nothing later returns to Splash.
Another page opens
- ConfigPage
- TitleGo back returns hereHiddenPage
Go Page opens Config, which replaces Title on screen. Title is no longer drawn but is kept: Go back closes Config, and Title plays its enter animation and fires Surface Init again.
Each Go Page stacks one more page, and each Go back closes the top one. Go back on the bottom page does nothing. Go Page with its page set to None closes every page above the bottom one.
The game starts
- Quick menuOn Stage slotGame UI
- Dialogue, Choice, NotificationsDialog, Choice and Notification slotsGame UI
- Backgrounds and charactersStage
- TitleHiddenPage
A button on Title runs Start Game. Every page is hidden, the stage appears, and Game UI is drawn over the stage. No page is on screen now: the player sees the story and the Game UI.
Game UI does not need to be opened. When the game starts, each Game UI in the project appears in its slot, and all of it is removed when the game ends. A slot with no Game UI uses the built-in dialog box, choice menu or notifications.
A page opens during the game
- LogBackground slightly transparent, the scene shows throughPage
- Quick menuFaded outGame UI
- Dialogue, ChoiceFaded outGame UI
- NotificationsThe Notification slot stays on screenGame UI
- Backgrounds and charactersStage
- TitleHiddenPage
The Log button on Quick menu runs Go Page. A page opened during a game is drawn over the stage, and its own background is slightly transparent. While the page is on screen:
- The story holds on the current line. Clicks, the advance key and auto-forward do not move it on.
- Game UI in the Dialog, Choice, NVL and On Stage slots fades out and comes back when the page closes. Game UI in the Notification slot stays on screen.
- Clicks and keys go to the page.
Go back closes Log and returns to the game. Further Go Page calls between pages opened during the game stack them as before, and Clear Page closes every page opened during the game at once.
A layer opens
- ConfirmModalLayer
- LogStill on screen, takes no clicksPage
- Quick menuFaded outGame UI
- Dialogue, ChoiceFaded outGame UI
- NotificationsGame UI
- Backgrounds and charactersStage
- TitleHiddenPage
The Title button on Log runs Show Confirm to ask whether to return to the title. Confirm is shown over Log, and Log stays on screen beneath it. Escape closes Confirm without an answer, as its cancel button does, and Log stays open.
The game ends
- TitlePage
When the player confirms, Quit Game runs with Title as its page. The stage and Game UI are removed, the pages opened before the game and every layer are closed, and Title becomes the only page.
Pages
- One page is on screen at a time. A page replaced by another is not drawn, and enters again on
Go back. Go back,Go PageandClear Pagenever close the bottom page. When the game launches it is the entry page; afterQuit Gameit is the pageQuit Gameopened.Replace Pageopens a page and closes the page it replaces. Run on the bottom page, it puts the new page in its place, which is how a splash page hands over to the title page.- Before the game starts, nothing is drawn beneath a page. A page opened during a game is drawn over the stage with a slightly transparent background, and the story holds on the current line.
Start GameandLoad Savehide every page. During the game,Go backandClear Pagedo not bring those pages back, andQuit Gamecloses them when the game ends.- A page can also be shown inside another page through the Page component. An embedded page is part of the page that holds it and does not take part in the stacking above.
Game UI
- Each Game UI is created into a slot: Dialog, Choice, Notification, NVL or On Stage. Each slot holds one Game UI.
- Game UI exists only while a game is in progress. It appears when the game starts and is removed when the game ends, and is never opened with
Go Page. - The first four slots replace the game's built-in interface for that slot. A slot with no Game UI uses the built-in one, so deleting the Game UI in the Dialog slot still leaves the game with a dialog box.
- The On Stage slot replaces nothing. It holds what stays on the stage, such as a quick menu or a HUD. Its empty areas do not catch clicks, so a click there reaches the stage and advances the story.
- The Notification slot is display only and takes no clicks or keys.
- While a page is open during a game, every slot except Notification fades out.
Layers
Show Layer shows a page over the current screen and leaves what was there on screen.
- A layer sits above every page, including pages opened after it.
- A layer can be opened Modal: nothing beneath it takes clicks, and it takes the keys. A layer that is not modal leaves the page beneath it working.
- A modal layer holds the story on the current line. A layer does not fade Game UI out.
- A layer shown during a game is drawn with a slightly transparent background, as a page opened during a game is.
- A layer closes when the page that opened it closes.
Go backcloses the top Dismissible layer first, and closes a page only when there is none.Hide Layercloses the layer it names, andClose This Layercloses the layer it runs in.- Layers in the same group are shown one after another: the next one appears when the previous one closes.
- The confirmation
Show Confirmopens is a modal, dismissible layer. - Starting a game, loading a save and quitting the game close every layer.
Clicks and keys
Several things can take clicks at once, but keys go to exactly one place. Read the table from the top; the first row that matches applies.
| On screen | Takes clicks | Takes keys |
|---|---|---|
| A modal layer | The top modal layer and any layers above it | The top modal layer |
| A page | The current page and every layer | The current page |
| A game in progress, no page | Game UI, layers and the stage | Game UI |
Keys reach App logic first, then the one place in the table.
The Layers panel in Dev Mode
The Layers panel in Dev Mode lists what is on screen at this moment, from the bottom up: the stage, Game UI, the page and layers. It marks what takes clicks and where the keys go, shows faded-out Game UI and pages that are not on screen separately, and marks the dialogue box Hidden while the player has hidden it. Open it from the debug tools menu in Dev Mode by choosing Layers.
When the story ends
When the story plays its last line, the game shows the page chosen in the build variant's Page shown when the story ends, in the same way as Quit Game. With Show nothing selected, the last frame stays on screen.