[Plugin] Spritefont (28th August 2012)

Post your completed addons to share with the community

Post » Sun May 06, 2012 11:38 pm

It's stopped happening since I changed the size of the font, however in the picture I linked, I had the same effect as he described.

I'll dig out the capx and pm you a link.

Essentially the 'flash' occurred each time I spawned an object (sprite) with an effect on ( in this case additive ).

Here's a link to the latest version, using the pixel font "bienvenu"

http://www.johnnysix.net/games/Bang/



Image
B
27
S
9
G
5
Posts: 487
Reputation: 11,939

Post » Mon May 07, 2012 2:15 am

BTW - if you're able to make use of this - I don't have the ability to save .ico format - but thought something like this would fit in with the new Scirra icon scheme.





[edit] - just found a website to do it online - www.convertico.com/


Ico format versionJohnnySix2012-05-07 02:19:29
Image
B
27
S
9
G
5
Posts: 487
Reputation: 11,939

Post » Mon May 07, 2012 7:41 am

[QUOTE=Mipey]
TIPS
1. Sprite Font can also use tilesets, not just font strips, basically anything that is a grid of images.
[/QUOTE]

@Mipey. Is it possible to load each font letter as separate tile? I could not find how to do this. I want to use fonts that are not equally spaced. Splicing each letter using a font strip does not work very well for the font I am using. simwhi2012-05-07 07:42:42
B
26
S
5
G
5
Posts: 151
Reputation: 6,279

Post » Mon May 07, 2012 9:07 am

@JohnnySix: That baffles me, I have no idea why would the spritefont flash whenever an unrelated object with additive effect would spawn. I don't know how to recreate this, either.

Guess I'll dig into the source code and attempt to work effects in. Also, thanks for the icon, it'll be used for the next release! :)

@simwhi: I want to keep the spritefont simple, loading by individual tiles would have introduced several drawbacks and complicate the already messy source :P I've used non-equally spaced fonts as well, basically I placed them manually in an image editor with grid enabled. A lot of work if your font contains a lot of glyphs, but only needs to be done once.

Right, guess it's time to look into those effects...Mipey2012-05-07 09:53:37
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Mon May 07, 2012 9:51 am

What happens if I load a tileset image instead of a charset? It would be the beginning of a tileset editor?
B
50
S
16
G
7
Posts: 59
Reputation: 6,365

Post » Mon May 07, 2012 9:52 am

Update: 7th May 2012
Revision 6

- added effects; this should force spritefont's own effects and prevent other objects' effects from spilling in. Hopefully.
- new icon! Thanks to @JohnnySix.Mipey2012-05-07 09:52:56
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Mon May 07, 2012 9:57 am

@pedro.thiers, you can use SpriteFont as a tileset editor too, yeah :) Some people have used it that way to create levels. But well, its primary purpose is as a sprite font!
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Mon May 07, 2012 9:58 am

nice =]
Double function! \o/
B
50
S
16
G
7
Posts: 59
Reputation: 6,365

Post » Mon May 07, 2012 2:23 pm

@Mipey. Thanks for the reply. I will try this out.
B
26
S
5
G
5
Posts: 151
Reputation: 6,279

Post » Mon May 07, 2012 7:48 pm

Was gonna say, for the kerning/spacing thing, without making it super complex, you could have an optional csv string property, with the widths of the characters in the same order, defaulting to monospaced as before if left blank.

For example with numbers :

Char set :

0123456789.-

Widths :

16,5,16,16,16,16,16,16,16,16,3,16

At least as a very quick and dirty workaround. :)JohnnySix2012-05-07 19:49:19
Image
B
27
S
9
G
5
Posts: 487
Reputation: 11,939

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: Vol6tmetr and 5 guests