Flash

A Love Letter to Flash

Not from myself but I’d like to second his words … A Love Letter to Flash

ActionScript, Game Development

Some bits (and code) about rolling dice

I’ve wrote a AS3 Dice class a while ago for use in roleplaying game development to provide methods for rolling various-sided dice. The class and a ‘dice testing application’ to calculate throwing probabilities can be found over at the lab.

AS3 Dice Class & Dice Tester at labs.hexagonstar.com

Flex

Nasty bug in Flex3 beta2

Makes me wonder why nobody else has yet written anything about this bug … when using any container component like for example a Panel or TitleWindow with a different borderStyle than the default, e.g. borderStyle: solid all your contents of that container reach into the the chrome of the Panel/Window/etc. pretty much messing up your layout. How could this escape the eyes of Adobe’s Flex devs? Here’s the thread at Adobe’s Flex forum. This is bad because it sort of prevents me from writing any Flex/AIR applications until this issue has been fixed, I’m using a custom theme for all my projects that use a solid borderStyle (similar to the one used in the Flex Style Explorer). The marvels of open beta software pushed by corporations for mere publicity purpose!

ActionScript

FDT 3 is final!

The guys at Powerflasher done a great job! Check out their new FDT 3 at fdt.powerflasher.com. Personally this has become once again my favorite coding tool (after an over one year break with FlexBuilder’s editor). FDT has many features that one would otherwise only find in superior tools like Eclipse’s own Java Development Tool … and these are top notch! FDT is now shipped in three different versions, Basic, Professional and soon an Enterprise version which will add a Debugger, MXML Parser and advanced Refactoring.
I’m especially looking forward to the MXML Parser since in it’s current state FDT only allows for pure ActionScript projects. The MXML Parser would make it possible to add Flex and Adobe AIR projects to the roll.

ActionScript, Game Development

Animated Bitmap Class Update

I’ve updated the AnimatedBitmap class so that it now uses an external timer object to trigger the animation. The advantage of this is that one timer can be used for many animated objects that use the same framerate. For this purpose a custom FrameRateTimer class has been added. This saves memory and CPU cycles when many animated objects are used.
I will eventually add an AnimatedDisplayObjectManager class later with that many animated objects can be controlled at once (e.g. stop/play all sprites at once) but this will probably be more intervened with the whole framework (as it might make use of custom data structures). More info and download at the labs!

ActionScript, Game Development

Animated Bitmap Class

AnimatedBitmap is a class that extends the AS3 Bitmap class and adds some functionality for creating animated bitmaps from a single image file. Main advantage is that the framerate for every such animated bitmap can be set individually. This can come in handy for game development where animated sprites (or even tiles) are used. More info and download at the labs!

ActionScript, Eclipse

FDT 3.0 is Open Beta!

I’ve joined the closed beta of FDT 3.0 a couple of weeks ago and saw that there was steady progress in bug fixing with around 3-4 updates every week. Now the guys at Powerflasher started the Open Beta which everybody can join by visiting the FDT Forum.

FDT 3.0 is pure coding comfort indeed! After using it you’ll agree that the Flex ActionScript editor looks like a poor excuse compared to FDT! There are all the features for ActionScript 3.0 that also were in FDT 1 and a lot of new stuff. Luxurious syntax coloring and semantic syntax highlighting, code templates,my number one favorite feature Mark Occurences, code formatter, quick fixes, Flash IDE and Flex compiler support, limited refactoring and more.

Now all I wish for is that FDT works flawlessly together with Flex/AIR projects but that will probably come at a later date since getting a stable release is more important now. It kind of feels awkward if you have to go back to the Flex AS editor once you used FDT!

Flex, Tools

First AIR application: FEAT (Freelancer’s Estimation Assistance Tool)

I finally came to play a bit more with AIR and it’s specific features and wrote a small tool that is helpful for freelancers like you and me to make pricing estimation calculations. With FEAT you can calculate your hourly rate based on your expenses and some other factors and it provides a wizard to calculate project pricing estimates (another thing that is hard to get used to for many freelancing starters). It also stores all your values and changes its color if you want and can cook coffee and wash vegetables and …. ok wait, the last part is not true but still, this is a nifty little tool! Find more info and download at this LINK!

feat_screen_01_thumb.jpg

ActionScript

ActionScript 3 MultiMap Class

Recently I needed a HashMap for a project to map key/value pairs but in that particular case the Map required to map not just one but several values to a key. I could have used an array or object to store the values in and map that one but in practice it turned out that accessing the map looked rather messy. It would be much more elegant to have a map to that multiple values can be mapped directly. After some investigation (strangely even Java seems not to have a MultiMap included) I came up with writing my own MultiMap class, so here it is!
The MultiMap is heavily based on Michael Baczynski’s HashTable class but I modified it to my requirements and added a couple of additional methods for luxury. At first I wrote an even more customized version that would decide automatically which hash function to use but as it turned out some of these changes weighted heavy on the performance, especially not using a strict equality operator (===) and having a HashEntry object with non-numeric keys. In fact Michael’s class is still a tad faster (he really squeezed out the last bit of performance there) but as long as the MultiMap isn’t too large/full there is only a minor difference of some milliseconds.
As a trade-off I added checking for existing keys (which can be omitted to improve performance when adding values) and of course there is the multiple values functionality which required a more complex implementation of some methods.

You can download the class here: MultiMap.as

I’m sure there is still a lot of room for improvement so if you have any suggestions it would be cool to let us know!

Flash, Game Development, Games

Getting rich with Free Flash Games?

Still have a skeptical opinion about using Flash for making games? Read and rethink … at least for earning money it seems to pay off if done right! Check out this interview with Desktop Tower Defense creator Paul Preece! Obviously it is possible to create a monthly 8000$ revenue just by putting together a simple but addictive Flash Game and make it freely available to people.
Even though personally I’m not too impressed with the game (prefer better graphics/sounds) I found myself getting lost by its addictive gameplay for at least 30 minutes today. Why the heck do I sit here designing an overly complex roleplaying game??! To answer that question by myself: Because it’s what I love doing and its fun for me. But maybe I’m better off devoting some time to create a simple blockbuster first!

So what makes this game so addictive that people are coming back en masse? First and foremost it’s simple and straightforward. No long introduction, no necessity to read instructions, you get into the game quickly. Then there is the addiction factor … Maybe its just me but the reason why it is fun to play is because you try to make your defense perfect to stop the intruding enemies. Another factor is that you can shoot and destroy something. Sounds dumb? I know, but I can imagine that many people’s ‘hunting’ instinct is triggered by that. After all many popular games follow the same scheme. In fact you don’t even need to do the shooting as that is what your towers are doing for you. You just have to place them in a strategically good position and watch how well it works out. The author sure made a good choice by picking a Tower Defense game for this!

Now there are hundreds of other well proven addictive games out there. Make your choice and don’t forget to improve it by adding something that makes it even more fun to play! Meanwhile excuse me … I have to dig through my old games collection and do some searching … ;)

via Tales of the Rampant Coyote

Next »