Flash for big Games?
Even though I love ActionScript more than my daily meal I’ve recently started to think about if the Flash Platform is actually the right stuff for developing big games. Most Flash game developers write small-scale games for the web which is totally fine and I too like to write a small coffee-break game sometimes but often I’m craving for more! My dream has since long been to design and develop a large-scale role-playing game and I’m usually overflowing from new ideas coming to my mind every day that it’s almost hard to track all of them.
I could go on and make this project an oldschool-style game with 2D graphics like some other indie devs are doing but I feel that going 3D would be the best bet to convey atmosphere and tactical gameplay at the same time (you could use switchable first-person and third-person views). This makes me think if ActionScript is actually sufficient for this but the experience of some of my recent coding tests with Away3D which already start to bog down the CPU with a few hundred polygons on the screen tend to say “no!” to my ambitious plans.
Since this is a desktop game my platform choice is AIR which offers more freedom that the Web Player but there are still many let-downs that make you grind your teeth …
Without a doubt the biggest problem is the lack of hardware-accelerated 3D rendering. With the current software-rendering engines you could make simple 3D games where you try to always keep down poly-count to an absolute minimum. Basically your game will then look like anno 2000, if not worse. I remember most games of the late nineties to early two-thousands as having these “wood puppet”-appearing character models, both in terms of look and animation. I must admit that some games achieved quite good quality for the technology they were running on, for example Metal Gear Solid on the first-gen Playstation. Would that be possible in Flash? Probably yes, with a lot of trickery but who wants to make games that look that outdated? As I mentioned in another post, I’d be better off with well designed 2D instead.
Not sure what Adobe is doing regarding 3D but sure is if if they are sleeping on this, the competition will not sleep and we might see developers wander over to Silverlight or Unity3D.
There are several other painfully missing features in Adobe AIR which I hope Adobe will care about. One such feature would be the option to change the screen resolution! As it is currently if you switch your game to full screen it will run at the same resolution in that the player runs the OS in. Screens have become larger and with that screen resolutions have too. If you now switch your Papervision game – which was running fine in a 640 x 480 window – to fullscreen in 1920 x 1200 you can watch how your game is being degraded into a slideshow! Fullscreen games would profit a lot from being able to change screen resolutions.
The fullscreen mode brings me to another bugger: The Escape key! Adobe has the opinion that the Escape key must not be remapped and that it should solely be used to close a full screen mode. I guess they did this for security reasons so that an ill-intended coder cannot hijack your screen. However I disagree with this rationale! Such a coder could use C, Java or Python or any other universal programming platform for that matter in a much more suitable way. Some security restrictions go too far and the Escape key is one of them. It’s more of a blocker than a help!
Most modern commercial games use what is called Resource Files; large compressed archive files which contain all of the game’s media and data files. These files are often in the hundreds of megabytes up to several gigabytes. While I doubt that I will make a game anytime soon that has an assets library of several gigabytes I can imagine that my current project could go easily up into several hundred megabytes of assets.
The commercial developers use resource file formats to organize their asset files into nicely compact files. These resource files house many advantages over just simply having your naked files on the harddisk. Among the advantages are compactness, protection, easy file distribution and better structural organization.
With ActionScript you could load compressed Zip files that store all your games’ assets but there’s a tiny but important catch to this: Most of those commercial games which are written in C++ and which utilize the file system have the ability to access any of the packed files quickly and right at their position in the resource archive without the need to load the whole resource archive into memory first. In fact you wouldn’t want to load a 4Gb file into memory completely but how about a 200Mb file? While that’s possible it’s not a best-practice.
ActionScript currently provides the URLStream class that can be used to stream a file in but it still does so only in a linear way. You could start loading your Zip file, check which assets from it is available, abort loading and use the asset but this is sub-optimal! Imagine your file is somewhere at the end of the Zip file you’d still have to load the whole Zip file first. ActionScript (or in particular AIR) would go nicely with a URLStream class, or even a completely new API that could make optimal use of a Resource File format which houses compressed media and data files. Maybe Adobe could even introduce a specific new file format for this purpose. That would be ultimately nice!
I have no idea where Adobe stands with the future plans for Flash and whether some or all of the above mentioned points are resolved at some time or if they are never resolved in which case I’d get the impression that the Flash platform is a sinking ship for me – which I do not hope for!
Currently we as Flash game developers (I hate that name!) are standing at the fence which borders on that green and juicy meadow of professional game development and we can only hope that things improve in our favor so we too can graze on that green grass where the big cows are reveling.