[Plugin] Spritefont (28th August 2012)

Post your completed addons to share with the community

Post » Wed Feb 20, 2013 8:16 am

This wasn't working for me about a week ago, been using loads of work arounds. Cocoon did do an update to the app about 4 days ago, so it could have been that. What's the performance like on cocooonJS?
B
24
S
11
G
5
Posts: 140
Reputation: 5,004

Post » Thu Feb 21, 2013 6:38 am

So is it 100% working with the new CocoonJS update? Because someone said that the the game loaded but the font was displaying a black box instead of the numbers/letters.
B
63
S
23
G
17
Posts: 254
Reputation: 14,342

Post » Thu Feb 21, 2013 8:03 am

I can confirm that Mipey's example files do load on my iPhone 4 using cocoonJS. So looks like this is now an option for CocoonJS (Good Job Ludei)
B
24
S
11
G
5
Posts: 140
Reputation: 5,004

Post » Thu Feb 21, 2013 10:12 am

@labithiotis Good one! im not looking a workaround to support bitmap fonts in CocoonJS :D
B
95
S
25
G
20
Posts: 3,052
Reputation: 22,613

Post » Mon Feb 25, 2013 10:51 am

Hi friends. All bug occurs if SpriteFont put in Family and look at it in Opera?
B
9
S
3
G
1
Posts: 29
Reputation: 2,207

Post » Wed Feb 27, 2013 1:30 pm

Everybody's working?
B
9
S
3
G
1
Posts: 29
Reputation: 2,207

Post » Thu Feb 28, 2013 2:01 am

Tried out this plugin, like what it does except one minor thing.

My project ( https://googledrive.com/host/0B7mHJO1CK--NN1hxV2IxWnM3dTA/gametest2.html ) is currently setup to use it for displaying test variables, but will also be used for generic text. Tileset is 8x8, spritefont is 8x8. Gametest2.html has an iframe set at 3x scale of the original.



The problem I'm running into here is that the scaling isn't exact at integers (x2 x3 x4 scaling) as it gets distorted a little (Some letters have 2 tall "pixels" instead of 3 tall), and the upper-right section shows 1 pixel beyond what it should for it's position. I have "Force Point Sampling" on but it doesn't do anything different.

I tried it manually with using the "Text Scale" function as well as with the layout interger scale function, produces the same result.

The best I was able to get it was at 1.025 text scale, but even that has incorrect scaling.


Is there any work around for this or would I have to wait for the plugin to update.

Edit: Figured out a work around

SpriteFont Text boxes as big as they need to be:

Scaling issues

Spritefont Text boses way bigger than they need to be (at least 160x144, my layout size)

No scaling issues

For some reason the size of the SpriteFont box affects the scaling of the spritefont itself.

Edit2:
After playing around with it, seems that even though it's properly scaled 1x with a larger box, I had to make the box even larger to have it properly scale it's resize. For 3x size I had to make the textbox 320x144Thndr2013-02-28 20:41:17
B
15
S
4
G
4
Posts: 294
Reputation: 3,225

Post » Thu Feb 28, 2013 10:12 pm

@Thndr: unfortunately I am no longer maintaining the plugin, as it's gotten beyond my capabilities. I've not worked on it in quite a while, so all I can offer right now is advice.

- try to keep at least 1 px empty space on borders within individual tiles
- it is safe to make object size larger than what you want to display; in that case, control the displayed size via properties (e.g. fixed width)

See if that helps.
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Thu Feb 28, 2013 11:04 pm

Yeah, just going to go with larger objects. Doesn't really do much but clutter up the layout screen. Pretty easy to manage how much text it shows with the inherent properties.

By 1 pixel border, do you mean if I have 8x8 tiles, try to have the letters be mostly 7x7 to have 1 px of vertical and horizontal? If so I already have that done.
B
15
S
4
G
4
Posts: 294
Reputation: 3,225

Post » Fri Mar 01, 2013 12:47 am

Yeah, that should to the trick. I didn't really have such small tiles in mind when I developed the plugin, I was mostly working with larger tiles of variable sizes, but not that small, so I never noticed those issues you're having now. Sorry about that!
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 3 guests