Hexagon Framework Effects Demo

Monday, May 28th, 2007

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.

(more…)

AS 3.0 Data Structures For Game Developers

Saturday, May 26th, 2007

In case you missed it Michael of Polygonal Labs has released a package of ActionScript 3.0 data structures that are especially dedicated for game development. He’s also writing examples on how some of the classes are used, for example Queue and Tree.
The hexagon framework will contain similar data structure classes but they will adhere more to interfaces and patterns. Nevertheless I will optimize them for speed as best as I can. In case you are wondering … no, the hexagon framework hasn’t been released yet but I can say now that it won’t take too long anymore until initial release.

How do you create a Preloader with ActionScript 3 in Flash CS3?

Wednesday, May 2nd, 2007

Ok, I’ve searched with Google, I’ve asked on FlashCoders but nowhere got an answer. As far as I can understand it we still have to deal with the old problem in Flash of exporting library assets into frame 1 and using a Preloader. If we simply export the library stuff (and classes) into frame 1 we render our Preloader pretty much useless. But creating a Preloader like in ActionScript 2 obviously doesn’t work anymore.

(more…)

Alcon 2.0 Public Beta released

Sunday, April 29th, 2007

I’m happy to announce that Alcon 2.0 has finally been made public. The new version was completely rewritten using ActionScript 3 and Flex 2 and contains several new features that I missed in version 1. The most significant additions are the following:

- Output of up to four log files. You can define which log files to output by changing the settings in the AlconConfig.xml file. Like this it is easily possible to watch the flashlog.txt file that can be created with the Flash Debug Player (more info on this here and here).
- Alcon now features an Inspect panel for inspecting objects.
- A hexadecimal dump of an object can be made. Don’t ask me what this might be useful for now but you never know. ;) - Alcon now features a stopwatch that can be used to measure passed time more easily.
- You are now able to monitor the current host application’s stage framerate and memory usage.

For more info and download check out the Alcon page over at osflash.org.

Please note that this is a beta version! It still has bugs and the Debug class for ActionScript 2.0 is not yet included.

Woahoazers!

Wednesday, February 28th, 2007

Check out this 3D isometric game engine called renderhjs made in Flash! It took me three days to get my jaw back up from the floor!! (Ok, I’m lying there, I just found this link about ten minutes ago). Not only is it real-time calculated and fully textured 3D but it is written in ActionScript 2 for Flash Player 8 as a minimum. There are some glitches (watch the water basins in the toilet while rotating around) but still this is most impressive! In fact it looks even better than the graphics in Resident Evil. All I’m missing is a control to move the camera around freely but nevertheless it would be awesome to see a full game of this. (via UnitZeroOne).

Using Flex 2 for GameDev Middleware

Tuesday, January 16th, 2007

While the whole world is hyping Rich Internet Applications, I’m sitting here in my lab and could not bother less! Flex is really neat and who says that it’s only useful for shopping- or flight-ticket booking systems?! Nobody? Good! I’m using Flex to develop my game development Middleware, i.e. editors like the TileSetTool that I’m working on (if I’m not working on the hexagon framework what I’m doing most of the time). When Flex2 was still really fresh I’ve pondered to use Java for this instead but as it turned out, ActionScript 3 is fast enough for most of my desired operations.
So for now this TileSetTool can be used to convert my (custom format) tileset XML files and their belonging tileset image files into combined tsc file which are compressed and saved to disk by the tool (using Zinc). This editor is probably just the first stage to a much more versatile tilemap editor. The tool uses parts of the hexagon framework which also will contain a tile engine to support the tilesets and maps.
It’s fantastic how quick you can knock an application out of the ground with Flex and AS3 while others are still fighting with their IDE.

You can click the image to see a full screenshot of the tool. In case you’re wondering … no, I’m not working on a Flash version of Uridium 2 (would be an idea though). The tileset is only for testing purposes.

Waterproof AS 3.0 Singleton

Friday, November 24th, 2006

