I have started a micro ISV. I’m writing some software aimed at casual game developers who use Flash. The Flash space is pretty complicated: There have been ten major versions of the Flash player over more than a decade. There are two major languages for writing Flash games: ActionScript 1-2 and ActionScript 3. Each language lets you use a different, overlapping set of features. You can author Flash files with graphical design tools or open-source command-line compilers. I need to figure out which uses of Flash I will support in “version one” of the software I’m writing.
I have decided to tackle the problem of deciding what to support by measuring what developers actually use: I played 123 SWF files that were linked from the front page of a popular Flash game site. Popular games and recent games appear on the front page of this site, which means these data are biased towards popular games and recent games. That’s OK—the software I’m writing is for successful, active Flash game developers. They should be the ones writing popular, recent games.
80% of the games are Flash version 9 or 10. Despite that only 73% (but still 73%) of the games use ActionScript 3.
Forty-eight different kinds of tags appear. Here’s a histogram the number of games which use each kind of tag (not the number of times the tag appears):
123 ShowFrame 123 End 122 SetBackgroundColor 119 FileAttributes 119 DefineSprite 109 DefineShape3 108 DefineShape2 96 FrameLabel 90 SymbolClass 89 DefineBitsLossless2 87 DoABC 73 ScriptLimits 64 DefineBinaryData 59 DefineSound 59 DefineShape 55 DefineFontAlignZones 55 DefineFont3 53 DefineEditText 52 DefineBitsJPEG2 51 DefineText 51 DefineShape4 50 SoundStreamHead2 49 CSMTextSettings 48 PlaceObject2
47 DefineFontName 46 RemoveObject2 43 DefineBitsJPEG3 42 DefineButton2 41 ExportAssets 33 DoInitAction 33 DoAction 32 UnrecognizedTag 31 DefineMorphShape 30 JPEGTables 30 DefineBits 28 PlaceObject3 19 DefineSceneAndFrameLabelData 19 DefineBitsLossless 18 DefineMorphShape2 17 Protect 14 Metadata 13 DefineText2 8 StartSound 8 EnableDebugger2 8 DefineScalingGrid 7 DefineVideoStream 7 DefineFont2 5 DefineButtonSound
OK, everyone uses ShowFrame and End, no surprises there. Thirty-two files had tags which aren’t mentioned in the SWF file format spec. Here are the offending tag numbers, the number of files they appeared in, and the number of times they appeared:
Tag # Files # Times 253 9 536 255 16 16 41 11 11 63 6 6 72 3 3
If you know what tags 41, 63, 72, 253 and 255 mean please post a comment!
Lastly, here’s how popular different combinations of file attributes are:
69 ActionScript3 UseNetwork 16 (FileAttributes tag present; nothing turned on) 11 UseNetwork 10 HasMetadata ActionScript3 UseNetwork 9 ActionScript3 2 HasMetadata ActionScript3 1 UseGPU 1 HasMetadata
These data are from games on one site, so I’m not going to make any firm decisions about what the software I’m writing will support just yet, but it looks like:
- Because I only have resources to support one of ActionScript 1-2 or ActionScript 3 at first, it would be better to support ActionScript 3.
- These games use 48 different kinds of tags I need to understand. (Incidentally, concentrating on ActionScript 3 doesn’t simplify things—the ActionScript 3 games use 45 different kinds of tags between them.)
- A lot of games want to use the network. There’s no easy way to tell if they work unplugged from the network too, though.
Next I need to pull apart the contents of the DoABC tags and see how much of the Flash API these games use. I also need to look at games from other popular Flash game sites.