Saturday, September 14, 2013

With is not the only way to shorthand in AS3

var arr:Array = new Array();
var p:Function = arr.push;
   
p("hello");
p("whats up?");
   
for each(var s:String in arr){trace(s);}

Monday, July 29, 2013

Intellesense Recognizes imports but FlashDevelop compiler does not

After about an hour of trouble shooting why my AS3 game project compiles on my old computer, but NOT on my new computer... I finally figured it out. The older version of FlashDevelop let me get away with this: A file named: FlxTileMapEXT.as Inside the class: [...] public class FlxTilemapEXT extends FlxTilemap [...] When I imported and used the class: import FlxTilemapEXT Everything worked... But on my new computer it kept saying that the definition "FlxTilemapEXT" could not be found. See the problem? Answer: Case sensitivity. My file name is FlxTileMapEXT, but it defines a class FlxTilemapEXT. FlxTileMapEXT != FlxTilemapEXT However, the old version of FlashDevelop let me get away with this. SIDE NOTE RELATED TO HAXE: NOTE: Haxe compiling in flash develop is even stricter. Avoid underscores in your file names. Also, avoid folders that start with CAPITOL letters, as it will short-circuit import statements. The compiler will think the folder is a class.

Thursday, July 18, 2013

Hide Flixel Mouse and Show System Cursor

I combine my Flixel games with a UI layer on TOP of the Flixel Game Sprite. Because of this, it is necessary to use the system cursor, so that the UI layer is not drawn on top of my cursor. One way to do it: myFlxGameInstance.useSystemCursor = true; //set to true to make sure FlxG does not undo your changes when you switch states. FlxG.mouse.hide(); //Hide the Flixel mouse. flash.ui.Mouse.show(); //Show the standard system cursor Or: You can specify to use the system cursor in the constructor of your FlxGame instance. But if for some reason you want to change things later. The above is how you would do it.

Saturday, May 25, 2013

InfinityBomber76

[ UPDATE: 2013.07.28: SWF FILE REMOVED. Have decided to keep game off internet until it is finished and copyrighted. ]

Tuesday, May 14, 2013

Static Initializers In Haxe

http://haxe.org/doc/snip/initialization_of_statics Unlike in AS3, it doesn't look like you can have unlabeled brackets in the beginning of a class to put static initialization code. Here is a way to statically initialize something:
public static var NUMBERS = {
    var a = new List();
    for (i in 0...10) a.add(i);
    a; // result of last block expression is saved in NUMBERS
}

Monday, May 13, 2013

Function Types In Haxe

http://stackoverflow.com/questions/14025739/passing-a-function-as-a-parameter-in-haxe

 // fType : T -> Void
 // argument means that it takes a function "fType"
 // that takes one argument of type "T" and returns Void.
 public function applyFuncToAll( fType : T -> Void ):Void
 {
  cur = first;
  while (true)
  {
   //Call bound function on current object in list.
   fType( cur.obj );
   
   if (cur.hasNext)
   {
    cur = cur.next;
   }
   else
   {
    break;
   }
  }
 }

Sunday, May 5, 2013

CS5 crashes on startup or new file creation

Looks like the solution to getting my CS5 programs working again is the removal of bad network printers.

Saturday, May 4, 2013

Packages and Imports in Haxe

Unlike in Actionscript, it looks like you must conform to the "Constant-Class" rule when naming packages.

--Notes------------------
The class path:
import com.JMIM.TestClass;

Gave me an error "Unexpected com" or something like that.
I thought it might be namespace collision since the NME library also has a com folder so I tried:
import dotCom.JMIM.TestClass;

And changed the folder structure accordingly only to end up with the same error.

During this whole time I did make sure to add my personal library by putting another source path tag into the .nmml file.

Then I started getting errors something along the lines: "Unexpected class JMIM" or something.

I changed it to:
import dotCom.jmim.TestClass;

Getting closer to a compile. :)
Also, it looks like restarting my computer after messing extensively with the package structure MIGHT
be the way to go once you've done everything you can think of.
--------------------------

Thursday, May 2, 2013

AppTopia

Market Plan: 1. Make source code. 2. Re-skin game over and over till it stops making money. 3. MAYBE sell source code on internet. Make at least 3 skins of each game. Do NOT take advantage of artists. Offer artists a FLAT commission rate and 50% of whatever the profit is from the game. Pitch to artists: 1. Guaranteed Cash. Half now, half when you finish. 2. 50% on whatever the game makes. 3. There WILL be a credits section. You may use it as a portfolio piece. This could help you with a full time job, or just to brush up on your skills.

Wednesday, May 1, 2013

How to add library in Haxe / NME / NMML

Adding library in Flash Develop Haxe:
<!-- Paths to libraries. Must be declared here. Not in the project properties. -->
<source path="Source" />
<source path="C:\Users\JMIM\Desktop\HAXELIB" />

Sunday, April 28, 2013

Haxe Flixel Links

Links for my research: Tutorial: http://dustytome.net/moot/2012/08/haxe-flixel-platformer-tutorial/ Get HaxeFlixel source code: https://github.com/Beeblerox/HaxeFlixel TODO: Get $Haxlib install HaxeFlixel Working on .cmd Haxlib Setup: http://haxe.org/com/haxelib/setup Problem with Haxe Flixel: C:\Motion-Twin\haxe\lib\HaxeFlixel/0,9,0a/org/flixel/FlxText.hx:24: characters 17-52 : You cannot override properties

Wednesday, March 20, 2013

added to my list of people to stalk

IK Solver in AS3:
http://vimeo.com/23191399
http://www-scf.usc.edu/~shopkins/contact.html

also
http://www.adobe.com/devnet/flash/articles/spring_tool.html

Trig rounding errors in AS3

Maybe I just don't know my trig...
But if I do...
The difference between 1.888 and 1.253 is a HUGE rounding error.
var m:Number = Math.asin( Math.sin(1.888) );
//m = 1.253
http://answers.yahoo.com/question/index?qid=20080227172624AAwIQZA

Thursday, March 14, 2013

Iterate through quadrants

This is ridiculous:
var xo:int; //x offset.
    var yo:int; //y offset.
    var i2:int;
    var z0:int;
    var z1:int;
    var zeroMaybe:int;
    for (var i:int = 0; i < 4; i++)
    {
     zeroMaybe = (i < 2) ? 0 : 1;
     i2 = i + 1;
     z0 = (i &  1);
     z1 = (i2 & 1);
     xo = (z0 + (-1 * z1))  * zeroMaybe;
     yo = (z1 + ( -1 * z0)) * (1-zeroMaybe);
     trace("debug");
    }
Guess I should just put the pairs into a vector. Trying to iterate over checking 4 positions relative to a tile: UP,DOWN,LEFT,RIGHT. By outputting the correct offset values each iteration: [0,1] [0,-1], [1,0], [-1,0] in no specific order. Actually... This isn't bad for building a lookup table that is a linked-list. Same thing said another way:
for (var i:uint = 0; i < 4; i++)
   {
    var and3:uint = i & 3; //OUTPUT: 0,1,2,3  0,1,2,3
                          //OUTPUT in BINARY:  00, 01, 10, 11
           //If we SUBTRACT the bits, we can get 0,-1,1,0. Just what we need.
    var a3  :uint = (i + 2) & 3; //same as and3, but input is shifted over two.
     
    //When and3 and a3 are converted to -1,1,or zero, we will have the following outputs in this order:
    // [0,1] , [-1,0], [1,0], [0,-1] ALL THE KITTY KORNERS.
   
    var npX:int = ((and3 & 2)>>1) - (and3 & 1); //convert number 0-3 to: 0,1,-1
    var npY:int = ((a3   & 2)>>1) - (a3   & 1); //convert number 0-3 to: 0,1,-1
    
    //Building linked-list table of offset quadrant values:
    cur.x = npX;
    cur.y = npY;
    if (i != 3)
    {
     
     cur.hasNext = true;
     cur.next = new LinkedXYPair();
     cur = cur.next;
    }
    
    trace("debug: [" + npX + " : " + npY + "]");
    
   }

