Strike Force Heroes 2
The explosive sequel to the hit game Strike Force Heroes!
3.94 / 5.00 10,428 ViewsObsolescence
Defeat the enormous mechanical beasts--and become one of them.
4.03 / 5.00 46,926 ViewsIs there any way to turn off anti-aliasing for a text field with AS3 code? Like, the equivalent of choosing "bitmap text" in the Flash IDE?
I can set the antiAliasType of the field to ADVANCED or NORMAL but there's no option for NONE. What's worse, there was no anti-aliasing before I embedded the font, but now that it's embedded I can't get the anti-alias to go away.
Anyone have any tips? This is really driving me nuts :/
Robots! Aliens! Upgrades! #1 game of Robot Day 2012! S.R.A.G. Resurrection
At 12/9/12 10:01 PM, NoLanLabs wrote: Anyone have any tips? This is really driving me nuts :/
try this
Programming stuffs (tutorials and extras)
PM me (instead of MintPaw) if you're confuzzled.
thank Skaren for the sig :P
At 12/9/12 11:30 PM, egg82 wrote:At 12/9/12 10:01 PM, NoLanLabs wrote: Anyone have any tips? This is really driving me nuts :/try this
That code sort of worked, but there's still a little bit of anti-alias I can't get rid of. I'm making a pixel art game so this is really messing up the look of everything.
I'm starting to think the only solution is to code my own text field and embed all the font's characters as separate bitmaps... :P
Robots! Aliens! Upgrades! #1 game of Robot Day 2012! S.R.A.G. Resurrection
look at the font. The font itself may be pixelated.
I assume you tried the "makePretty" function - use the second value, which is from 0 to 255 and see what works.
Programming stuffs (tutorials and extras)
PM me (instead of MintPaw) if you're confuzzled.
thank Skaren for the sig :P
It's not the font... this picture shows it before (left) and after embedding the font. Only after embedding does the anti-alias show up. And I tried the makePretty function, that was as good as I could get.
This Adobe document says "Embedded fonts are anti-aliased, which means that their edges are smoothed for easier readability." So I kind of think I'm out of luck.
It's so frustrating though that it looks fine BEFORE I embed the font... it's like Flash CAN do it, it just doesn't want to... :(
Robots! Aliens! Upgrades! #1 game of Robot Day 2012! S.R.A.G. Resurrection
Hmmm, I do not know if this is a terrible idea, but Im guessing you add this text to a bitmap or sprite? You could loop through and check every pixel in the bitmap. (or sprite's bitmapdata)
If the color of the a pixel is not alpha 1 and not white(or not the color of text), remove that pixel(change pixel to transparent). It will remove the excess, save time from making your own text field and importing each letter as bitmaps, but is not efficient.
At 12/10/12 11:48 PM, swishcheese wrote: It will remove the excess, save time from making your own text field and importing each letter as bitmaps, but is not efficient.
yeah, that's not efficient at all.
if you want to go that route:
copyPixels() to a bitmapData, then do as swisscheese said.
Programming stuffs (tutorials and extras)
PM me (instead of MintPaw) if you're confuzzled.
thank Skaren for the sig :P
At 12/10/12 11:48 PM, swishcheese wrote: Hmmm, I do not know if this is a terrible idea, but Im guessing you add this text to a bitmap or sprite? You could loop through and check every pixel in the bitmap. (or sprite's bitmapdata)
If the color of the a pixel is not alpha 1 and not white(or not the color of text), remove that pixel(change pixel to transparent). It will remove the excess, save time from making your own text field and importing each letter as bitmaps, but is not efficient.
I gave this a try and, as expected, it's ridiculously slow. Not a bad idea though.
It's probably just time for me to sit down, crank up the music, and make like fifty bitmaps for all the characters. It can't take more than a few hours.
Robots! Aliens! Upgrades! #1 game of Robot Day 2012! S.R.A.G. Resurrection
Here's something that does the looping through pixels stuff: https://github.com/Beeblerox/BitmapFont/tree/master/AS3-blit /src in conjunction with http://www.angelcode.com/products/bmfont/. BMFont converts the font file to a bitmap image (.png) and BitmapFont loads that in with a data file. I had mixed results, as it still looked pixellated to a degree, but when I looked at the ttf, it was pixellated there as well.
Look no further: http://msghero.newgrounds.com/