divillysausages.com

How to create Flash games for free

So, when I'm not spending time designing up spankingly delicious web designs to awe people, I've been back working more and more in Flash lately (Flash is cool anyway; C++ is for old people).

In the last few months before I parted ways with Ubisoft – I've left Ubisoft by the way – I was working on Facebook prototyping. As part of that, I developed a Flash framework (previously Concept) that was released "open source" to the rest of the company. It was open source mainly because if it was part of main tech, then I'd have to spend all my time providing support, and pf, who needs support?

On top of that I've been developing prototypes and games at home - "games" being used lightly as I actually have to move my arse to finish them – and on top of THAT, my new job – at Village Media by the way; stop by our site and win actual stuff (only if you're French) – is to develop games for their site and, later on, Facebook.

So, based on those deep fathoms of experience and general disdain for wanting to pay for anything, I'd thought I'd take some time to show how it's possible to make Flash games (and thus more money THAN YOU'VE EVER IMAGINED) for gratuit.

A quick disclaimer beforehand though – I work mostly on Windows, so this is completely geared towards that platform. Some of the programs you're about to uncover will have Mac or Linux ports, some won't, but for the most part, you'll be able to search out alternatives. Unless you want to work on the iPhone or iPad of course. In that case, screw you and learn Objective-C.

So, how to set up a complete development environment for free (assuming of course that you already own a computer. If you don't, steal one. Steal the one you're on right now).

The IDE

As anyone who's ever coded ActionScript using the Flash IDE itself knows – it blows. Blows like a really, really strong wind across vast, grass-strewn plains with no trees or large topography in the way to stop it. Happily, you don't have to use it, or Eclipse/Flash Builder for that matter. Instead, go and grab yourself a copy of FlashDevelop – an absolutely stonking IDE that'll make your life much, much easier.

You'll need to download the Java runtime to get it working (but that's fine, as we'll see later), as well as the Flex SDK in order to compile your shizzle. Technically, since the Flex SDK can run from the command line, you can code directly in something like Notepad (or it's non-retarded cousin Notepad++), but that's only if you're, like, super hardcore.

You'll also need to download the Debug Flash players if you want to trace out stuff. Download the projector and the ActiveX ones. Run it once so it becomes the default on your system as Flash takes the last run Flash Player as the one you want to use, not the most recent installed.

Engine

The world is full of Flash engines for you to choose from depending on what you're looking for. Check out the PushButton engine, Flixel, FlashPunk, Away3D (for 3D games ironically – used in Café World if you're looking for some trivia) etc.

You can also roll your own if you're looking for a challenge. It's also an excellent way to improve your skills and learn about the more in-depth features of the language. It's not too difficult to get something basic up and running in any case. All you need is a state manager (for easily handling moving between menus etc), an asset manager (easier loading & caching of assets), a steady update loop (though Flixel uses a simple ENTER_FRAME if I'm reading the code right, and it does fine), physics (not always needed, but you can just plug in Box2D), some simple maths classes to help you along (Vector2, Matrix33...), and a sound manager and you're pretty much good to go. Other classes and helpers will come naturally (TileMaps etc) as you make your games.

Graphics

If you want to have Vector graphics (I mean, like, 8-bit style raster graphics are how you become cool, but, like, whatever...), then you'll need to find a program that can import them for you (I never looked), or become really, really good with the drawing API inside Flash. Not that you can't get sweet results with this; Geometry Wars and The Space Game are good examples.

Otherwise it's raster graphics and BitmapData all the way! You can download a free lib (like the SpriteLib GPL, or OpenClipArt.com), or you can create your own.

As Photoshop is for pretentious people with money, check out Paint.NET which is gravy, or something like GIMP. If you prefer working online, try Pixlr or the Phoenix the image editor from Aviary. On a side note, Aviary also have a Vector Editor, an Effects Editor and a Colour Editor that you can play with.

Sound

Before I go too in-depth with this, I despise working with sound, so I'm probably not the best person to talk to. Quality sound will always cost you (unless you're a musician, then it's happy days – also, get in touch), but you can survive with some simple basic programs. sfxr is an excellent program for randomly generating 8-bit style sounds (they're saved as a .wav file, so you'll need something like Audacity so convert them for import into your game).

Other sites like SoundSnap will let you download 5 sounds a month for free. They've got some music as well as sounds on there, so go crazy. There's also iPhone apps like Bit Sound if you want to compose on the go.

Online-wise, there's Roc, the music creator from Aviary (pretty easy to use), which you can import into Myna, their audio editor.

The guys over at 8-Bit Rocket have done more research into this area, and they also have a section for free sounds and music, so I'm happy to redirect you there (in a new window of course, I'm not crazy).

Subversion

If you're not using some sort of Subversion, or don't know what it is, then you're either insanely good or just insane. TortoiseSVN is a simple-to-use Subversion that plugs directly into the Windows shell (letting you access it's commands from the right-click menu). Use this and watch as you never again lose all your code because you changed some crap and forgot what it was and now your program is bugged as fup and it's 3 in the morning.

Documentation

This part doesn't really come into play unless you're actually creating something like an engine for other people to use. In that case, having accurate documentation makes you look all professional and stuff. Every cool kid knows that you write comments in your code and use a tool to parse your files and build the HTML files. For this, you can use the ASDoc tool that comes with the Flex SDK, but also check out Natural Docs, which I've found makes the comments in your code much more straightforward and readable. Which is the whole point of comments in the first place.

Administration

It crops up the odd time that maybe you'll have to do some administration – like if you're one of those crazy people that do their game design in Word, or if you need a spreadsheet to figure out just how tall those massive amounts of money you're making would stack up to. If this is the case, then it's time to download Open Office! Remember that bundle of Java joy that you downloaded earlier to run FlashDevlop? It also runs Open Office! Amazing!

Alternatively, if you want to live in the cloud, you can pass through Google Docs, which has the added benefit of letting more than one person edit a document. Provided they all know how to spell and use punctuation.

Fin

Bam! There you have it. You're well on your way to self-sufficiency without spending a Euro. And that's Good Business™. As always, there's generally free, open source equivalents to nearly any program out there, so savvy people (Google, durp de durp durp) will be able to find what they need. Now, go out into that big, beautiful world and make some games Champ!

(I'm winking)

Comments

Marty

I'm actually going to give this a go...

Someday

Submit a comment

* indicates required