Sunday, March 10, 2013

Shiny Little Plasma Flares

[ UPDATE: 2013.07.28: SWF FILE REMOVED. Have decided to keep game off internet until it is finished and copyrighted. ]

Wednesday, March 6, 2013

When is SetPixel32 Faster than CopyPixels?

package 
{
    
    //Common knowledge is SetPixel32 is slower that CopyPixels.
    //What I want to know however is... What is the equivalency ratio?
    //Meaning:
    //Does using setPixel32 100 times take the same amount of time as CopyPixels for a (100x100) (10,000 pixel area)? Or something like that?
    //If you are going to use particles that use the "setPixel32" command... We need to know.
    //Compare setting pixel32 to usingCopyPixels on ONE pixel and see the speed difference.
    
    import flash.display.BitmapData;
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.geom.Point;
    import flash.geom.Rectangle;
    import flash.utils.Timer;
    import flash.utils.getTimer;
    
    /**
     * ...
     * @author JMIM
     */
    public class Main extends Sprite 
    {
        
        public function Main():void 
        {
            if (stage) init();
            else addEventListener(Event.ADDED_TO_STAGE, init);
        }
        
        private function init(e:Event = null):void 
        {
            removeEventListener(Event.ADDED_TO_STAGE, init);
            // entry point
            
            for (var i:int = 1; i < 100; i++)
            {
                pixelTest(i);
            }
            
        }
        
        public function pixelTest(inRecSize:int):void
        {
            trace("rec size == " + inRecSize + "--------::");
            
            var t1:Number;
            var t2:Number;
            var tt:Number;
            var counter:int;
            var counterMax:int = 98765;
            
            var theBm:BitmapData = new BitmapData(500, 500, true, 0x00);
            var copyFromBm:BitmapData = new BitmapData(500, 500, true, 0x00);
            var ZZ:Point = new Point(0, 0);
            var rec1x1:Rectangle = new Rectangle(0, 0, inRecSize, inRecSize);
            
            var setPixelCount:int = 0;
            var setPixelTimes:int = (inRecSize * inRecSize);
            
            t1 = getTimer();
            counter = 0;
            do
            {
                counter++;
                if (counter > counterMax) { break; }
                
                setPixelCount = 0;
                do {
                    setPixelCount++;
                    if (setPixelCount > setPixelTimes) { break;}
                    theBm.setPixel32(10, 10, 0x88FF);
                }while (true);
                
                
                
            }while (true);
            t2 = getTimer();
            tt = t2 - t1;
            trace("setPixel32 time:: tt==" + tt);

            t1 = getTimer();
            counter = 0;
            do
            {
            counter++;
                if (counter > counterMax) { break;}
                
                theBm.copyPixels(copyFromBm, rec1x1, ZZ, null, null, true);
                
            }while (true);
            t2 = getTimer();
            tt = t2 - t1;
            trace("copyPixels time:: tt==" + tt);
        }
        
    }//class
}//package
//OUTPUT:
rec size == 1--------::
setPixel32 time:: tt==50
copyPixels time:: tt==160
rec size == 2--------::
setPixel32 time:: tt==130
copyPixels time:: tt==160
rec size == 3--------::
setPixel32 time:: tt==270
copyPixels time:: tt==170
rec size == 4--------::
setPixel32 time:: tt==470
copyPixels time:: tt==170
rec size == 5--------::
setPixel32 time:: tt==680
copyPixels time:: tt==170
rec size == 6--------::
setPixel32 time:: tt==980
copyPixels time:: tt==180
rec size == 7--------::
setPixel32 time:: tt==1320
copyPixels time:: tt==170
rec size == 8--------::
setPixel32 time:: tt==1730
copyPixels time:: tt==180
rec size == 9--------::
setPixel32 time:: tt==2150
copyPixels time:: tt==190
rec size == 10--------::
setPixel32 time:: tt==2690
copyPixels time:: tt==190
rec size == 11--------::
setPixel32 time:: tt==3220
copyPixels time:: tt==190
rec size == 12--------::

