This is a Lua module for the Defold engine to create a typewriter effect.

Features:

  • automatic typing with fade in and fade out
  • smooth zoom with fixed line width
  • predictive line breaks
  • continue button can show all text, or switch to next text, depending on state
  • can detect special characters that consist of multiple characters in Lua strings and type them as single character

How to use:

  • Put the file typewriter.lua in the folder /typewriter.
  • Import the module in your gui script with the line:
    • local typewriter = require "typewriter.typewriter"
  • Create a text node
  • Initialize the typewriter for your text node with
    • typewriter.init(node_id)
  • Start typing text with
    • typewriter.start(text)

If you use this module in your project, you must credit me (Halfstar). Free for commercial and personal use.

StatusIn development
CategoryTool
PlatformsHTML5
AuthorHalfstar
Made withDefold

Download

Download
Jasmine typewriter (Lua module) 8 kB
Download
Typewriter example project.zip 220 kB

Leave a comment

Log in with itch.io to leave a comment.