Display text character by character with bitmap font

This forum is currently in read-only mode.
From the Asset Store
Creepy Sprite Font suitable font for your Dark/Horror/Halloween games.
  • If I'm not mistaken something like the Text Blitter extension from MMF is already requested for Construct. And I'm really looking forward to this. But in the meantime I came up with my own workaround. I don't think it's very elegant, but works on a basic level.

    Just try the cap. You can type any text inside the edit box and by clicking on the "Text it!" button it will be displayed character by character in a custom bitmap font. Well not ANY text, since I only included the letters from A-Z. Full stop, comma, exclamation mark and question mark will work as well. No other special characters, hell I didn't even include numbers so far (yes I'm lazy). But you can add any character you want quite easily. I hope my event comments are satisfactory.

    If you have a better solution please let me know. I'd really like to see this being improved. I already thought that I probably should have used a single sprite with different animations or frames for all the characters, but right now I'm happy it works at all (also regarding the fact that at first I had no clue how to do this).

  • That's a pretty cool example. I managed to remove 25 events(almost all of the letters) to make it more efficient and easier to sort through. All I had to do was replace all of those with one "Create object by name". It makes it a whole lot more efficient. There were a couple other changes to make this work right, so here's the modified CAP: Modified text display engine.

    Also, just to keep in mind, obviously special characters can't be created like this since you can't name some of them properly.

  • Very nice. I must have been blindfolded, never even noticed the "create object by name" action before. Embarrassing

    But I noticed already there was a little problem with the space between characters ("o" not displayed correctly when trying "hello world!"). Will have a closer look at this.

    But many many thanks for pointing this out!

  • Okay, fixed it. Now it should work properly. There was a problem with the use of the family "friendly" to get the width. Now it's checking if the DrawHere Object is overlapping friendly, so the width will be set correctly.

    EDIT: Oh no now line breaks mess it up for some reason. Too bad. Needs a little work still.

    EDIT2: Fixed now too, DrawHere was simply too big and therefore overlaping the characters in the line above as well after a line break. My bad.

    It really really should work now hehe.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • that attachment doesn't work?

  • I just downloaded the attachment myself and tried it out. Worked fine. What exactly doesn't work for you?

    EDIT: I noticed a minor glitch and did a slight update with some other small changes.

    EDIT2: Was still glitchy, should be done now finally.

  • This is pretty slick.

  • Nice engine!

    How about using a single sprite holding all letters in an animation? You could have a zero-speed animation so it doesn't change frame, and use frames 1-26 as letters, etc. Then you only need one object.

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