LiminaliaLiminalia
How-to: Show dialogue as chat bubbles

Show dialogue as chat bubbles

Open in Claude (new tab)
On this page

In a portrait game, you can tell the story on a screen like a messaging app on a phone instead of in the message window. Dialogue appears in speech bubbles and narration as a small line in the center, and they stack downward as the player reads on. The way you write the script doesn’t change.

The examples on this page use the English sample story, “Waiting for Stars” (choose “A sample story” and English in New Project, or run lim new --lang en; the characters are Akari and Sou).

Make a portrait project

When you create a new project in the desktop app, set “Screen size” to “720×1280 (portrait, for phones)” (on the command line, lim new <folder> --size 720x1280).

For an existing project, click “Project” at the top of the screen, and in “Basics,” set “Screen width” to 720 and “Screen height” to 1280. Set the sprite positions again to fit the portrait screen (Adjust sprite position and size).

Apply the chat theme

  1. Click “Game settings” at the top of the screen, then click “Change theme” at the very top.
  2. Choose “Chat” under “Portrait only” at the top of the list, and click “Apply.”

Applying it checks “Show dialogue as chat bubbles” under “Chat” in the game settings, and also changes the bubbles’ colors and shapes, the choices and the system screens all at once. The chat theme appears only in the list for portrait projects. Samples are in Change the look of the whole game with a theme.

Set how bubbles look

Under “Chat” in the game settings, you can set how things look one by one. Even without the theme, checking “Show dialogue as chat bubbles” is enough to turn dialogue into bubbles.

FieldWhat it sets
Show dialogue as chat bubblesShow dialogue, narration and choices on the chat screen
Your speaker nameShow this speaker’s bubbles on the right (the main character’s name and so on)
Name in the top barThe name shown at the top of the screen (if empty, there’s no top bar)
Name displayShow the other person’s name every time, only when the speaker changes, or not at all
Show faces, Face diameterShow a round face beside the other person’s bubbles (56px across by default)
Typing indicator (ms)How long ”…” shows before the other person’s bubble (0 shows none)
Other bubble color, Your bubble colorThe bubbles’ background colors (the text colors are in the matching “text color” fields)

The faces are the same character faces as the face window (Show a face window). A character without a face gets the first letter of their name in the circle.

Clicking skips the ”…”. It doesn’t show while skipping, on read pages, on pages reached by going back, or in Studio’s preview.

It’s saved in liminalia.json like this.

"ui": {
  "chat": { "dialogue": true, "me": "Akari", "title": "Sou", "showName": "first", "showFace": true, "typing": 420 }
}

Check it by playing

  • The outer 「」 and 『』 of a line are removed in the bubble. English quotation marks (“…” and ”…”) stay as written unless “Outer brackets and quotation marks of dialogue” under “Text” in the game settings is set to “Remove.” Lines in () keep their brackets.
  • Ruby, text decoration, text speed, Auto, Skip, read pages and voices work the same as in the message window. The log keeps the usual text (with the brackets).
  • Choices line up in a tray at the bottom of the screen, and the one picked stacks as your own bubble. Image button and click area choices appear where you placed them, and don’t stack.
  • The chat screen fills the whole screen, so the background and sprites are behind it.
  • The stacked bubbles are kept in saves, and come back after load and going back. The newest 60 are kept.

Go back to the message window, clear the bubbles

CommandThe chat screen
@nvl on, @vertical on, @balloon onGoes back to the usual message window while they’re on (the bubbles stay)
@clearClears the stacked bubbles
@chat-closeCloses the screen, and starts a new stack from the next text
@window hideHides the screen (but not a screen opened with “Open chat”)

When the player uses “Hide window,” the chat screen is hidden too.

Open a messaging app in the story

With @chat-open and @chat, you can show a message exchange that happens in the story. In a game that doesn’t use “Show dialogue as chat bubbles,” a phone-shaped screen appears in the middle of the screen.

  1. Type “chat” in the search box at the top of the parts panel, and double-click “Open chat” in the results. Enter the other person’s name (shown in the top bar) in title, and your own name in me.
  2. Add “Chat,” and enter the speaker in speaker and the message in text. To send a sticker or a photo, choose an image in image.
  3. Add “Close chat” where the exchange ends.

Each “Chat” bubble waits for a click (uncheck wait to not wait). The bubbles are also kept in the log. In a game with “Show dialogue as chat bubbles,” the “Open chat” screen also opens to fill the screen, and the usual dialogue stacks in the same column.

In code

The script is ordinary dialogue and narration.

At the top of the slope stood a small observatory.
Akari "Made it. Was this slope always this long?"
Sou "Good work. I've left the door unlocked."
@choice
- Go inside -> #inside
- Wait outside -> #outside
@end

A messaging app in the story is written like this.

@chat-open Sou me=Akari
@chat Sou text="The telescope room is upstairs."
@chat Akari text="On my way."
@chat-close

For details, see @chat-open and Chat screen in the documentation.

Commands used on this page

@nvl@vertical@balloon@clear@chat-close@window@chat-open@chat