Defold-Printer

#1

defold-printer

Defold-Printer

Hello, want to introduce my defold-printer module. I used it several times for my games and want to share it with you.
I know, what there is defold-richtext module by Britzl, but my module have different way to use it.

Link on github: https://github.com/Insality/defold-printer

In my module you can create styles for your text and reuse it for making easy nice looking dialogs :slight_smile:

Features:

  • Configurable text styles
  • Designed for dialogs. Easy skip and go to next text
  • Source styles - you can define default style for special source (ex. character in your game)
  • Word styles - you can define style for special word. It will auto-wraped with special style
  • Images in text
  • Text can have waving, shaking, slowly appearing, custom color, custom spacing and custom sound when appear

Text with styles looks like:
{Illidan_name}Illidan{/}: you are {red}not {waving}prepared{/}!

Read full README or see example at github

Todo:

  • Vertical and Horizontal align
  • Get text metrics for resizing your bubble text
  • More style parameters
  • Optimize code and node creating

If you will use it and have suggestions, do not be shy and tell me about it!

Tips:

Team working
In my project, I have the sheet in google docs for settings styles. Example:


So, other members of the team can setup styles and use it in localizations. Translations is also very simple with style tags.
Also, source and word styles can be also setup with google docs. Example:
13
locale_id - localized word. For example, printer_bob_name in English will be Bob, so all words in dialog “Bob” will be printed with style bob

Template setup
While setting text area, you can set visible printer/text_parent and setup this node size. The text will write in this area. After setup, you can set alpha to 0 and place your background behind printer template

24 Likes

#2

Very nice!

1 Like

#3

Wow! It’s brilliant, I need to check this out :smiley:

1 Like

#4

Cool! Thanks for sharing!

1 Like

#5

Great Module!! Love it :heart: !! Thanks for sharing :wink:

1 Like