....

//Personally interested in this one, because my tilemap uses 16x16 tiles:
rec size == 16--------::
setPixel32 time:: tt==6830
copyPixels time:: tt==210

Particle Bit Packing Math Experiment

Was wondering if I could make a more efficient particle system by packing the position, velocity, and acceleration values of the particle into a SINGLE signed integer. The thought was that access would be faster since it is all in the same variable. So far... I don't see any support for this in my research. Here is my math stuff. Note: was also packing color information. A bit more looking, looks like you may be able to get a marginal speed increase. But so marginal that, you would have to pack and unpack in a flawless manner to get that speed increase. And the obfuscation would make the system too hard to work with and edit.

        //Packs position, velocity, acceleration, and color into a SIGNED(+-) integer.
        public function putPVAC(p2047:int, v127:int, a7:int, c3A:int, c3R:int, c3G:int, c3B:int):int
        {
            //SIZES: HEX   BITS   UINT   INT        BIN
            //pos:   FFF   12     4095   +-2047     1111 1111 1111
            //vel:   FF    8      255    +-127      1111 1111
            //acc:   F     4      15     +-7        1111
            //clr:   FF    8      255    N/A        1111 1111
            // aa:   3     2      3      3          11
            // rr:   3     2      3      3          11
            // gg:   3     2      3      3          11
            // bb:   3     2      3      3          11
            
            //pack in position:
            var packed:int = p2047;
            packed = packed << 8; //shifting to make room for VELOCITY.
            
            //pack in velocity.
            if (v127 < 0) { v127 = 127 + (0 - v127);} //handle negative numbers.
            packed = (packed | (v127 & 0xFF)) << 4; //shifting to make room for ACCELERATION.
            
            //pack in acceleration:
            if (a7 < 0) { a7 = 7 + (0 - a7); } //handle negative numbers.
            packed = (packed | (a7 & 0xF)) << 2; //shift to make room for first color component.
            
            //   42       127       212
            //0 ----- 85 ----- 170 ----- 255
            //pack in ARGB:
            if (c3A > 212) { packed = (packed | (0x3)); } else
            if (c3A > 127) { packed = (packed | (0x2)); } else
            if (c3A > 42 ) { packed = (packed | (0x1)); };
            //other wise it is zero and nothing needs to be set.
            
            
            packed = (packed  << 2); //shift to make room for SECOND color component.
            
            //   42       127       212
            //0 ----- 85 ----- 170 ----- 255
            //pack in ARGB:
            if (c3R > 212) { packed = (packed | (0x3)); } else
            if (c3R > 127) { packed = (packed | (0x2)); } else
            if (c3R > 42 ) { packed = (packed | (0x1)); };
            //other wise it is zero and nothing needs to be set.
            
            packed = (packed  << 2); //shift to make room for THIRD color component. (G)
            
            //   42       127       212
            //0 ----- 85 ----- 170 ----- 255
            //pack in ARGB:
            if (c3G > 212) { packed = (packed | (0x3)); } else
            if (c3G > 127) { packed = (packed | (0x2)); } else
            if (c3G > 42 ) { packed = (packed | (0x1)); };
            //other wise it is zero and nothing needs to be set.
            
            packed = (packed  << 2); //shift to make room for FOURTH color component. (B)
            
            //   42       127       212
            //0 ----- 85 ----- 170 ----- 255
            //pack in ARGB:
            if (c3B > 212) { packed = (packed | (0x3)); } else
            if (c3B > 127) { packed = (packed | (0x2)); } else
            if (c3B > 42 ) { packed = (packed | (0x1)); };
            //other wise it is zero and nothing needs to be set.
            
            return packed;
        }
        
        
        public function getPVAC(com:int):void
        {
            var acc:int;
            var vel:int;
            var pos:int;
            var clr:int;
            var color:uint;
            
            //                     AA     RR     GG    BB
            //                     11     11     11    11
            //extract color: //   0xC0 | 0x30 | 0xC | 0x3
            clr = com & 0xFF; //ARGB color channels.
            
            color =     (  ((clr & 0xC0)>>6) * 85) << 24 | 
                        (  ((clr & 0x30)>>4) * 85) << 16 | 
                        (  ((clr & 0xC )>>2) * 85) << 8  | 
                        (  ((clr & 0x3 )>>0) * 85) << 0;
            
                        
        
            
            //extract acceleration.
            com = com >> 8;
            acc = com & 0xF;
            if (acc > 7) { acc = 7 - acc; }
            
            //extract velocity.
            com = com >> 4; // ==com >> 12 when looking at cumulatively.
            vel = com & 0xFF;
            if (vel > 127) { vel = 127 - vel; }
            
            //extract position:
            //This is only ONE line because the signed bit on the com integer affects this.
            pos = com >> 8; // ==com >> 20 when looking at cumulatively.
            
            trace("color==" + color);
            trace("pos ==" + pos);
            trace("vel ==" + vel);
            trace("acc ==" + acc);    
            
            //make sure color is what you think it is:
            var rgb:RGB = RGB.make(color);
            trace("a ==" + rgb.Alpha);
            trace("r ==" + rgb.Red);
            trace("g ==" + rgb.Green);
            trace("b ==" + rgb.Blue);
            
            
        }//getPVAC

