Archive for the 'Uncategorized' Category

 

Ava the firefly on facebook- Level submission how-to

Apr 05, 2011 in Uncategorized

If you would like to contribute a map for ava the firefly on facebook, please check out the map description file at:

http://dreamwagongames.net/webgames/avaMaps.xml

An example of the XML to submit

<avaMap>
<name>My awesome map</name>
<author>my name</author>
<website>my website</website>
<mapImage>someImageIHaveRightsToUse.png</mapImage>
<mapMusicPath>SomeMusicIHaveRightsToUse.mp3</mapMusicPath>
<mapMusicBy>Music Artist Name</mapMusicBy>
<mapMusicWebsite>Music Artist website</mapMusicWebsite>
<mapSongName>some cool song</mapSongName>
<startingPoint>
<x>-500</x>
<y>-200</y>
</startingPoint>
<lightSourceRect>
<x>642</x>
<y>507</y>
<height>100</height>
<width>100</width>
</lightSourceRect>
<droneCountAtStart>15</droneCountAtStart>
<droneLvlIncrement>2</droneLvlIncrement>
<batCountAtStart>4</batCountAtStart>
<batLvlIncrement>2</batLvlIncrement>
</avaMap>

When creating your own map, please fill out all relevant information and submit a map image, music, and the xml zipped to
j at dreamwagon dot com

You must have the rights to use both the map image and the music submitted. The minimum image size for the map is 800 x 600 and the maximum size is 2400 x 2400. png, jpg, gif supported

Check out the game at http://apps.facebook.com/avathefirefly

Caching rotations as bitmapdata in flex AS3

Mar 14, 2011 in Uncategorized

Well what would be better for PI day then a brief tutorial on caching rotation sprites in adobe flex. While porting “Ava the Firefly” to Flex, I have encountered a bit of a snag in how the Flex framework handles rotation. In XNA, it is as simple as passing a parameter to the draw method on the Spritebatch. In AS3/Flex… not so much. The issue.. discussed here, is that performing a matrix operation to rotate a bitmapdata object once per frame will drastically impact performance in a negative way as the number of rendered sprites increases. The consensus appears to be to use a cache for the rotation information.

Here is how I handled the problem.

		static public function rotate(image:DisplayObject, degrees:Number = 0, colorTransform:ColorTransform = null):BitmapData
		{
			var matrix:Matrix = new Matrix();
			     matrix.translate(-image.width/2,-image.height/2)
			     matrix.rotate(degrees * degreeToRadians);
			     matrix.translate((image.width/2),(image.height/2))
 
			var bitmap:BitmapData = new BitmapData(image.width, image.height, true, 0x000000);
			bitmap.draw(image, matrix, colorTransform, BlendMode.LAYER, null, true);
 
			return bitmap;
		}

This will take an image an rotate it, returning the bitmapdata.
In my case, I create an array of images from a sprite sheet and build a cache of all the possible rotations of each frame in the animation.

		// Create a multidimensional array for the given index
		// ie. increment of 10 will cache all rotations in 10 degree increments (36 bitmaps)
		static public function buildRotationCache(image:DisplayObject,
                                                                       imageArray:Array,
                                                                       frameIndex:Number,
								       increment:Number,
								       colorTransform:ColorTransform = null ):void
		{
			var rotationIndex:Number = 0;
			for (var k:Number = 0; k &lt; 360; k+= increment )
			{
				var bm:Bitmap = new Bitmap(GraphicsUtil.rotate(image , k, colorTransform));
				var gr:GraphicsResource = new GraphicsResource(bm);
 
				imageArray[frameIndex][rotationIndex] = gr;
				rotationIndex++;
			}
		}

the graphics resource class is from a tutorial found here

package
{
	import flash.display.*;
	import flash.geom.ColorTransform;
 
	public class GraphicsResource
	{
		public var bitmap:BitmapData = null;
		public var bitmapAlpha:BitmapData = null;
 
		public function GraphicsResource(image:DisplayObject)
		{
			bitmap = createBitmapData(image);
			bitmapAlpha = createAlphaBitmapData(image);
 
		}
 
		protected function createBitmapData(image:DisplayObject, colorTransform:ColorTransform = null):BitmapData
		{
			var bitmap:BitmapData = new BitmapData(image.width, image.height);
			bitmap.draw(image, null, colorTransform);
			return bitmap;
		}
 
		protected function createAlphaBitmapData(image:DisplayObject):BitmapData
		{
			var bitmap:BitmapData = new BitmapData(image.width, image.height);
			bitmap.draw(image, null, null, flash.display.BlendMode.ALPHA);
			return bitmap;
		}
 
	}
}

All for now. Happy coding..

Fight Monkey of Magic

May 20, 2009 in Uncategorized

Dreamwagon games is proud to announce its first title Fight Monkey of Magic (FMM).

FMM is a hybrid role playing fighting game with real time strategie elements. Although an arcade fighting game at heart, Fight Monkey of Magic provides several different ways to win. Play through in arcade mode or team up with your friends. Up to 4 players capability will keep everyone in the game.

We are shooting for a release to the XBox arcade and windows in the fall 2009.

Check out the game page for more info:  http://dreamwagon.com/fightmonkeyofmagic

Yahoo – are they serious?

Jan 29, 2008 in Uncategorized, consumer alerts, internet

For the second night in a row I have been waiting on hold with yahoo customer support for over an hour. Although the “musak” version of “While You See a Chance” by Steve Winwood is rather uplifting, I would prefer to have my problem addressed.

I did finally get someone on the phone (1hr 12min wait) only to be placed on hold once more after explaining the issue I decided to send a bitchy email instead of waiting another millennium. Here is what I wrote, more to come…

First of all let me say that yahoo provides possibly the worst customer support I have ever experienced.
I have been unable to properly map subdomains, and have been unable to get any help, even after waiting on hold for longer than one hour.
The problem is a create a subdomain with your little wizard, and it does not map to the URL (Yes I have waited 24 hours)
If there is an actual person reading this email, by the time you read this I will have likely already switched to goDaddy or similar hosting services.
PS. this message is being posted to my blog.

Was the part about goDaddy too mean? That is pretty low I know. I just want them to hurt as much as it hurts me to listen to Kenny G for an hour after a full day of work and a night class.