Dec092008
What with Thanksgiving and having to teach my Bible study last week, I haven’t had a whole lot of time for programming recently. Couple that with the fact that I’m psuedo-sick again, and it’s hard times for Actionscript. I needed some inspiration this past weekend, which I got in the form of browsing around some stuff the indie community is doing. Also, by firing up my Aquaria demo (which I never finished).
Anyway, check out the most recent build. I got some simple “alien” type guys moving around in there, and am experimenting with a background. I’d like to try making the background move in relation to the ship, but I’m not sure how the effect will turn out. Guess we’ll see!
Dec072008
A while ago I discovered a reproduction of the famous 1990 NES World Championship cart being sold by some chaps called RetroZone. It’s basically a collection of three games, Super Mario Bros., Rad Racer, and Tetris, with a built-in 6 minute timer. Collect coins in Mario, go the distance in Rad Racer, and get yo’self some lines in Tetris… then check your score. I would have loved to have actually played this original cartridge 18 years ago, but my family lived too far away from any of the major metropolitan areas that the World Championship tour went to. There was no way I could have convinced my parents to drive to Denver (the nearest city) for what would be essentially a 6 minute gameplay session (plus a few hours waiting around, I’m sure). If you have some cash, and want to experience some nostalgia, hit up RetroZone to purchase a copy of their reproduction. It’s a much cheaper way to play the experience without paying the $5k+ that the real carts are being sold for.
Nov242008
So, although Flash/Actionscript has super easy ways to scale and rotate a graphical object, when I loaded up a PNG for my spaceship and tried rotating it, it looked pretty ugly. Of course, I didn’t expect OpenGL-quality scaling and rotation, but I was surprised at how bad it looked. I soon learned that while you can easily import bitmap graphics into Flash (i.e. GIF, JPG, PNG) they don’t keep their quality if you scale or rotate them. In order to do that, you need to use vector graphics. The gist of vector vs. bitmap graphics is that bitmaps are based on pixels, which do not scale very well, while vector graphics are based on mathematical equations that can be scaled based on screen/size requirements.
One benefit of the Flash IDE is that you can easily create vector graphics and use them in your movie/program. In my initial research, it wasn’t immediately apparent if you could create vector graphics in another program and then import to Flash. Of course, you can do it with Adobe Illustrator, but how about some other (free) program?
Turns out that you can. Inkscape is a free vector graphics editor, which can output SVG file format images that can be directly imported via Actionscript into your Flash program. Pretty great! One of my goals for today is to learn the basics of a vector graphics editor… I’m fairly familiar with programs like Photoship/GIMP, but Inkscape seems to have some different paradigms that I’ll have to pick up.
Nov202008
I didn’t post my progress yesterday, so today you get two versions of my program.
Added an asteroid object and player bullets
Added collision detection, score display, and a rudimentary level manager
The player movement is still a bit weird.
Nov182008
In the breaks I have at work I downloaded and installed Adobe’s CS4 software and decided that I would make a quick little prototype game just to learn about ActionScript 3.0 and CS4. I did what I usually do which is to make an Asteroids clone. This time the theme would be one of my co-workers; I wanted to blow up his head, what can I say? *grin* The collision is a little funky due to my sloppiness/laziness but I’m satisfied for the amount of time I put into it; which I would say perhaps 12 hours over a week and a half. Most of the time was spent learning ActionScript idiosyncrasies. Here is the result:
For some reason the transparent pixels wouldn’t save when I uploaded to WordPress, so you get square heads.
CS4 has some interesting features. One can enter media objects onto the stage and bind them to a keyword and ActionScript file. Its seems cool at first and really easy, however it only seems useful if you have one or a few instances of a class. For the most part I just bound the stage to my game.as file and let game.as handle everything. I created classes for Asteroids and Bullets to learn how to do class work in ActionScript and I ran into a few problems but for the most part everything was seamless. (As seamless as it can be writing anything in a new language).
To look at some specific problems I encountered, continue reading.