Tuesday, March 5, 2013

int(2147483648)

int(2147483648) marginally faster than int.minValue in AS3
    t1 = getTimer();
    counter = 0;
    do
    {
        counter++;
        if (counter > counterMax) { break;}
        someValue = int(2147483648);
    }while (true);
    t2 = getTimer();
    tt = t2 - t1;
    trace("tt==" + tt);

    t1 = getTimer();
    counter = 0;
    do
    {
    counter++;
        if (counter > counterMax) { break;}
        someValue = int.MIN_VALUE;
    }while (true);
    t2 = getTimer();
    tt = t2 - t1;
    trace("tt==" + tt);

Thursday, February 21, 2013

Generating Classes at Runtime

Generating classes at runtime, as3 http://www.as3commons.org/as3-commons-bytecode/emit.html This looks a bit heavy for me, requires knowledge of opCodes to build classes. Want to create a class with a .bitmapData accessor in it... Hmmm...

Tuesday, February 19, 2013

ThreeBlockTypes

[ UPDATE: 2013.07.28: SWF FILE REMOVED. Have decided to keep game off internet until it is finished and copyrighted. ]


Sunday, February 17, 2013

Bomb Type Design

Needs:
1. Invincible walls.
2. Explosions stop at invincible walls.
3. Icons for different bombs translate to how they explode.

4. Bomb modifier that can kill any type of block.

5. When holding keys while going through exit door, the next level loads right away.
    Need to prevent this and give the user more time between level transitions.
    Change between: pressed to justPressed

6. Bunnies set off the bombs and are a general pain in ass.
    Bunnies can fall in ooze and turn into monsters.

Friday, February 15, 2013

B0X Att@ck

Working on rectangle recognition for my map loader. Maybe I am going a bit over board in my methods of compression for these levels. But, can't stop now.

Wednesday, February 13, 2013

Note Sketches

On todo: Make game 640x480 to sell better. Best games are this resolution. Complete TileMapConfig.as that uses JSON config file. Then: Make the "load your own map" option.

Sunday, February 10, 2013

POD Cloner iterates through non-dynamic properties just fine

