community-rpg icon indicating copy to clipboard operation
community-rpg copied to clipboard

Feature: RPG dialog boxes

Open pushfoo opened this issue 3 years ago • 0 comments

Many RPGs use a similar style of dialog box. It generally works as follows:

  1. Clear the box and store the string to display
  2. Wait for a delay period to pass, usually a fraction of a second
  3. Display a new glyph after any previously shown
  4. If there glyphs left to show, go back to step 2
  5. Wait for the player input
  6. If there are further strings to display, select the next one and go to step 1.
  7. Close the dialog box

Examples include:

It could be implemented by doing the following:

  1. Subclass one of the built-in UI widgets , such as arcade.gui.UILabel
  2. Use one of the built-in Kenney pixel fonts as the font
  3. Add an on_update method that takes a float, delta_time. This method will increment tracking for the character display functionality.

pushfoo avatar Apr 25 '22 20:04 pushfoo