ActionScript #1: Setup

Published July 26, 2011
Advertisement
I've been struck with the dreaded lurgy, so I'm working somewhat sporadically. Still working through the basics.

Setup
I've got a new Windows 7 PC which hasn't had much set up on it, so the first thing to do is load up everything I need. Sounds straightforward, but it always turns out to be more hassle than you think.

Version Control

I probably won't need version control for the simple stuff I'll be working with in the first week or two, but if the point of the exercise is to rekindle decent game programming habits then it's best to start early.

While I'm working solo on these projects, I'd like to be able to sync code between computers. I've got a Win PC and a Mac and I like to do things on both. Previously I've been using SVN on a single computer, so I tried to come up with a straight-forward way for two computers to share the repository. But everything I tried was ugly. So I've decided to try a distributed source control method instead and switched to Mercurial. I've only played around with tutorials so far but it looks like a much better approach for my work flow; it's a lot easier to set up repositories whenever and where-ever I like.

Mercurial was very easy to set up on both Windows 7 and Mac OS X, so no problems here are all. It was surprisingly simple actually - version control usually has a lot of setup pains. I'm looking forward in seeing how Mercurial operates.

flixel
Next stop was to flixel's site. flixel is a great open source ActionScript library that I briefly looked at last year. My thoughts at the time was that the structure was eerily similar to my ideal simple game architecture that I'd been playing around with in C++, except in Actionscript. And the site is aimed for beginners, so it's got links to all the resources I need.

For now, my exercise is to rekindle some basic game programming techniques, so I'm going to be working from scratch as a learning exercise. However flixel itself is a great resource for learning how to do things while I learn. And once I'm up to speed with ActionScript, I'll probably dump all my crappy learning code and switch to flixel.

I haven't yet used or even looked at flixel's code, so no judgement calls yet - other than I really liked the look of it a year ago.

Flex SDK

Now for the actual development tools itself. Flex SDK is the free development kit from Adobe. Simply grab the latest copy and unzip. Pretty straightforward setup.

FlashDevelop
Next thing to install is FlashDevelop, the free open source IDE for ActionScript development for Windows. As well as the program itself, FlashDevelop says it requires Flex (already got), the .NET frameworks (already got previously) and the latest Java JRE.

Despite saying it needs Flex as an external prerequisite, when installing FlashDevelop through the online install doohicky it downloaded another, slightly out of date version of Flex. Which is annoying when its about 200Mb on a slow crappy internet connection. Grrr.

Oracle doesn't make it easy to install Java JRE. Their site is a mess, and their installer makes it a pain to change install directories (I had to manually make the directory structure myself). Nothing too major, but it's by far the most annoying install of all the stuff I've had to do so far.

On to the code!
And now, checking it all works!

First gripe: FlashDevelop makes it hard to change the default editing font. The option is there, but it's under Syntax Colors for some reason. Annoying.

Second gripe: The syntax checker crashes. Clearly I haven't set something up right.
Looking into it, I think there's an issue with using the 64-bit version of Java JRE 6. So annoying. One uninstall, download and install of 32-bit Java JRE later (including going though many hoops to disable the Java Update Scheduler and replace it with my own scheduler: sorry Oracle, I don't want to constantly run your code merely to check for your monthly updates. And Oracle doesn't make it easy for you), and we're back in business. Grr.

Third gripe: FlashDevelop has this weird autocomplete that doesn't seem to like the default Flash objects as options for import packages. I think it's aiming for a work flow where it automagically adds them as you include them in your code.

Gripes aside, everything else was fairly plain sailing to get that first program running:

Flash Hello World.PNG
Hello, Flash Player!


Overall impressions thus far:
Mercurial - looks promising!
FlashDevelop - need to learn the kinks
Java JRE - SO ANNOYING
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement