Sprite font vs text

0 favourites
  • 14 posts
From the Asset Store
Horror Halloween Pixel Art Sprite Font Space Data included
  • Hi ppl,

    I've made a quiz/trivia game. It is obvious that this kind of games rely mostly on text. Now when I released my game to Google Play some players leave comments regarding problems with text like:

    • text blurs sometimes,
    • sometimes instead of question they see some unknown characters (this happened only on Galaxy Tab 3 - it's some encoding issue I believe)
    • other less frequent issues

    I know that Text can be rendered differently on different devices and I believe this is the cause of all the issues. So I figured out that if I do it with Sprite Fonts then all devices should render it the same way. But that's the teory only. Have anyone tried Sprite Fonts in official project and can confirm that there are no rendering issues on various devices?

    I know Sprie Fonts renders faster than Text but is the text quality good on all devices?

  • Sprite fonts are... sprites, so, it renders just like any other sprite. It works perfect.

    The only "issue" is to set the right space between characters because the space between an "i" and an "l" is not the same between a "w" and an "m". You can adjust it in an event sheet, character by character. You'll just need to test your character space configuration with several diferent text.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Sprite Font Generator

    Wow! Cool, I didn't know that plugin.

    I'll try it in the next project even though in that plugin you can't adjust character by character and you can only do it globally.

    Thank you

  • Yup. I am using that generator. My only concern is regarding the quality. Cause in C2 and browser (preview) I see sprite fonts blurred, bad quality, but when I run project on my mobile then it is really perfect. But I guess GamerGon is right - sprite is sprite so I believe it's all about to generate high resolution SpriteFont and then scale it.

  • I didn't have quality problems on my projects because we usually create our own spritefonts with 128x128 characters

  • An how do you resize it in the project then? I've generated a white Sprite Font now with size of 72, which is 74x88px, and then when I use it in my project I have to resize it, so I use "scale" parameter. Problem is that when I resize it using scale then white color turns into blured gray color. I'm kinda stucked here... Is there any other way of resizing SpriteFont?

  • First,

    in the spritefont every character has to have the same size in pixels and power of 2... so 64x64, 128x128, etc...

    About the size inside the game... scale/size is the only way. With fonts of 128x128 I think is enough... I've never needed larger characters than that.

    Scaling up a spritefont will have the same problems that scaling up a sprite.

  • You can get round the spacing issue by using a font that is designed to be monospaced. This, with a bit of tinkering with the character spacing for the string overall, produces a reasonable result.

  • Thanks for help guys. It suddenly started to work after I generated spritefonts again. Maybe there was some generation glitch.

    So to wrap up I use spritefont generator mentioned above, and it works great, fonts are very sharp on mobile no matter how much I resize them (using scale).

    ps. Fonts are very sharp only on mobile, in C2 preview mode they are blured - but that is not my concern now, just mentioning.

  • I've had all kinds of odd issues with SpriteFonts especially when resizing them. I had odd vertical lines show up and other peculiarities. I think we will just eat the performance loss to use the nicer looking Text objects.

  • Sprite fonts are... sprites, so, it renders just like any other sprite. It works perfect.

    The only "issue" is to set the right space between characters because the space between an "i" and an "l" is not the same between a "w" and an "m". You can adjust it in an event sheet, character by character. You'll just need to test your character space configuration with several diferent text.

    GamerGon,

    Would you care to share how exactly you would adjust that in the event sheet? I am having issues with that very problem. In my case I have a timer that references a sprite font and if I adjust the distance between the characters (using "character spacing" set to a negative value) then I can get my "1"s and ":"s close to the next character but other, wider characters are then overlapping. I'm trying to find a balance but if I could manually set the distance between key characters then I would be quite happy. Any information you have on that would be most appreciated.

    Thank you!

  • E2GameStudios

    Would this help?

  • Thank you LittleStain. I will give that a try!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)