[Solved] Text object issue

Whether enabled or not smoothing of text, the text still always smoothed.

Oh, and one off topic question.
How do I actually use NewLine command? I tried differently, but it doesn’t work.

For HTML5 games ? Make sure that the coordinates of the object are integers. Otherwise, maybe it is related to the rendering library used by the games, I’ll take a look.

For the NewLine function, here is an example :

"Your score is"+NewLine()+ToString(Variable(Score))

No, for native platform.

I have tried to do so:
yadi.sk/d/n87g52sx8Wgj8
but when you start the preview, error message says “Changes made to events will be taken into account when you switch to Edition mode” and in the preview window changes nothing.
I saved the project, closed it, restarted the editor, opened the project, launched a preview. Got that same message, and this message window:
yadi.sk/d/8x3GjEzL8Wgdm
And here is the file:
yadi.sk/d/rmGUEljV8WghG

Ok, there was a bug indeed. I’ve fixed it, thanks. :slight_smile: For now, instead of using NewLine, just add a text with a new line inside :

"Your score is "+ToString(Variable(Score))

It should work.
For the native platform, make also sure that the text object has integer coordinates. The text may looks blurred in the editor, but when launching a preview, it should be ok.

Ooooh, that’s awesome! _____________

About smooth text.
I use integer coordinates, but the text is still blurry. May it depend on videocard model or driver version?

Maybe you should make another project that reproduces issue and post it there (or post your project)? 4ian wouldn’t need to guess then and do actual debugging.

Oookay, here it is:
Compiled project
Project file

That how I see this:
yadi.sk/d/21QRlbJW99KxA

Oh, and by the way. Is there any way to align the text to the right, or center?

The text is only blurry when you upscale x2 ( or zoom ) which is “normal” as the pixel are just scaled up.

To center a text ( or any object ) on position 230 on x axis, just do:

Do =230-TextObject.Width()/2 to the X position of TextObject

And to ensure that the text is right aligned at position 230:

Do =230-TextObject.Width() to the X position of TextObject
1 Like

Uuuum…
But what if I want to make old-school style pixelate game in low resolution? Like 320x240 pixels.
Play in such a tiny window will be a little uncomfortable.

In this case, be sure that the textures of the object are set as not smoothed, the same for the text objects, and uses a font that is designed to look old school ( Look at dafont.com/fr/bitmap.php )

I’ve made C64-like font a while ago: fontstruct.com/fontstructions/show/639090

Wow, great thanks -)
Are those fonts free?

My one is. You just need to credit me as author of font (commercial usage allowed). Dunno about other fonts.

That just helped me :slight_smile: