Demo Updates – BitmapFont Working!

I’ve updated my AS3 Starling TD Demo today. Thankfully, a very courteous person emailed me today letting me know that my Bitmap Fonts were not showing up if you didn’t actually have the fonts installed on your machine. Whoops!

Now that the BitmapFonts are actually working using the proper output from Glyph Designer, I think I need a few more tutorials on how to use that program. Let’s just chalk it up to my complete inexperience with Glyph Designer, but, I wanted to use the same font and have it be different colors in different TextFields. And the problem with this is that it seems if your font png that you export from Glyph Designer has a color (solid/gradient) that if you try to tell the TextField.color that you want this TextField to be white (0xFFFFFF) it tried to blend the color of the BitmapFont with white… never really giving me an actual crisp white that I wanted. Also, in some other case when I tried to assign a color to the TextField it seemed to think I was saying “I want no fill color at all” and you could see through the letters. I’m almost positive this is all my own fault.

I updated some of my posts to include the minor code changes I made to a few files. They’re mostly very small x/y/fontSize kinds of changes.

So what was the culprit? When I exported my fonts from Glyph Designer, I chose “.fnt (Plain Text)”. Well, I didn’t “choose” it, it’s the default setting. My eyes read “FNT” and my brain said “Yup! That’s the file type we want! Export it!” and really if I would’ve clicked the dropdown, there’s a “.fnt (XML)” that I should’ve changed it to. So now the *.fnt files are all actually XML. I’m really curious why Flash was totally fine with me taking straight plain text and typecasting it to XML without complaining. There was not even any semblance of or any structure whatsoever. I guess maybe in typecasting it to XML, it just returned null or an empty XML Object or something. Ooooh well… it’s all fixed now.

Remember, if you’re exporting from Glyph Designer for use in Starling’s BitmapFont, export from Glyph Designer using the “.fnt (XML)” Export Type option!

Thanks again Christophe for letting me know!


Starling Demo Almost Ready

Hey guys,
As of a few posts ago, I scrapped my by-hand blitting engine and decided to check out Starling. I’m happy to say that my little 2-map, 2-enemytype, 2-towertype demo is almost done. Tonight I was trying to finish up the map select screen, then I need to add JSON data for a second map, and I should have a tutorial up by early next week since I lose a day (thanks 4th of July) due to being social. It will be a full 2 level TD game. It will not be fun. It will not be balanced. But it will show a whole huge range of techniques and skills on how to develop a fully operational deathstar Game!

I’ve spent quite a while converting what I had into a Starling TD game engine. I’ll save more of my specific critiques for the individual blogs, but, Starling is kindof an ass sometimes. I mean, it works well when it works well… but TouchEvents can GTFO. I hate that I had to use them. They’re horribly inefficient. I used AS3 Sockets as often as I could instead of Starling (or Flash) events. There’s a ridiculous amount of OOP packed in here with a touch of inheritance and a bit of composition… just enough hierarchy, where useful, to pass a compsci 200’s class.

I possess the photoshop skills of a young walrus, so if you are a designer, feel free to scoff, point and laugh, and/or throw burritos in disgust, I have plenty of salsa. I have only the smallest amount of ego invested in the UI. When it comes to using this small little engine to make something bigger, then I’d care about the UI. But for me, photoshop is a time-suck playground. I have a great time in Photoshop, but there goes 4 hours and I made two crappy buttons… or got lost downloading brushes or fonts.

Anyways… I wanted to get the game about 95% done before blogging tutorials on it since last time I didn’t have a finished product and I ended up bouncing all over the place.


Tower Defense Logic Frustration – Wasted Bullets

The Problem

One of the biggest frustrations I’ve had while playing Tower Defense games over the years is… wasted bullets. The designers/developers of the game you are playing have meticulously (hopefully?) poured over tower fire/reload delay times, enemy speed/health stat charts scratched out and rewritten out several times in one of three legal pads that they keep around their house, because they never can seem to find the one they wrote in last.

Here’s the scenario. After a little proficiency with Game X, You’ve got your towers set up to where they are decimating wave after wave… just chewing through guys. And it happens so fast, you might not catch it. As this is my own particular pet peeve affliction, my stupid brain Watches for it; expects it. Take a wave of small, very-fast-moving enemies. They’re zipping right along the maze you’ve set up and the first few enemies arrive at your expertly configured, tactically sound, death field kill zone…

Read More


Oh… Starling does that too? And better?

So after spending the past couple of months building a blitting tile & game engine, I was almost finished last night with my Part 4 – Towers code. I had checked out Starling last year and remembered watching Lee Brimlow’s Introducing the Starling Framework video. Now that I had slogged through a lot of the heavy lifting myself in my own ZFEngine, I thought I’d go back through some tutorials and check out the Starling community as it is now.

Aaaaaand that was the end of ZFEngine. It was both demoralizing and exciting to see how I could use Starling to do exactly the same things I had done by-hand, except Starling does them cross-platform, and takes advantage of GPU-acceleration. I think I’m going to leave the other tutorials up, but I will be rebooting the series from the beginning using Starling. And the posts might actually be more polished this time 🙂


AS3 External XML Animation Scripting with TweenMax

Continuing my foray into preparing for collaborative Flash Game Developement, I’ve been thinking a lot about tools, how to set the project up to allow for a maximum variety of skill levels and skill sets to collaborate on the project while trying to keep Flash and Actionscript as much removed as possible.

In a recent post, I mentioned 3 things I had learned so far about collaborative game dev.  During one of my first “test runs” of the engine ( aka.. one of the ‘more successful failures’ ) I had realized that with a number of people working on the project, most of which have no idea what the inside of Flash looks like.  Which is great!  We all have our strengths, and because they dont know Flash, it just leaves more room for things that *I* dont know.

Read More


AS3 Date Class, PHP and Unix Timestamps

This is a real quick post about Unix Timestamps, PHP, and ActionScript 3’s Date class.  When creating a new Date instance, you can pass in a Unix Timestamp into the Date constructor.

var myDate:Date = new Date( unix_timestamp_from_php );
trace( myDate.toString() );  // Invalid Date

When I was working with this, I continually received Invalid date in my output window.  Looking into the matter, if you read’s time() function description and then taking a look at livedocs Date class we’ll quickly see the problem.

Read More


3 Lessons Learned in Noob Collaborative Game Development

I’m currently working on a 2D RPG Game Engine ( think Zelda or FinalFantasyII/IV ) in AS3. At the start of this project, as typical projects with friends go, it seems like a completely easy task. “Hey you know AS3… can you write us a quick game engine for this idea we have?” Sure… I’ve finished a simple little game before, I can totally do that.

Take 1:

From previous (limited) game dev experience I know I’ll need to set up a heirarchy of classes to handle Player Characters, Enemies, Scenes, Buttons, etc. So, thinking things out logically (read: noobishly (?) ) the first thing the team will want to see is going to be a the big-picture, visual framework. I sit down and start hammering out a SceneManager to handle scene changes easily. I’ve created an IZFScene interface to standardize the methods of all of my Scene objects for the SceneManager to manipulate. I’ve got my placeholder backgrounds that I tossed into the Flash Library from photoshop ( or MSPaint ) and I’m off and running creating smooth fade-in/fade-out transitions between scenes. The engine process looks like:

Read More


Useful Air Apps, Reviews, Links

For those of you who haven’t seen or come across this yet, I thought I’d pass this along.

AS3 Language Reference Air App

I came across that early last month and it has saved me quite a bit of time. If you have AS3 Livedocs as one of your most visited bookmarks, this app brings livedocs to your desktop so you can load it up when you sit down to work on a project and you don’t have to open browsers and wait for pages to load or even be online at all.

Read More


Internet Explorer 7/8 Transition Please?

February 17th was the date all TV’s in the US were supposed to all… something or other… I dont care.  Here’s the new Idea.  If Congress and … friends… in the FCC can mandate a day for you to lose the significantly inferior signal of analog cable, no matter how attached you’ve become to it… get ready… could we add a little sidenote into this legislation saying…

On the Same Day TV’s go Digital, If you have not joined the latter half of your decade by upgrading from Internet Explorer 5/6 to at Least IE7, you will be at risk for the following:

  • PC initiates self-format to erase your whole fail-worthy pc.
  • all social networking & email sites will cancel and ban your account
  • any amount of money currently held in a bank account you check regularly online will be forfeit to web developers and designers who have spent DAYS bent over backwards trying to accomodate and coddle your blatant disregard for the progress of technology by simply clicking “UPDATE NOW,”
  • you will be formatted from the face of the interwebz!!
  • polariods and hard copies of photos of cherished family members will go missing!
  • your car will develop a strange smell that you’ll never be able to put your finger on nor will you be able to ignore it!

I’m no writer nor politicial anything, so I’m sure someone removed from my current irritation can easily remove the hate from this fine, fine piece of legislation.  In the words of St. John Stewart, “Make it so, monkey paw!”


So I Jumped Out of a Plane…

I don’t think we realize how much we take for granted that the ground we’re walking on is actually right under our feet.

13,000 feet up… …it’s sortof … not… right under your feet.  And it wasn’t really until I was sitting at the edge of the open plane, dangling my feet into the 60-70knots wind and looking down at the ground that I thought, “Damn, was this really a good idea?”  But by that point it’s too late and you’re out the door and everything is silky smooth.

Read More


PHP & Biscuits, A Commentary on Frameworks, CMS’s, and haters

Any time I’m discussing coding with a few friends, I find myself feeling like a huge coder-poser for my love of pre-made frameworks and open-source CMS’s.  As I get around to showing a client or friend the backend administration area of a site, I always cringe when they love it because I know the discussion will roll around to me saying, “yeah, I actually didn’t code all that but used an open-source content management system.” And they respond, “…oh.. well neat…”

Read More