Repository navigation
Text
The Text tab defines named text messages that your game can display in place of the score, using the Text minikernel — a five-line, 12-character-wide message display drawn with the same hardware area the score digits normally use.
With the score hidden on the standard kernel, text starts closer to the playfield (the gap that was left for the score row is gone, and DPC+ uses the same spacing). On the standard kernel, text can also show on Title screen pages: while a "Show text" message is active, a text row is drawn at the bottom of each title page that has room left after its graphics. DPC+ does not have the title screen kernel.
A-Z, 0-9, and basic punctuation only. Unsupported characters and shorter text are padded with spaces.
- Text background color — the Text Minikernel's background color. This is a single project-wide setting rather than a per-message one.
- Max characters to display at once — how many of the 12 available character slots to actually use, for static (non-scrolling) messages only, regardless of a message's length or justify setting. The "Scroll text" blocks ignore this and always scroll through the full message using all 12 slots.
- Columns — lays message cards out in multiple columns when there's room, instead of one full-width column.
- Show a scroll cursor — draws blinking up/down arrows (and an "end of message" icon once there's nothing left to scroll to) alongside a message with more than 2 lines. When on, sets its blink speed (a power-of-2 number of frames, or Never for a steady, non-blinking cursor).
Click the + button in the bottom-right corner to add a new message. Each card has:
- Name — shown in the "Show text"/"Scroll text" dropdowns wherever you display it in your blocks.
- ID (the badge in the card's top-left) — a permanent number, separate from the message's name or its position in the list. Used with the "Show text ID"/"Scroll text ID" blocks (see below) when you want to choose which message to show at runtime instead of picking a fixed one at edit time. This number counts positions in ID order (the order messages were created), not the display order shown on this tab, so reordering cards below never changes what a stored ID number means.
- Text — the message itself, up to 240 characters, with newlines (Enter) starting a new line. Longer than fits statically, or more than the visible lines: use the "Scroll text" blocks (horizontal) or the "Scroll text lines up/down" blocks (vertical) to move through it at runtime.
Justify — left, center, or right. Only affects static text, not scrolling.
- Multiline — word-wraps onto a second static line instead of just the first, when a message's text needs more room than one line and isn't being scrolled.
Click the chevron in the top-left corner to collapse a text card. Drag the strip at the top of a card to reorder messages in the list — this only changes display order here, never the permanent ID.
On the Actions tab, the Text category has:
- Show text [name] — displays a message defined on this tab, picked by name from a dropdown.
- Show text ID [n] — same, but the message is chosen by a number expression (the message's position on this tab, 1 = the first message by ID, 2 = the second, and so on) instead of a fixed name — useful when the number is a variable or computed value, so the message shown can be picked at runtime.
- Show text [text] — displays free-typed text directly, without needing a text card entry.
- Show text row [1/2] [name/ID/text] — same as the three blocks above, but writes to just one row (1 or 2) instead; the other row is always left blank, since both rows are shown together. Only the message's first line is ever used (no word-wrap or scrolling) - use the plain "Show text" blocks instead for a message that needs more than one row.
- Clear text — clears whatever message is currently shown.
Any of these automatically scrolls back and forth if the message is longer than this tab's max display width.
"Scroll text [name]", "Scroll text ID [n]", and "Scroll text [text]" are scroll-tunable versions of the three blocks above, each with two extra fields:
- every [n] frames — how often the message steps while scrolling.
- wait [n] at limits — how long it pauses once it reaches either end before scrolling back the other way.
These fields only take effect if the message actually needs to scroll (i.e. it's longer than the max display width) — they're ignored for a message that fits statically.
- Text scroll [action] — Start/Pause/Unpause/Stop/Restart the currently shown scrolling message. Start and Unpause both resume it from wherever it currently is (they're the same action, just worded for whichever reads better at the call site). Pause freezes it in place. Stop resets it back to the beginning and freezes it there. Restart resets it back to the beginning too, but keeps it scrolling. Has no visible effect on a message that never needed to scroll.
- Is text scroll at [Left/Right]? — true while the currently shown message is paused at that end of its scroll range. Always true for "Left" on a message that never needed to scroll.
For a message with more than 2 lines (see "Multiline" above and the 240-character text field):
- Scroll text lines up [1 line/2 lines] / Scroll text lines down [1 line/2 lines] — moves the currently shown message up or down by one or two lines, revealing an earlier or later line. Never moves past the first/last line, and has no effect on a message with 2 or fewer lines.
- End of text? — true whenever the "end of message" icon would currently be showing, i.e. there's nothing left below the currently shown message to scroll down to.
- Text scroll cursor [show/hide] — shows or hides the scroll cursor (up/down arrows and "end of message" icon) at runtime. Only has an effect if the Text tab's "Show a scroll cursor" switch is on.
- Text set [row 1/row 2/both] color to [color] — sets the color of Text Minikernel messages. "Row 2" only matters for a wrapped message's second line (a message with "Multiline" on, or one long enough to word-wrap that far by itself); it falls back to row 1's color until explicitly set.
- Text set scroll cursor color to [color] — sets the color of the blinking scroll cursor.
- Text set end icon color to [color] — sets the color of the "end of message" icon.
- Fade Text color to [color] over [n] frames — starts fading the message color toward the given color. Only needs to be triggered once — the fade keeps running by itself every frame afterward, even from inside an "if" block that only briefly becomes true, until it reaches the target and stops.
- When Text color has finished fading — runs the connected blocks once, the moment a matching fade reaches its target color. Does nothing if no matching fade ever runs anywhere in the project.
See the Actions tab's Text category for every Text block: showing a message by name, ID, or free-typed text, with or without text scroll speed/pause, controlling an in-progress scroll (horizontal or, for multi-line messages, vertical), and setting/fading the Text Minikernel's row colors, scroll cursor, and end icon.