FLEE!, a simple flash game
May 24, 2009 11:05 AM   Subscribe

FLEE!, a simple flash game
I'm teaching myself AS3/Flash, and this is my first attempt at a game. It's very simple, and has a combinatoric soundtrack based on nine improvised counterpoint-ish things I recorded yesterday.

AS3 is pretty great so far, but it's a damned maze getting used to the event handling and display list and focus modeling stuff, so I did a lot weird hacky things I probably shouldn't have. But it seems to work, more or less.
posted by cortex (25 comments total)

Fun. I've been playing it for a while, and it's pretty addictive. One minor thing: you should turn the selectable option off on the text. It's a bit weird to get a text cursor when you mouse over "game over."

Let me know if you need help grokking anything. I program AS3 for a living. The event handling is actually quite logical and consistent once you get used to it (which is a nice change from AS2, in which event handling was a total mess). The display list stuff is also very consistent.
posted by grumblebee at 12:30 PM on May 24, 2009


Nice. I especially like the combinatoric soundtrack. Two minor issues:

s/one other/one another ?

Also, ZXC 123 doesn't line up with the above rows of keys for me on the screen where the controls are displayed. Firefox 3.0.10 on linux.
posted by benign at 2:42 PM on May 24, 2009


grumblebee: duly noted. I'll give that a shot. Haven't really wandered into cursor management thinking at all yet, but that had sort of been itching at me as a little weird.

benign: oh damn on the first thing. Will fix shortly. As for the alignment not sure what's up; my method ("use a _typewriter font family") is pretty unscientific, and I suppose it could fail badly in some situations. Can you get me a screenshot if you have a chance?
posted by cortex at 3:03 PM on May 24, 2009


textfiledName.selectable = false;
posted by grumblebee at 4:04 PM on May 24, 2009


Yep, found and fixed for all the TextField elements in the game, I think.
posted by cortex at 4:36 PM on May 24, 2009


It sucks to be killed by teleporting directly into a robot. That's my only Tsk.
posted by barnacles at 5:34 PM on May 24, 2009