While reading Advanced ActionScript 3 with Design Patterns I’ve once again came across the AS 3.0 Singleton solution that has to deal with the absence of private constructors (I’ll save my rage and cursings about who had the idea to remove them for now ;)) and while the authors are using the already well known method of using a SingletonEnforcer class outside the Singleton’s package to verify that the class cannot be instanciated via the constructor they also note that this can be doublecrossed by giving null or undefined as a constructor parameter. As this is rather sub optimal I was wondering why they don’t just check inside the Singleton constructor for a null/undefined argument and throw an exception accordingly?!
I’m sure somebody else had the same idea already but here’s my idea of a waterproof Singleton class that cannot be misused from the outside (As always, if I missed any detail that accidentally breaks hell loose feel free to correct me) …

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package
{
	public class WaterproofSingleton {
		static private var _instance:Singleton;
 
		public function Singleton(singletonEnforcer:SingletonEnforcer) {
			if ((singletonEnforcer as SingletonEnforcer) == null) {
				throw (new Error("Direct instantiation of a Singleton is not allowed!"));
			}
		}
 
		public static function getInstance():Singleton {
			if (Singleton._instance == null) {
				Singleton._instance = new Singleton(new SingletonEnforcer());
			}
			return Singleton._instance;
		}
	}
}
 
class SingletonEnforcer {}

Learn some patterns - Advanced ActionScript 3.0 with Design Patterns

Thursday, November 23rd, 2006

I’ve been reading this book by Joey Lott and Danny Patterson since yesterday and thought I’d loose a couple of words about it …
The book starts with a chapter about application design where it explains how to go through the analysis-, design- , implementation and testing phase. It introduces how to utilize Use Case- and Class Diagrams and then gives a lesson on how to use FlexUnit for unit testing. In the second chapter is a good explanation about why and how to use Interfaces (instead of Inheritance) and after that it goes into detail with teaching nine of the more common Design Patterns, namely MVC, Singleton, Factory/Template Method, Proxy, Iterator, Composite, Decorator, Command, Memento and State. In part 3 of the book you’ll find in-depth information about AS 3.0 features like Events, data IO, E4X and Regular Expressions.

(more…)

Loading Zip files into Flash … yummy!

Monday, November 20th, 2006

This might be old news for you but I’ve just coincidentally stumbled over an ActionScript 3 class named FZip that was written by Claus Wahlers and Max Herkender which provides functionality to load standard Zip compressed files into a Flash movie and unpack them on-the-fly. This is amazingly useful and I can see a lot of possible use for it in the future.

It also reminds me of an AS 3.0 framework that I started to write a while ago which provides all kinds of file reading and writing means. It can read and write compressed and uncompressed XML-, text- and binary files. The file writing is currently only done by use of mdm Zinc but support for other data storing methods like for example LSOs are planned and I can imagine that this could be extended with native file writing once Apollo is live. Also the compression it uses is based on AS3’s own ByteArray GZip compression but it writes it’s own custom header tag to the files to identify the file type, compression, original file suffix etc. Eventually I also started to add encryption classes so the compressed data can be encrypted before.
However this started as an offspring from my current game development project where I want to use it to keep external data files compact and it is still in beta. Now that I found FZip I’m thinking about adding support for it as well so the publish date for this is delayed a bit more.

Understanding Interfaces and Polymorphism

Saturday, November 18th, 2006

I’ve been using Interfaces a couples of time now when needed but I never fully understood those down-sized Class construct wannabes. I knew they are useful when it is required to have an universal type for different objects but I haven’t fully grasped to scope why they are so useful otherwise. Also the fact that they can’t contain properties and only public method declarations confused me.

(more…)

Welcome to H1DD3N.R350URC3!

These are the adventures of a random guy trying to be an independant game developer, utilizing ActionScript for programming and talking abouting gaming and nonsense in general.

Need any news feed?

 Main Feed (contains all categories), Dev Feed, Design Feed, Audio Feed, Gaming Feed, Miscellaneous Feed
Find entries: