Using Tiled Background for Image fonts

This forum is currently in read-only mode.
From the Asset Store
Horror Halloween Pixel Art Sprite Font Space Data included
  • Here is an example of the using image fonts with the Tiled background object. It uses the "set image offset" action to select letters from the image. The only requirement is the image has to be power of two height and width.

    http://dl.dropbox.com/u/5426011/examples2/imageFontpy.cap

    made in 0.99.96

    This is not intended to be a replacement of Lucid's Sprite font object. But it gives the advantage of being able to load a different font at run-time with a single load image action, and the ease of editing all the characters in one image.

  • Cool.

    I remember someone doing something like that with U, and V on a distort map.

    Guess you could probably do that with the offset, and pattern fx as well.

  • Ach. Recursive functions make my head hurt a bit. Other than that, this is pretty cool

    It took me about 10 minutes of staring at that code to figure out how the imageFont object placement worked... And I had no idea about how SetImageOffset can be used like this. Nice.

    I did notice a problem, though. For some reason, 'imageFont: Destroy' does not seem to be working, and the debugger shows a couple thousand objects by the time the message is fully displayed, and the number keeps quickly rising beyond that.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That's a nice method. I remember something similar done by lucid himself, before the SpriteFont object was even created. It didn't use Python at all though.

    Which brings me to the question why Python is being used here. From quickly looking at the script (and not being a Python expert at all) I do believe you could do this just fine by events only.

  • sad to say, maybe this method not maches to korean (hangul)

    same in japaness (nihongo) chiness (?)

    But it still can be a good method

  • Here's a non-python version with a different font for good measure:

    http://dl.dropbox.com/u/5426011/examples2/imagefont2.cap

    I originally was going to upload a non-python version like this but I had a random crash and lost the whole thing.

    Silent Cacophony

    This version no longer uses recursion and the objects do get destroyed now.

    EDIT:

    Here's where I'm getting the fonts:

    http://www.algonet.se/~guld1/freefont.htm

  • I like the non-python version best, and it fits perfectly into one of my ideas. Many thanks.

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