Archive

Posts Tagged ‘AS3’

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 War.ru, 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 code.google.com/p/hexagonlib/. 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
Documentaion

Setting up Eclipse for Flash Development

February 18th, 2010 18 comments

This guide explains how to set up a Flash and Flex development environment with Eclipse, FDT, Flash Builder and a couple of other editors that you want for ActionScript coding and Flash development with style! This guide is based on Windows because that’s what I’m using but I’m sure you Mac and Linux guys can figure out the parts that differ on your OS! Let’s get started …

Read more…

ActionScript3 Dice Class

December 4th, 2007 3 comments

In game development randomness is often necessary for certain tasks, be it the random distribution of graphic tiles, a random factor in NPC AI or random stats in a roleplaying game. Especially for the latter purpose the static Dice class provides a set of methods to roll dice as it is common in a Role-playing game, to be exact four-, six-, eight-, ten-, twelve-, twenty-sided and percentile dice.

Read more…

Animated Bitmap Class

September 23rd, 2007 21 comments

The AnimatedBitmap class provides functionality for Bitmap objects that are animated by using a series of still images. When creating a new AnimatedBitmap you provide a BitmapData object that contains an image that consists of the ‘single-frame’ images for the animation.

Read more…

Hexagon Framework Effects Demo

May 28th, 2007 7 comments

Here’s a small demo that I threw together yesterday which shows how the effects in the Hexagon Framework effects package can be used. The effects package contains classes that are used on display objects to apply an animated effect on them. That is not all however. The effects send a signal back to the calling class when they are finished and there are two more classes with that effects can be arranged, namely the EffectChainer class and the EffectCombiner class.

Read more…

Flex Application: Star Wars Name Generator

May 11th, 2006 5 comments

I finally spend some time to make myself more familiar with the Flex 2 Beta and this is what came out as a result: Star Wars Name Generator! It’s a small and modest tool to generate random names (obviously). If you’re a fan of the Star Wars Pen & Paper Role-playing game (like me) you might find this tool useful!

You can generate names for planets and for characters, there are some parameters that can be chosen from before pressing the Generate button. After that it will spit out a list of more or less useful names (some of them sound very exotic). Interesting names can then be dragged and dropped onto the right side list. All names in this list are stored in local shared object on the users computer until the Clear button is pressed. The Switch button displays the saved names in a text area from where the names can be copied to the clipboard. (Small update: Works now with latest Flash Player v9).

swnamegen_preview.png