Will SpriteFont display number displays for me?

This forum is currently in read-only mode.
From the Asset Store
Forget about default textbox restrictions, you can create sprites atop of the textbox
  • Hi guys.

    My main project requires several number displays on the screen, as well as an LCD display for messages.

    I've created a custom LCD display with scrolling alpha-numerical characters, and I'm very pleased with it.

    I've now moved on to the several number displays that I need, and although I've got a few ways I could do this, I'm wondering if the SpriteFont plugin would save me some time.

    So first off, is it stable?

    I can't remember if it was ever finished (I don't think it's in the "finished plugin" section of the forums).

    Also, will it take values like a score and display it with the correct amount of sprites?

    Will it also trim numerical characters that aren't needed, like preceding zeros.

    In other words, if I want a 4 character display for the score, will it take a numerical value like 380 and display it with the custom font, right justified, and with the option of keeping the preceding zero?

    I'm going to have a play around with the plugin now in a blank cap, so by the time you read this, I may already have my answers, but please don't let that stop you sharing anything you know.

    I may not have all my answers, and it will be useful reading for anyone who searches the forum in the future.

    Thanks guys,

    Krush.

  • I would not consider it complete or stable

    and fixing it would require a complete rewrite as I was a complete newb when I wrote it, and as of now I do not plan to complete it in the near future. Also, since fixing it would require rewriting it, the new version would not be compatible with this one.

    what's strange is one of the reasons I couldn't fix it was because people were sending me caps with problems, but on my pc the caps ran fine.

    may be pointless, but to answer your question though, it has no functions to trim leading zeros and such, I believe there is a system expression that does. However, it does have a complete set of formatting functions like word wrap, right justified, etc.

    I believe someone created either an event based or python based implementation of spritefonts you might be able to find searching the forums.

    Also, I don't think it's unstable in general, but everyone used the spritefont in different ways, some people made multiple instances of one spritefont object, some people made multiple objects with one instance of each. Some people initialized them each time they switched layouts. Some people made them global objects and initialized them once. I believe there is almost definitely a working way to implement spritefonts that will work on everyone's pc, as you noticed no one ever complained of disappearing letters in the example caps. I just doubt you want your major project to be the guinea pig to figure out how.

    I once again repeat my apology to anyone who was counting on a finished version. It's just really infeasible with my new schedule and workload.

  • Thanks for the honest answer Lucid.

    I'll get to work on my custom version, so it's no problem.

    It's a shame though.

    This is the sort of thing that Construct should have out-of-the-box.

    Maybe if they ever get to Construct 1.0 they'll have included it by then.

    Thanks again,

    Krush.

  • Since its just numbers couldn't you just make up your own events using one sprite and 10 different frames?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Since its just numbers couldn't you just make up your own events using one sprite and 10 different frames?

    Yeah, I did something similar after I posted last night.

    But instead of using frames, I used directions 0-9 (and direction 10 for the blank one to use for preceding zeros), loaded the values into TextManipulator, and used each digit value to set the angle of specific instances of the sprite.

    So I now have my fully working LCD display for text and numbers, and 5 numerical displays, all working fine.

    It only took me an hour last night to get them finished, and I've managed to use my spare time today on graphics, so that was a bonus.

    Krush.

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