package JM_LIB.utils 
{
    import mx.utils.ObjectUtil;
    /**
     * Clones any POD (plain old data) class:
     * @author JMIM
     */
    public class PODClonerUtil 
    {
        
        public function PODClonerUtil() { };
        
        public static function clone(inObj:Object):*
        {
            
            //Step1: Get class of inObj, and instantiate a new object of that type.
            var c:Class = inObj.constructor;
            var newObj:Object = new c(); //POD clases take zero parameters.
            
            //Use Flex's ObjectUtil to extract properties of object.
            var classInfo:Object = ObjectUtil.getClassInfo( c );
            var propArr:Array = classInfo.properties as Array;
            var prop:String;

            //must use this type of loop. Because the other will NOT work.
            for each (prop in propArr)
            {
                if (prop == "prototype") { continue;}
                newObj[ prop ] = inObj[ prop ];
            }
            
            /*
             * //Does same thing as for each loop above.
            for (var i:int = 0; i < propArr.length; i++)
            {
                prop = propArr[i].localName;
                if (prop == "prototype") { continue;}
                newObj[ prop ] = inObj[ prop ];
            }
            */
            
            return newObj;
        }
    }
}

Wednesday, February 6, 2013

Reference static class via variable

//Wanted to know if I could store a reference to a "registry"/"global container" inside of another class. //This test proves it is possible. //BUT, my auto-complete does not work on levelReg variable. //NOTE: LevelReg (with capital "L") is the registry. // levelReg (no capital "L" ) is the variable storing reference to the registry. var levelReg:Class = LevelReg; var levelNum:int = levelReg.currentLevelNumber; trace("levelNum==" + levelNum); levelReg.currentLevelNumber -= 4; levelNum = levelReg.currentLevelNumber; trace("levelNum==" + levelNum); UPDATE: "hasOwnProperty" works on reference as well: if (levelReg.hasOwnProperty("currentLevelNumber") ) { trace("we have a currentLevelNumber prop"); } if (!levelReg.hasOwnProperty("super peanutcats ") ) { trace("no super peanutcats");} Output: we have a currentLevelNumber prop no super peanutcats

Friday, February 1, 2013

Make sure object property exists

Make sure object property exists, java. Make sure object has a property. This works for both Java and Actionscript. Used it before. But couldn't remember what it was called. So Making a blog entry that is titled with the search terms I first thought of when looking for it in google. That I way I can find it again. //ANSWER: someObject.hasOwnProperty("propertyNameAsString"); hasOwnProperty will return TRUE if the property exists, false if not. Works for all objects in ActionScript and Java.

Wednesday, January 30, 2013

Saturday, January 26, 2013

GlitchMode

[ UPDATE: 2013.07.28: SWF FILE REMOVED. Have decided to keep game off internet until it is finished and copyrighted. ]

Tuesday, January 22, 2013

Ray lighting blocked out

[ UPDATE: 2013.07.28: SWF FILE REMOVED. Have decided to keep game off internet until it is finished and copyrighted. ]
//TODO: //Make game pause at beginning of level, and have camera track from the EXIT (end of level) to the beginning of level. That way player knows where to go.

Wednesday, January 16, 2013

Buffered Lighting System In

[ UPDATE: 2013.07.28: SWF FILE REMOVED. Have decided to keep game off internet until it is finished and copyrighted. ]
TODO NOTES:
Light todo simple:
A dark yellow tile will direct us to stamp a certain type of light at that coordinate.


Light todo ADVANCED:
Make it auto-project based on where it was set on the tile-map:
1. If tile directly below EXISTS:
 Project LIGHT THROUGH ALL TILES BELOW TILL YOU REACH FIRST EMPTY TILE

2. If tile NO TILE directly below:
        Project LIGHT till you hit a tile. Make light COVER that last tile that was hit.

3. If you have a HORIZONTAL row of CONNECTED light tiles, make all lights the SAME length.
   
4. If you have VERTICLE column of connected lights,
   DO step #3, but also make the lights project LEFT or RIGHT rather than DOWN.
   
 Deciding which way to project:
        Whichever side has the most empty space.

        Deciding how LONG the light is:
        Steps 1-3 still apply here. But on x-axis instead of y-axis.

Thursday, January 3, 2013

Binding Getters To Function Types

No, you cannot assign a function variable to a getter function. This code will error.

package 
{
        import flash.display.Sprite;
        import flash.events.Event;
        /**
         * ...
         * @author JMIM
         */
        public class Main extends Sprite 
        {
                
                
                public function Main():void 
                {
                        if (stage) init();
                        else addEventListener(Event.ADDED_TO_STAGE, init);
                }
                
                private function init(e:Event = null):void 
                {
                        removeEventListener(Event.ADDED_TO_STAGE, init);
                        // entry point
                        var hg:HasGetter = new HasGetter();
                        var func:Function = hg.getStuff;
                        func();
                        
                }
        }
}

internal class HasGetter
{
        public function get getStuff():Boolean
        { 
                trace("hay!");
                return true; 
        }
        
        public function HasGetter() { };
}

Wednesday, January 2, 2013

Making Calculations

NOTE: This post is personal notes. Not writing it to be understood by anyone else. Wondering if there is a way to extract alpha from a PNG using adobes PNG utility. To avoid this problem:
//TAKEN FROM STACK OVERFLOW:--------------------------------------------

Your problem is caused by the fact that Flash uses pre-multiplied alpha. Usually this is not a big issue, but it becomes very apparent if you have pixel values with very low alpha values which unfortunately are very common when you use a blurred soft-feathered brush. The pre-multiplication causes an information loss in the pixels - and when you have low alpha values the color values are effectively getting rounded down which when you are drawing slowly in your app and the same pixels are getting drawn over each other again and again will cause the area to get darker and darker. For some more details on the pre-multiplication issue check an old post of mine: http://www.quasimondo.com/archives/000665.php There is nothing you can do about this except if you handle the alpha channel and the rgb channel separately. But then you will also have to do all the compositing yourself which is not a trivial task and might slow down your app too much.

-------------------------------------------------------------------------
Hmm... Even if it was fixable, saving out PNG files with the correct alpha channel would still have problems. Don't use alpha channel.
 1234 5678  --Set bits describe which channel pixel exists on.
[1111 1111]R
[1111 1111]G
[1111 1111]B

Thus, each pixel becomes defined by 3 bits.
There are 8 possible combinations for bits:
BINARY  RGB-EQUIVALENT:

000 [000,000,000] BLACK
001 [000,000,255] BLUE
010 [000,255,000] GREEN
011 [000,255,255] CYAN
100 [255,000,000] RED
101 [255,000,255] MAGENTA
110 [255,255,000] YELLOW
111 [255,255,255] WHITE

Basically: Compressing 3bit color tilemap into a 24bit PNG. 24/3 = 8. Making file size 1/8th of what it would be otherwise. Of course, this limits your selection of tiles. But with clever auto-tiling, we've got something good here. Special items like entrance/exits will be defined in a text file. Shouldn't use a whole channel for something that is only ever going to use up, say TWO pixels on the entire level PNG.

I have 9 Levels

[ UPDATE: 2013.07.28: SWF FILE REMOVED. Have decided to keep game off internet until it is finished and copyrighted. ]
Game now has 9 levels loaded from PNG files.
Also has win/lose conditions.
It's somewhat of a game now.
TODO:
1. Gun that deters but does not kill enemies.
   Gun can also set off mines INSTANTLY, from a distance.
2. Enemies that are bound by gravity, but cling to the walls, making them
   more mobile than you.
3. Make it so you can die if you get caught in the blast.
4. Score will simply be stats on how long it takes to complete each level.
5. Ladder Tiles that allow you to climb. They will be immune to explosions.
6. Think about vines too. Maybe Cables in your game.
   Like this game android: http://www.newgrounds.com/portal/view/428733