Posts Tagged ‘Adobe’

Flash gets Low-Level 3D API, golden Times for Game Devs ahead

October 26th, 2010 6 comments

I’ve heard plans and rumors about this before but it seems now it’s official: The next versions of the Flash and AIR runtimes will have a low-level 3D API on board that utilizes DirectX, OpenGL and OpenGL ES. Maybe this racing demo video will convince most game devs who were skeptical about the Flash platform before.

The demo was coded by the guys who maintain Alternative3D, one of the the few software-rendered 3D engines for Flash that are better suited for 3D game development. The engine has recently been made free of charge for commercial development. The makers only require a back link to their product website in your game now.

I find Alternativa3D quite attractive, in particular after seeing videos and screenshots of, an online multiplayer Role-playing game that reminds me of RPGs classics like Wizardry, just with better graphics. Unfortunately the whole game is in Russian only for now and so far I haven’t been able to log in, the load procedure is very slow and always gets stuck at some point for me.

Still the game looks very promising with some nice looking 3D environments. The actors (NPC’s and creatures) seem to be inanimate billboard sprites though so they only look impressive on a static screenshot but imagine what would be possible with the newly achieved 3D power! I’m looking forward to create vast 3D environments with autonomous actor AIs a’la Oblivion or Fallout 3! The only bottleneck will – yet again – be the content creation.

Random Accessing Zip Files with Adobe AIR

September 20th, 2010 16 comments

I’ve recently re-published a new version of hexagonlib, a universal AS3 class library at Some parts that were originally in the library have been removed, in particular the UI components and the game package. This has been done because I’m working on a game engine (more about that one later) that will probably exclusively include these parts. The hexagonlib is instead targeted at a broader area of development, not just games.

Either way, many classes have been updated and improved (and many still need too *ugh*) and what is particularly worth mentioning are the file IO classes which provide a unified way to work with different file formats. Basically the way how files work in hexagonlib is that you can create file objects of any specific file type (like text, binary, image, XML, etc.), give them a path to a physical file and then add them to a loader (BulkLoader, FileLoader, ZipLoader) which then loads the data of the physical files into the file objects.

While you can use the BulkLoader class to load a collection of arbitrary files in one go with all sorts of comfort (priorities, weighted loading, load retries, multi-connections etc.) the newest addition to the library is the ZipLoader class which can be used in AIR development to access a standard zip file using Random Access. What does that mean? It means that you can create a zip file (a very large one if you want), pack all your resource files that can be loaded by your application and then open it with your app and ‘load’ (= extract) files from it without ever needing to load the whole zip file completely into memory. This makes accessing a large zip file very efficient because only the chunk of the requested, zipped file is loaded.

This is especially interesting for us game developers who desire to use large, nicely packed resource files like they are utilized in a similar fashion in most current day commercial games. For a while I was promoting to add such functionality to AIR over at Adobe Labs but that was before I knew that this can actually be done in AIR since 1.0 thanks to the FileStream class and the position property of it (alas, the property is not available in the URLStream class so random access is not possible on web-based Flash). The ZipLoader uses asynchronous loading to open a zip file as well as ‘loading’ files from it because I don’t like the idea of having the application at the mercy of the file system which would be the case with synchronous access (and which is used in way too many examples on the web).

You can download the hexagonlib distribution over at Google Code, which includes the SWCs and documentation and of course the source code is available for access via SVN. I’m updating the library on a irregular basis. There are already some Wiki pages too with code examples showing how to use the BulkLoader and ZipLoader here but I will hopefully get to write some more in-depth tutorials soon.

hexagonlib at Google Code
File API Wiki