Taking Suggestions for Bitmapped Font object

New releases and general discussions.

Post » Mon Jun 15, 2009 12:41 am

[quote="newt":195j9mf6]This might sound a bit weird, but wouldn't the effects like swirls, zigzag, etc be better in a behavior you could attach to any object? I'm thinking the behavior could run off of for each object(ordered) in a family. Then the behavior could have several types of movements built in.[/quote:195j9mf6]
it would be easier to just build them into the plugin, but that would also be limiting, since I would be deciding what things you could or couldn't to do with your text.

but if you give me an example of something you'd like to see text do, I can show you how it's easy to do with very few actions, conditions, and expressions.
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Mon Jun 15, 2009 12:43 am

sorry for the repost, but it's on second page now, and no one would see this :wink:
it's still a little ways off, mostly because I'm busy...it really doesn't take too long to make a plugin

these are the features that will go in, if all works out:
actions:
[list:2gr05k1y][*:2gr05k1y]choose sprite, there won't be any special setup options, because splitting up tiles, and importing several frames, is very easy with the builtin features in construct, so you import your font sprites into one animation in construct
[/*:m:2gr05k1y]
[*:2gr05k1y]Set Animation Range: here you will be able to set up a range of characters to go with a range of frames, so if your font only has 0-9, and a-z, you would call this action once for each range, you choose which animation frames go with which range of characters [list:2gr05k1y][*:2gr05k1y]Frame Start[/*:m:2gr05k1y]
[*:2gr05k1y]Frame End[/*:m:2gr05k1y]
[*:2gr05k1y]Character Start[/*:m:2gr05k1y]
[*:2gr05k1y]Character End[/*:m:2gr05k1y][/list:u:2gr05k1y]
[/*:m:2gr05k1y]
[*:2gr05k1y]Set Spacing: this will set how far the next character will be placed from the last, you will be able to set whether the space is from an imagepoint or from the edge of the sprite[list:2gr05k1y]
[*:2gr05k1y]from imagepoint/from edge - edge is default[/*:m:2gr05k1y]
[*:2gr05k1y]all / per character - apply spacing to all, or override "all" setting for one character -
decides how far the next character will be from it[/*:m:2gr05k1y]
[*:2gr05k1y]spacing - a number, 0 would be touching, negative positive corresponds to left/right number of pixels offset [/*:m:2gr05k1y][/list:u:2gr05k1y]
[/*:m:2gr05k1y]
[*:2gr05k1y]set wrap width - set the width the words wrap in. I will do my best to follow any wrapping conventions I'm aware of, but I don't have the time to research, and I'm not an expert on formatting, but I did read yours arima, and that will be observed
[/*:m:2gr05k1y]
[*:2gr05k1y]set display width - this is to be able to put your text into a box and scroll through it, it will make some of the other actions possible, and save the user from having to make a mask everytime they want to do this
[/*:m:2gr05k1y]
[*:2gr05k1y]set alignment - left/right/centered
[/*:m:2gr05k1y]
[*:2gr05k1y]set justified -
[list:2gr05k1y][*:2gr05k1y]on/off[/*:m:2gr05k1y]
[*:2gr05k1y]method[list:2gr05k1y][*:2gr05k1y]between word spacing - justify the normal way, by spacing words apart[/*:m:2gr05k1y][*:2gr05k1y]per character spacing- justify by spacing each character[/*:m:2gr05k1y][*:2gr05k1y]by character width - justify by setting the width of each character[/*:m:2gr05k1y][/list:u:2gr05k1y][/*:m:2gr05k1y][/list:u:2gr05k1y]
[/*:m:2gr05k1y]
[*:2gr05k1y]attach to object -sets height and width to an object
[list:2gr05k1y][*:2gr05k1y]border left[/*:m:2gr05k1y]
[*:2gr05k1y]border right[/*:m:2gr05k1y][*:2gr05k1y]border top[/*:m:2gr05k1y][*:2gr05k1y]border bottom[/*:m:2gr05k1y][/list:u:2gr05k1y]
[/*:m:2gr05k1y]
[*:2gr05k1y]set all/per character width Absolute/ or ratio (to the original character size)[/*:m:2gr05k1y]
[*:2gr05k1y]set all/per character height Absolute/ or ratio (to the original character size)
[/*:m:2gr05k1y]
[*:2gr05k1y]set capital/lowercase size - allows you to make capital of lowercase letters, by adjusting the size ratio x/y[/*:m:2gr05k1y]
[*:2gr05k1y]set scroll x/y ( relative/absolute) - offset from phrase position[/*:m:2gr05k1y]
[*:2gr05k1y]set rotation (of entire phrase)[/*:m:2gr05k1y]
[*:2gr05k1y]set position (of entire phrase)[/*:m:2gr05k1y]
[*:2gr05k1y]set circular x/y (on/off) - this makes it so a letter scrolling off the left side, comes back out the right side if you scroll beyond the end of the phrase[/*:m:2gr05k1y]
[*:2gr05k1y]set phrase width - sets the width ratio of the letters, so they all fit into this width[/*:m:2gr05k1y][/list:u:2gr05k1y]

now I will have to be careful with the naming of actions, because you will be able to do this per character meaning "a", so every "a" is set to a certain width or per character, to be used with the following condition:
[list:2gr05k1y]
[*:2gr05k1y]For each character in phrase - which could do all of the above functions, but per character in phrase (in order regardless of what letter it is), this will make it possible to do all the crazy stuff you'd want to do with bouncy swirly, zigzaggy text, text wrapped in a circle, it's up to you to come up with the algorithms, using the actions, and the following expressions: (most of the "get" conditions will also have a "get previous" and "get next" but I don't want to write all that out)
[/*:m:2gr05k1y]
[*:2gr05k1y]get character x/y[/*:m:2gr05k1y]
[*:2gr05k1y]get character position in phrase [/*:m:2gr05k1y]
[*:2gr05k1y]get character distance from left/right/top/bottom edge (of text display width)[/*:m:2gr05k1y][/list:u:2gr05k1y]

oh yes, and of course actions to put the text to the screen :)

please let me know if I missed anything.

edit: davio added request for outputting character by character one at a time, and a corresponding "on character typed" condition to add typewriter sounds for instance

also, letting users use your text as an edit box, is a feature I plan to add later, after a stable build (of this plugin)
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Tue Jun 16, 2009 6:18 am

Please! spacing specified by character PAIR as you wouldn't place AM the same distance apart than AV
that's kerning, by character pair!
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Tue Jun 16, 2009 7:38 am

Well, that all depends on the font. But yeah, it would be nice.

Most games have monospaced fonts or fonts that are spaced solely on character width, so such a feature would be quite the perk.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Tue Jun 16, 2009 8:26 am

would you be able to load an external image during runtime?
B
134
S
65
G
16
Posts: 1,765
Reputation: 19,188

Post » Tue Jun 16, 2009 3:07 pm

This plug-in will be a life saver for me. BTW, does Construct support symbol characters greek/arabic/chinese?
B
2
S
2
G
4
Posts: 259
Reputation: 1,968

Post » Tue Jun 16, 2009 3:18 pm

[quote="alspal":245v4mvd]would you be able to load an external image during runtime?[/quote:245v4mvd]
yes, but you will do that by changing the sprite.
the bitmapped text will act kind of like a behavior on the sprite you choose, but logically, it makes more sense as an object.

[quote="Madster":245v4mvd]Please! spacing specified by character PAIR as you wouldn't place AM the same distance apart than AV
that's kerning, by character pair![/quote:245v4mvd]
I'll look into that, but if so it would be basic, something you can setup with an action, like "override spacing for character pair" action, and then all future spacings in that cap would be overridden. I'm not writing Microsoft Word here :mrgreen:
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Tue Jun 16, 2009 10:23 pm

[quote="Madster":27kfjfj8]Dude! nice!

Okay my requests for bitmapped font (brace for wall-of-text):
-Unicode support! I need 's and and I'm sure others will need other codes. Unicode is nicely mapped too so it's no biggie I think. Just index using UTF16 as a key.[/quote:27kfjfj8]

ok mad, or anyone who reads this first, and knows the answer
tell me how people normally input unicode characters in game, and this shouldn't be a problem at all.
I tried googling this, but the codes I input using the first method or two I found don't seem to correspond with the unicode characters I expect them to

so yeah, who knows how people who give themselves all L33T names in games normally input the special unicode characters not on the keyboard.

thanks, and btw, the actual coding has begun, I will probably post a few alpha exe's as I go along
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Wed Jun 17, 2009 4:11 am

alpha build screens:




amazingly, i made this entire 3 character font set in the construct sprite editor in just a few seconds.

as far as the plugin goes, the hardest part is done. the rest is just to make it more flexible and powerful.

hopefully tommorow(thurs) night i will have the beta build for whoever wants to test it
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Wed Jun 17, 2009 4:26 am

Looks very promising!
B
134
S
65
G
16
Posts: 1,765
Reputation: 19,188

PreviousNext

Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 3 guests