RT @LunarRayGames: More future versions of enemies on today's Timespinner devstream! Pixel art and design! 1-4pm PDT every Tuesday at https… (Today)

@SaltyPepperG t.co/1dpxpaE6E5 (Today)

@MagpieMcGraw I see. Do you have a programming day job or do you only code as a hobby or whatevs? (Today)

@SaltyPepperG yeah I've gotten better at this over the years, but when my final tasks involve "talk to other humans" I shut down hahah (Today)

@TyrusPeace hmmm right yeah that makes sense. I wonder if I tied my chill out things to my projects more if it would help (drawing, etc) (Today)

Also I feel like I'm at the very end of Sky Sisters dev and the rest of it involves doing things I don't like so I'm procrastinating forever (Today)

@MagpieMcGraw right I have heard that actual coding time can be like only 2 to 4 hours a day for most people :o (Today)

@bmau_ro yeah I probably have weird data on this stuff. a lot of folks I talked to about time tracking track SO MUCH TIME compared to me x_x (Today)

@UndeadBarryGibb @SnugglePilot labor 2.0 (Today)

@Teknopants yeah totally but things don't get done waiting around for inspiration ya know? Why is making stuff so gosh dang difficult (Today)

@SnugglePilot dunno seems society likes that number a lot (Today)

@DrMelon It always seems like the mega successful artists and creators out there have super human focus powers~ (Today)

I want to be someone that can just work on the same thing all the time 8 hours a day every day but it just never works out for me. (Today)

Working on Sky Sisters this month has been incredibly draining so I'll do the irresponsible thing and goof around with a side project~ (Today)

@psysal hahah yeah sounds about right. I like how the anime advanced they started to adapt more of the actual game's rules. (Today)

@psysal YEAH I loved the anime and my friends and I got into "AS A JOKE" and it turned out to be really fun so we went crazy with it (Today)

@psysal uhh YEAH I played super competitively for a number of years and a friend from my locals won nationals in 2009!!1 (Today)

@psysal i hope you brought your exodia with you (Today)

@gritfish nope sorry been a long while since I've used it :[ (Today)

@Managore @MattThorson right just rotate your sprite 90 degrees and you're good (Yesterday)


2013 - 2 - 4 / 8:02 am / games

Dev Log: Some Bitmap Text

I guess I'll start calling these posts Dev Logs now? Yeah, that sounds good.

The latest thing I've been chipping away at is handling bitmap text in my Flashpunk extended framework thing. There have been a couple of people that have posted Bitmap Font classes but they didn't do what I wanted, and I'm way better at coding my own thing from scratch vs. trying to modify someone else's code to do what I want.

Right now my bitmap text secret technology can do some cool stuff, like three different align modes (left, center, and right) which sounds pretty simple but it actually took me awhile to think of the proper solution for lining up text in a certain way. I also have some colored text as you can see in that awesome screenshot, and the way I do that is pretty cool (I think.) My code for coloring text ends up looking something like this:

//make da bitmap text
var bmpText:BitmapText = new BitmapText("This text will be #1GREEN!!#0 Yeah.", Global.bitmapFont);
//define the color "1" as green
bmpText.defineColor("1", 0x00FF00);

You can see a little bit how it works. I can define colors, which are assigned to certain characters (any Ascii character can be used) and then I can mark colors with a special character like '#'. Text after that character will then be drawn with a tint of that color. It's super easy to do colored words with this system, but it makes some other stuff pretty difficult.

One thing I still haven't figured out is how to escape the special character. Like if I wanted to actually display a '#' in my string, I don't have a way of doing that right now. I wanted to have '##' just escape out to a '#', and I was trying some fancy stuff with regular expressions for awhile but... yeah, things have not worked out yet. This is something I can probably just tackle later though.

Bitmap text comes in handy for a few reasons, and I think I'll make a more detailed blog post about that at some point down the road!


2013 - 2 - 4 10:52 AM

Jake Albano

I assume you're looping through the string a character at a time at some point. Can't you just do something like this?

if (charAt(position) == "#")
if (charAt(position + 1) != "#"))
result += "#";

Obviously pseudocode, but that's how I generally handle escaping in situations like this.


2013 - 2 - 4 11:59 AM


In your code the second # would still change the color. ;)


2013 - 2 - 4 7:04 PM

Jake Albano

Well, yeah; obviously you would increment the position in the string so it would skip over the next '#'. I should have put that in there. :)


2013 - 2 - 5 6:51 AM


Yeah, I've tried a number of different ways but they all come with their own complications later. Like right now I'm having problems with typing out bitmap text character by character because of the color code escape stuff.

I was trying a simple technique of doing a string replace on "##" and replacing it with a random ascii character, and then when I hit that ascii character in the string I render the "#" instead. The problem then becomes that the internal length of the string is now one less than the given string because ## is translated into one character, and I use the string length to determine which character to type out next... maybe if I replace ## with two characters it will work... hm!


Post your comment!




Hi! My name's Kyle, and I make video games most of the time in Denver, Colorado. Here you will find my thoughts, games, websites, doodles, and other stuff like that. I worked on Snapshot, Offspring Fling, and a whole bunch of other games. I also created and maintain Otter, a 2d game making framework. If you want to get a hold of me use the form on the bottom of the page, leave a comment, or just tweet at me. I try to post three times a week. Thanks for stoppin' by! You're the coolest.

blog stuff






Do you want to make a Let's Play of one of my games, or a just a video featuring footage of my games? You have my full permission to do so! Even if you are monetizing your videos, you still have my full permission to use any footage from any of my games. Go for it!


Your message has been sent! Thanks :)