SpriteFont (v0.99.5RC) - new update, small bugfixes

This forum is currently in read-only mode.
  • Is it possible or will it be possible to make like parts of one text grab letters/images from a different source, so that you might have room for symbols or differently colored text in the middle of regular sentences?

    I love doing that. Back with MMF's Text Blitter I used to take its character map (the one, large image with all letters that 'Blitter then cut up automatically) and offset the image in the middle of sentences to ascii tables with differently colored text or symbols. Of course, this one doesn't work that way and instead much more comfortably supports variable width letters, but will there be or is there a way to "offset" or switch letter source in the middle of sentences yet?

  • there are alot of symbols you might never use in text like ~ or ^ or },], or |

    that you can replace with symbols of your choice

    as far as changing the color, you can easily cycle through and replace a word with a certain color tint

    like (assuming the sprite containing your letters is called lettersprite)

    For Each Word In Phrase
    compare currentword = fire
    [ul]
    	[li]lettersprite-tint = red[/code:1edec5fs][/li]
    [/ul]this would find any sprites making up the word fire in your paragraph, and tint them red
    
    also for symbols you could do something like (if you need every ascii character, and can't sacrifice any for special symbols
    [code:1edec5fs]if current word = "(~_^)"
    -for each letter
    --currentletter = "_"   <----the center underline in that little symbol
    ---system-create SpecialHappySprite at LetterSprite.x,LetterSprite.y
    --always Destroy LetterSprite[/code:1edec5fs]
    this would find any sprites making up the 'word' (~_^) and put your SpecialHappySprite in the middle of it, and destroy the original sprites making up the word (~_^)
    
    the currentletter, and currentword exressions combined with the ForEachLetter and ForEachWord conditions allow you to do very powerful and flexible things
    you could also change the size or position of certain words, only if they were in certain positions
    
    Set Text "fire! there is a fire in the house"
    For Each Word
    ---currentword == fire
    ------position in phrase = 1
    --------------make red
    
    would only make the first word red if it was fire, but not the other fire
    also, since they are sprites, you can do other things to them, like make them fade in and out, etc
    anything you can do to sprites;
    
    don't want to get too far off track here, but I'm not sure what you were trying to do so
    you can also do things the other way around, like
    
    if mouse is over LetterSprite
    ---pick current word
    ----if currentword = "hyperlink"
    -----tint red
    
    and lastly, if youyou had rpg dialog writing text letter by letter
    and you set your special little "press A to continue" symbol to be < let's say, and 
    you can use it as a cool icon, and a control character
    [code:1edec5fs]
    write text "this is an RPG dialog. press a to continue<"&newline&"and it wouldn't get to this part until after you pressed a, if you added the code:<"
    
    on letter typed "<"
    pause writing
    
    on A pressed
    resume writing
    [/code:1edec5fs]
    so you could have classic rpg dialogs that scroll to a certain point, then wait for input before they continue typing
    
    that is all for today 
    glad to see interest around this again
    I'll finish it this month yall
    sorry again for the delay
    
    and then when your mouse was over a word
  • That sounds very good!

    The method I'm used to is having symbols or the like written that have no width that cause a color UNTIL I write the symbol I use to stop coloring, would that work?

    Same with pausing, I'd just use a zero width symbol several times over and it will be like a short pause, but then it continues (a hesitant pause, not wait for input).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • this isn't to tease

    there's just to much to explain in the update for me to just upload

    and not enough time before I leave to work to explain it now

    but I have the possible final version ready

    with all bugs and features currently on the tracker fixed or implemented, respectively

    also a few bugs that weren't on there

    I should be able to upload it tonight

  • <img src="http://dl.getdropbox.com/u/1013446/spritefont/Untitled.png">

    SpriteFont (Release Candidate)

    SpriteFont!

    includes simple "hello world" example cap

    this is a very large plugin with alot of features, and will require good documentation

    I will get to that as I can, however, for now you can play, and I check the forums several times a day, and I will gladly answer any questions you may have

    Changelog:

    BugFixes:

    • Fixed Set Write Speed
    • Fixed Several Crashes and Visual Errors with ScrollWrap
    • Fixed Conditions not displaying icon on EventSheet
    • Clear Text now clears text in memory as well as visually

    Features:

    • Set Character Range by String (so you can say "AGHIF#$52" if your sprite frames are out
    • of order, and you just want to specify the order with a string)
    • Set Text Formatting properties in properties pane
    • Scroll values now float instead of integer
    • Added private variables
    • Added pause writing, resume writing
    • No longer necessary to Show Text after a scroll to update view
  • Great job man! I've been waiting for an update for this so that I can add it to my game. I already have a font ready to go and I'm working on it right now. Thanks a lot for making this!

  • omg omg OMG!

    thanks for adding the set characters by string feature. Also, does the plugin work with 98.9

  • Wow this plugin works REALLY well. One problem I've come across though...is there any way to make sure the font draws at a rounded number position? Sometimes my font looks nice and crisp, other times its really blurry and I'm guessing its because its drawing at like (50.3, 70.1). Thanks!

    edit: Found another bug. The bitmap font scrolls with the screen even when put on layers that have the Scroll Rate turned off.

  • omg omg OMG!

    thanks for adding the set characters by string feature. Also, does the plugin work with 98.9

    no prob. I believe it does work with 98.9. although I haven't tested it with 98.9

    this is built with the 98.9 sdk

    Wow this plugin works REALLY well. One problem I've come across though...is there any way to make sure the font draws at a rounded number position? Sometimes my font looks nice and crisp, other times its really blurry and I'm guessing its because its drawing at like (50.3, 70.1). Thanks!

    edit: Found another bug. The bitmap font scrolls with the screen even when put on layers that have the Scroll Rate turned off.

    thank you lou. could you show me a cap with the bluriness?,I wasn't able to reproduce it

    I tried setting scroll to +0.5 pixels every 500 milliseconds, to make sure it was drawing not perfectly on a pixel, but if I looked closely I could still see each pixel crisply

    as far as the scrolling goes, when you choose font sprite, it asks you which layer to draw the sprite font on, so thats where you choose which layer it should be on

    EDIT: new version is up. you no longer have to set the layer manually

  • Yeah I think for ease of use it should default to where the object is. Better to drag and drop, than go back and forth between layout, and events.

  • yeah it's fixed already newt thanks. I realized just after I asked, it doesn't make sense to have to set it manually :

    99.1 changes

    No longer necessary to set layer manually. sprite font draws the sprites on it's own layer

    scroll values are floats now...forreal this time

    font page has current link, too, but:

    SpriteFont!

    davi, uber, I answered your posts back on page 4

  • This is a fantastic plugin, thanks!

    I guess it might be hard as I assume it keeps creating the letters every loop, but wouldn't it be possible to order the letters to always be above the plugin object rather than above everything on that layer? Right now I tested a multiple speech-bubble thingy and when they overlap the text from the one below is still above the bubble that is topmost, etc.

  • Thanks for updating so fast lucid. I'm pretty sure I had set the correct layer set up, but I'll try it out with the new version when I get home from work. Also I'll make a cap to see if i can reproduce the blurriness later today. I was using a small pixel font with the aliasing of the layer set to point if that helps any.

    Edit: OK I recreated it during my lunchbreak and found the solution to both problems. I was creating a spriteFont object on the menu layout, then when you enter the game, I was creating a second one for a cinematic. I guess I forgot to set the sprite to use for the cinematic one, but somehow it still worked because it was writing the text. However the font was blurred and it was drawing on the wrong layer. Once I set the sprite to use for the cinematic one, it fixed both problems.

    Thanks for looking into it.

  • i was just about to reply when i saw your update uberlou. so that fixed the blurry pixel thing, too?

    either way, im glad you brought it up. having to set the layer was an unecesary and unintuitive step anyway.

    konjak. i didnt give much thought to zordering to be honest, but thats a good point. i think what i'll do is try(havent messed with zorders stuff yet so i dont know how involved it is) to add an option to position the letters just above the fontsprite object. i say option, in case someone wants to have some fancy zordering instead of having it behave in the normal way

    for now though, you should be able to use the "for each letter" condition and do any zordering you need to your sprite

    the fontsprite object keeps track of all the sprites it creates, so if you call a for each letter/word condition you can do actions to the sprite you chose, and it wont affect sprites from a different fontsprite object, even if you're using the same sprite for both.

    i think my phrasing just there was a little confusing,but my break is about to end at work, so just reply back if that made no sense.

  • GET IT HERE!

    changelog

    added: Set ZOrder of Text to SpriteFont : option to make text obey ZOrder of SpriteFont object

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