Here's the screenshot. Now that you mention it though, I see that there's nothing typewriterish about the font that I'm seeing at all, so maybe I'm missing a font (or flash can't access one on my system) and that's causing the display problem.

It does suck to be killed by teleporting directly into a robot, but I think it's a pretty fair risk for teleportation to have.
posted by benign at 6:06 PM on May 24, 2009


Yeah, benign, it looks like it's just not loading a fixed-width font. I'll need to look into either finding a more foolproof way of making that happen automagically or just embed a font into the SWF itself, I guess.

Technically, you can't teleport directly into a robot. That would indeed be bullcrap, and your teleporter is reliable enough that it will only take you to empty spaces. Unfortunately, sometimes empty spaces are right next to angry, fleet-footed robot villains, and teleportation is disorienting enough to slow you down for a moment...

Really, if teleportation was adjacency-proof, the game would be an automatic win: just lean on the teleport key.
posted by cortex at 6:21 PM on May 24, 2009


You can embed fonts by selecting a text field with the font you desire and hitting the 'embed' button in the right side of the properties panel. Select whatever subset of the font you'll actually need and you're done.

Not bad for a first effort! Now try Pac-man. *grin*
posted by egypturnash at 7:41 AM on May 25, 2009


Now try Pac-man. *grin*

Heh. After I spent a couple weeks several years ago implementing both ncurses and GL clients for a Sokoban engine, only to realize after that was done that I really don't even like Sokoban, I've made myself a rule that I can only build games I genuinely enjoy playing the hell out of. Pacman's nice, but it doesn't pass that rule.

I ended up jumping into AS3 last week after catching up on JHarris' (fantastic) @ Play column over breakfast and developing a sudden, powerful recurrence of my old desire to write a Roguelike. That probably shouldn't be the next thing I do—I've got a lot more to learn about AS3 and a lot more dust to blow off my OOP and design chops before I'm ready to tackle something large—but that's definitely the main goal at this point.

The question of whether anyone has done a Flash roguelike is something I ought to explore, in fact.
posted by cortex at 7:58 AM on May 25, 2009


Interesting. Would you try to make it look retro, like a ascii game, or would you make more up-to-date graphics?
posted by grumblebee at 8:46 AM on May 25, 2009


I've always liked the classic RL console "graphics" approach, so I'm inclined to stick with that as a base aesthetic, though doing it in Flash would certainly give me some flexibility to mess with that a bit—maybe do it classic text style but incorporate some subversive graphical/animation splash in spots where ASCII animation never really sold it in e.g. Nethack. Projectiles always looked kind of hurky-jerky in Nethack, for example.

Walking the line there by, like, doing smoother and more complicated animation but using text characters as the raw graphical elements for same would be neat, for example. A wand that fires a cluster of asterisks that then scatter like a bursting firework on impact and fade out? Whee!

Making text characters the core graphics also reduces art development time considerably, which is a plus. Heh.
posted by cortex at 9:21 AM on May 25, 2009


Here's an idea off the top of my head: load in the graphics from an XML file. If no graphics are in the XML, or if the XML file doesn't exist, use text characters. That way, users can skin the game however they want. This would be trivial to implement, as AS3 makes working with XML a cinch.

If I were doing this (with or without skinnable graphics), I'd fake the console, using graphics that look like text, rather than actual text. It's much easier to manipulate graphics in Flash than text. Though it would be interesting to make a giant textfield and adjust the ascii chars in it.
posted by grumblebee at 10:01 AM on May 25, 2009


Heh, yeah, I think simulated ascii rather than an actual textarea or whatever is very much the way to go. Characters as default skin, custom skinning via a loadable config file is a good idea, definitely.
posted by cortex at 11:20 AM on May 25, 2009


Really, if teleportation was adjacency-proof, the game would be an automatic win: just lean on the teleport key.

Ohhhh, yeahhhhhhhhhh. Duh.
posted by barnacles at 12:52 PM on May 25, 2009


251 is my best so far. The difference between a 2-digit and a 3-digit score seems to be judicious shield usage and good luck with the teleporter. Nice job on the game!
posted by sleevener at 10:28 AM on May 26, 2009


Hm, what if you had to charge up the teleporter each turn? So, something like only every 5 moves you could teleport, and when it did teleport, it was adjacency proof? You could have a small "recharge" bar on the bottom that made it clear you were x moves away from being able to use it again.
posted by spiderskull at 11:16 AM on May 28, 2009


This dosen't seem to work in Internet Explorer. I'm at work at the moment, so maybe it's just my work computer, but Flash has worked on other sites before. I'll check this out again when I get home.
posted by Effigy2000 at 5:03 PM on May 28, 2009


Yeah, worked first time in Firefox on my home computer. Anyone else using IE having the same problem?
posted by Effigy2000 at 4:03 AM on May 30, 2009


Flash is supposed to work the same way in all browsers. Every once in a while, Adobe introduces a bug in just one browser plugin, but that's rare. Effigy2000, when you're back at work, check the plugin version in IE. You can check this by right-clicking any Flash movie. My guess is that cortex published for Flash 10 and your IE is running Flash 9 or 8.
posted by grumblebee at 6:15 AM on May 30, 2009


Yeah, I think I had it (by default) to target Flash 10.

It works fine in IE7 on my PC, but I will acknowledge I didn't really test it around on multiple machines ahead of time since, hey, virtual machine and bytecode and all that jazz.
posted by cortex at 7:12 AM on May 30, 2009


By the time you finish your Roguelike, pretty much everyone will be using 10. The penetration is already in the 60%s.
posted by grumblebee at 9:44 PM on May 30, 2009


Yeah, turns out the work machine is using Flash 9. So there you go!
posted by Effigy2000 at 4:01 PM on May 31, 2009


263 level 9

(and linux, flash 10b as a data point saying it works for me)
posted by chrisamiller at 8:55 PM on May 31, 2009


I remember playing this a long, long time ago as Mummies. I think it was maybe one of the included demonstration games with QBasic or something like that, back in the DOS days. No teleportation there, though.
posted by alexei at 1:15 AM on June 14, 2009


« Older AERO Education Finder...   |   Eight Months in the World... Newer »


You are not currently logged in. Log in or create a new account to post comments.