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

Post and try out addons that are currently in development.

Post » Wed Aug 12, 2009 3:30 am

Ah, of course, can't quite get into the "each letter's a sprite"-mode.

And yeah, I'd much rather destroy balloons instead of making a system keeping track of which ones to use and keep like a couple around and pick ones that aren't currently in use, etc.
B
5
S
2
G
3
Posts: 234
Reputation: 1,818

Post » Wed Aug 12, 2009 5:55 am

Creating multiple of the same SpriteFont and they aren't Always set to a text still makes old ones stop showing text.

Side note, would Always showing a text be very processing-heavy when put in a game, considering it constantly creates and destroys 100+ sprites?
B
5
S
2
G
3
Posts: 234
Reputation: 1,818

Post » Wed Aug 12, 2009 7:51 am

[quote="konjak":398b18el]Creating multiple of the same SpriteFont and they aren't Always set to a text still makes old ones stop showing text.[/quote:398b18el]
what was that now?
like multiple instance of one spritefont object
and if the second one shows text, the first one stops showing text?
or one spritefont, and you tell it to showtext twice?
if it's the second one, yeah, it's like textbox, if you tell it to show something, it stops showing the last thing

[quote:398b18el]
Side note, would Always showing a text be very processing-heavy when put in a game, considering it constantly creates and destroys 100+ sprites?[/quote:398b18el]
no, shouldn't be bad
that's how scrolling works

also there's a trick if you ever start making long story scenes and you do get slow down

make a canvas

attach the spritefont to the canvas (there's an action to attach to an object)
Write Text(not show text) - absolute (not insert)
then

On Any Letter Written
Paste To Canvas
Destroy Sprite

On Last Letter Written - Clear Text

this would paste each letter one at a time on a canvas and then get rid of it
so there would never be more than one letter on screen at a time
you clear the text when you're done, so you don't accidentally try to make fontsprite access those sprites after you destroy them. I think I made it double check in most cases
but of course, trying to do something to a destroyed sprite would crash the game

this would get your whole paragraphic
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Wed Aug 12, 2009 10:04 am

What did you mean by:

"no, shouldn't be bad
that's how scrolling works"?
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Wed Aug 12, 2009 11:34 am

[quote="lucid":204t0gvd]what was that now?
like multiple instance of one spritefont object
and if the second one shows text, the first one stops showing text?[/quote:204t0gvd]

This one's the problem.
B
5
S
2
G
3
Posts: 234
Reputation: 1,818

Post » Wed Aug 12, 2009 11:49 am

[quote="Rich":25n11v8e]What did you mean by:

"no, shouldn't be bad
that's how scrolling works"?[/quote:25n11v8e]
thats how scrolling works in the plugin. it destroys and creates every time it moves.
i'll have a look into changing this, and see how much i'll have to change. i did the destruction/recreation thing when i first started the project, before i knew anything about object picking and how easily and efficiently i could store pointers to each sprite created, which it does now for other purposes, like "for each letter", and "pick current word" picking. i'll try to redo this aspect. i'm a little wary though, because these original poor design choices are deeply embedded in thw word wrap code, which is fairly complex.
now that its storing pointers though, it doesnt make sense to destroy and create every frame. but yeah, construct seems to have no trouble destroying and recreating a few hundred or even a thousand objects each tick

[quote="konjak":25n11v8e][quote="lucid":25n11v8e]what was that now?
like multiple instance of one spritefont object
and if the second one shows text, the first one stops showing text?[/quote:25n11v8e]

This one's the problem.[/quote:25n11v8e]
i think i have an idea why it's doing this.
should be an easy fix if i'm correct. i'll have a look. expect a fix in the next day or so.
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Wed Aug 12, 2009 12:01 pm

I'd definitely change that, seems unneccesary. If you're storing pointers to all the letters then you can just move them and update their position.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Wed Aug 12, 2009 3:22 pm

After using the plugin a bit I have a suggestion, I don't know how hard it would be to implement, tho.

At the moment all sprites are aligned by the top. Is there any way to make them aligned by their hotspot instead? It's a lot faster and easier to move hotspots than it is to resize the canvas and move the images.
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Post » Wed Aug 12, 2009 3:37 pm

Hi everyone.

I'll be using SpriteFont for my game, but was holding off on implimentation until it was safe to put it in. Last I know there rwas a warning that the current version might not be compatible with the eventual final version. Is that still the case or is it safe for me to begin using it in my game?

thanks
B
2
S
2
G
4
Posts: 124
Reputation: 1,698

Post » Wed Aug 12, 2009 3:47 pm

[quote="Arima":x7g9a1y8]After using the plugin a bit I have a suggestion, I don't know how hard it would be to implement, tho.

At the moment all sprites are aligned by the top. Is there any way to make them aligned by their hotspot instead? It's a lot faster and easier to move hotspots than it is to resize the canvas and move the images.[/quote:x7g9a1y8]
there is a set "y-offset" command that allows you to choose how up or down a letter is placed. i could also add a "automatically set y offsets to hotspot function." there was a reason i chose to ignore the hotspot initially, though i cant remember at the moment:), it wasnt for no reason.

[quote="Holymonkey":x7g9a1y8]Hi everyone.

I'll be using SpriteFont for my game, but was holding off on implimentation until it was safe to put it in. Last I know there rwas a warning that the current version might not be compatible with the eventual final version. Is that still the case or is it safe for me to begin using it in my game?

thanks[/quote:x7g9a1y8]

you can begin using it and be safe. all the main features have been implemented, and a have a decent understanding of how upgrading affects caps made with older versions now.
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

PreviousNext

Return to Work-in-progress addons

Who is online

Users browsing this forum: No registered users and 0 guests