community-rpg
community-rpg copied to clipboard
Feature: RPG dialog boxes
Many RPGs use a similar style of dialog box. It generally works as follows:
- Clear the box and store the string to display
- Wait for a delay period to pass, usually a fraction of a second
- Display a new glyph after any previously shown
- If there glyphs left to show, go back to step 2
- Wait for the player input
- If there are further strings to display, select the next one and go to step 1.
- Close the dialog box
Examples include:
- The Pokemon series (0:30, time offset included in link)
- The Final Fantasy series (6:15, time offset included in link)
It could be implemented by doing the following:
- Subclass one of the built-in UI widgets , such as
arcade.gui.UILabel - Use one of the built-in Kenney pixel fonts as the font
- Add an
on_updatemethod that takes a float,delta_time. This method will increment tracking for the character display functionality.