Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

How to create a numerated Frame text overlay, using 'Textylus'

A topic by Lion In A Box Games created Jun 24, 2023 Views: 78
Viewing posts 1 to 1
(11 edits)

Hi!

So what if you want to create a numerated Text overlay for each frame,  where each frame is numerated?


G.A.S. actually allows you to do that, with keyword-expressions. I called this expression language 'Textylus' (mix between 'Text' and Style').
Let 's say you have this animation:


And  you want to add this numerated text overlay on top of each frame:


G.A.S. has a very straight forward way to do this using the 'Textylus' keyword language.
To have for  example the text overlay 'Frame 1', 'Frame 2', etc. until the last frame, inside the Text Editor Input field you simply type:
/%1/%2/%{Frame }_


The Text Editor will automatically interpret the expression in 'Textylus' style, and create the above animation upon Export!

So what do those expressions mean?

/% : Each individual expression begins with a forward slash + percentage symbol. This  expression simply lets Textylus know to look for the next Textylus expression.
/%1/%2 : If you have two numbers in sequence as two separate expressions, and the second number is exactly 1 bigger than the first, then Textylus will know to auto numerate the Text Overlay.  In this example it starts numerating from 1,2,3... until the last frame. If you were to write /%3/%4 it would start numerating from 3,4,5... until it reached the last frame.
/%{Frame }_ : insert the word 'Frame ' in front of the numeration. The expression {}_ tells Textylus that whatever content you have inside the wavy brackets is being placed in front of the numeration text. Make sure to add a space after the word, if you want to separate it from the numeration text (e.g. 'Frame ' instead of 'Frame').


Other expressions:
/%_{} :
insert the word placed inside the brackets AFTER the numeration text. E.g. /%1/%2/%_{ Sprite} will result in a text  overlay reading '1 Sprite', '2 Sprite', '3 Sprite', etc.

/%word1/%word2 :  insert text 'word1' on Frame 1 in front of numeration, and text 'word2' on Frame 2 in front of numeration. The text 'word2' will be inserted in front of numeration on all the remaining frames after Frame 2.

/%word1/%word2/% :    insert text 'word1' on Frame 1 in front of numeration, and text 'word2' on Frame 2 in front of numeration.  After Frame 2, there will be no additional text inserted in front of numeration on all following frames.

-/- : Deactivate textylus reader. No matter what you write after this expression, it will simply display the exact text unto the display. (E.g. '-/-/%1/%2/%{Frame }_' will result in the text '/%1/%2/%{Frame }_' being displayed exactly like that on the frame. No decoding is happening.


You don't have to add any numeration to the expressions, for the other expressions to work! You can combine each expression with one another. E.g. /%hello/%what/%/%{Prefix }_ will result in the text being displayed as such: 'Prefix hello', 'Prefix what', 'Prefix ', 'Prefix ', 'Prefix ', etc. until the last frame. 

In what order to type the expressions?
The two numeration expressions have to be placed right next to each other.  But the order of the other expressions is completely irrelevant!

The Textylus language also works for sprite sheet exports!

Have fun with it!