Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
RPG-styled dialogues [how to?] — Gideros Forum

RPG-styled dialogues [how to?]

Apollo14Apollo14 Member
edited September 2018 in Code snippets
Hi!

I was trying to create RPG-styled dialogue class, like here:


Easiest solution I was thinking about:
local function sayPhrase(textfield_ID, phrase)
		for i=1, #phrase do
			textfield_ID:setText(string.sub(phrase,1,i))
			Core.yield(0.06)
		end
end
 
Core.asyncCall(sayPhrase, eng_textfield, "Hi there! My name is Alice!")
But for some reason non-english characters rendering is extremely slow, textfield is blinking when we use simple "setText" method:
https://media.giphy.com/media/uVgrXuDnBtzMDzijqc/giphy.gif
gproj with replicated issue:
https://www.dropbox.com/s/wvvrxr655akpse5/test_FontRendering.zip?dl=0
(I've tested both Font.new, TTFont.new, and different system fonts;
with Core.asyncCall and with Timers
in both desktop&mobile players, and in exported apk)


I've already asked about RPG-styled dialogues before, @antix had another solution, using Rendertarget.
But this method doesn't work for non-english characters.


I'm thinking about covering text with Pixel, then gradually decrease Pixel's width from left to right so characters will be gradually uncovered.

How would you solve it? :smile:
> Newcomers roadmap: from where to start learning Gideros
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)

Comments

Sign In or Register to comment.