Plugins: show text by sprites

Post your completed addons to share with the community

Post » Sat Jun 08, 2013 1:07 am

Demo
- Put some text in textbox
The text are shown by sprites (not an image only, it's a sprite for each character), the sprite object has a sine behavior to control the angle.

Capx

Related plugins
Plugin: Layouter (Update: 2013/06/09)
Behavior: Layouter_Linear (Update: 2013/06/09)
Behavior: Layouter_Text


There are 3 parts for showing text by sprites
1. there have some sprites in a box -- Plugin: Layouter
2. arrange (set position, angle) these sprites -- Behavior: Layouter_Linear
3. set frame index of these sprites according to character in text -- Behavior: Layouter_Text

Steps of create sprite text:
1. put a Plugin:Layouter
2. add Behavior: Layouter_Linear, and Behavior: Layouter_Text into this Layouter object
3. add a sprite with text images.


4. set the properties of Behavior: Layouter_Linear, for example
- the delta distance is the distance between two characters.
5. set the character -> frame index mapping.


6. in event sheet, assign the character sprite (Behavior: Layouter_Text action: set character object)
7. Now you could show text by sprites (Behavior: Layouter_Text action: set text).


More.
- "Plugin Layouer Condition : Pick instances" could pick all characters in this layouter object.


----
Now, the Behavior: Layouter_Linear only could arrange sprites in a single line. I will try to add another arrange mode to support multi-lines, or a spiral mode might be interesting.
rexrainbow2013-06-09 17:32:35
B
107
S
25
G
225
Posts: 4,327
Reputation: 128,333

Post » Sat Jun 08, 2013 1:29 am

The Plugin: Layouter and Behavior: Layouter_Linear could be used to arrange sprites.

Here are two examples.
Card layout - linear
Plugin: Layouter + Behavior: Layouter_Linear

Card layout - cyclic
Plugin: Layouter + Behavior: Layouter_Cyclic

- click card.rexrainbow2013-06-08 01:38:13
B
107
S
25
G
225
Posts: 4,327
Reputation: 128,333

Post » Sat Jun 08, 2013 3:56 am

This is brilliant. Great work man!

Is there any way to loop through the string and change a property of a single character or whole word? Not sure how that can be done with events.

Also would it be possible to have a mode that spaces each character based on its size? That would more or less allow kerning - not all bitmap fonts use fixed size characters!Tokinsom2013-06-08 05:33:51
Image
B
234
S
27
G
13
Posts: 1,784
Reputation: 18,274

Post » Sat Jun 08, 2013 6:51 pm

@Tokinsom

Yes, it could pick all characters by condition. I had update the example demo. Now it will set scale of each character randomly.


I will try to make arrangement more better for showing text, thanks for suggestion.
B
107
S
25
G
225
Posts: 4,327
Reputation: 128,333

Post » Sat Jun 08, 2013 7:43 pm

Thanks! Just what i have looked for my project. Awesome
B
16
S
5
G
4
Posts: 74
Reputation: 3,301

Post » Sat Jun 08, 2013 9:40 pm

@rexrainbow rex, cool thing man.
btw, the correct term for "delta distance" is called Tracking, just an FYI.
B
18
S
5
G
4
Posts: 568
Reputation: 5,079

Post » Sun Jun 09, 2013 4:16 am

@rexrainbow
This is a great plugin! I have been using it today to replace SpriteFont and it works perfectly! I love the spacing options available, so much more flexible than spritefont.Zharzew2013-06-09 05:24:48
B
8
S
2
G
4
Posts: 64
Reputation: 3,199

Post » Sun Jun 09, 2013 4:44 am

@california
I agree, delta distance is not a suitable name in this case. I will try to fix it. Tracing is a great option. Or... Spacing?rexrainbow2013-06-09 04:45:21
B
107
S
25
G
225
Posts: 4,327
Reputation: 128,333

Post » Sun Jun 09, 2013 5:14 am

Thanks @rexrainbow, you rock. I suspect this will be getting a lot more active support. Though I think Mippey did fine job while he was working on it.

I plan to use this plugin extensivly as it is, but I have one request if you could. Would it be possible to get the font sprite going in a single plugin rather than spread across 3?
B
88
S
18
G
9
Posts: 2,455
Reputation: 14,928

Post » Sun Jun 09, 2013 5:31 am

@rexrainbow

Is it possible to align the text using an image point? I am noticing that it aligns to whatever edge you have selected (ie left). I am just trying to center some text and it is aligning just off center, because of this.

Thanks for any help! This thing is awesome! :)
B
8
S
2
G
4
Posts: 64
Reputation: 3,199

Next

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 7 guests