Tuesday, August 20, 2019

Title changed.... no more Flash Game Programmer.

Seeing how Flash is gonna be booted out soon, and trying to stay relevant in today's game community, I have decided to change the title of the blog to 'Indie Game Programmer'. That ought to last a few years.

Sad to see Flash go as I have been with it since the old Macromedia time then with Adobe. Seeing how HTML 5 is being used mainstream nowadays, hopefully Flash will not be forgotten like how WinPlay was forgotten as the first MP3 player for Windows.


Still remember how the older / slower PC's tend to stretch the music, slowing it down whenever there were other programs running in the background. Getting a 4MB mp3 from the net takes close to an hour sometimes, well at least from where I was back in 1997.

Compressing MP3 was my biggest feat, before that everything was wav wav wav wav... and animations came in the form of flc, fli.
3D Studio DOS and Lightwave 3D 4 was the way to go.

Image result for lightwave 3d 4
Image result for 3d studio 4 for dos

Yup.. those were the days...

Monday, June 24, 2019

Wow... it has been long.

I looked back and realized that my first ever post was back in 2008... which makes this blog around 11 years. How things have changed. We moved on from the hey days of flash games right into mobile games in less than 10 years. This also means whatever method and codes that we learn back then is now obsolete. Gone were the adverting platforms fro flash and in came those for the androids and iOS.

Funny how time moves fast... and I am not even having fun. Technology moves even faster.

Flash games have suffered on a very steep decline... making money? Only a handful of them still pushing on. Moving on, you have seen my ahem... Invader Defender being updated for Android 2 years ago (but was launched in 2013) and then I kinda disappeared from the gaming scene. Its not moving, not getting the results that I thought it would... to be honest it's actually not much to play after you finish the rounds which dare I say it, not that entirely hard to do so.

Maybe I should do something about this. Long live Invader Defender!

Tuesday, January 2, 2018

Happy New Year 2018!

Yes I am still here. More games and more players please...

Nintendo is picking up with it's good start on the Switch sales of over 10 mil units in the first year! Congratz. I am a fan of Nintendo since the original gameboy. Yup... with it's monochrome screen and cartridge and that awesome close to a day's worth of 4x AAA battery life, I must have spent loads on batteries which must have contributed to global warming :(. Anyway to cut things short, it would be great is there are other development platforms which can develop Switch games besides Unity3D. Fusion 2.5 / 3.0 perhaps? We will just need to wait and see.

Have a great year!

Friday, May 12, 2017

Invader Defender for Android Updated.

Updated Invader Defender for Android (v3.0) includes better shooting feel. It has been some time since I updated this blog. I have just updated my old android invader defender.


Wednesday, July 16, 2014

HTTP Error 503. The service is unavailable.

Okay. Took me some time to fix this. Usually I don't post things like this but after spending some time on searching for an answer (which there is none at time of writing) and after experimenting here and there I finally found out what went wrong and how to go around it.

I updated a Window patch on my My Win 7 Pro updated itself few days ago and that kinda did something to my ASP.NET 4.0 - IIS 7 combo. It cracked it. I am stunned to be presented with this screen

Okey, you are probably here for answers so... long story cut short... fix it by going to your local IIS Application Pools -> Choose your Pool (ASP.NET v4.0) -> Advanced Settings -> Process Model -> Identity

I changed it to "Local System" to get it working. I am not advising you to do this cause that's a lot of power given to the Pool. The recent reason this error surfaced is because the patch somehow screwed up the access rights of the original ApplicationPoolIdentity. Quick fix just to get it working again. To really fix it, give the rights back to the ApplicationPoolIdentity.

This fix only works for access rights issues and does not work for all types of "HTTP Error 503. The service is unavailable." that might creep up in time.

Wednesday, March 26, 2014

Preloader in Flash Develop

From my previous post, once you have started to embedding swf (huge ones especially) you probably notice that while loading, you are faced with a blank screen or suffers from preload animations... depends on how your project is. So there must be something to do away with this... ... something called preloader. Thankfully, there is a project type in Flash Develop called..."AS3 Project with Preloader"

What it does is it creates a project with a preloader.as. Yup...

And if you view in the Main.as, you will spot the preloader in the
Just compile away and you have your very own swf with a preloader.

Now look into preloader.as

You get comment sections like
// TODO show loader 
// TODO update loader
// TODO hide loader
They are simply placeholders that you can add codes into.

Now in a preferred situation, you will want to add a background image in your preloader. First make an image. I name mine "preloading.jpg"

Put it in the same directory as the codes and add in
[Embed(source = "preloading.jpg")] public var PreloadLogo:Class;
right at the start of the class Preloader declaration. Now in order to use the jpg image you need to add
import flash.display.Bitmap;
at where the imports are. Now at the // TODO show loader, add
var activeLoadBitmap:Bitmap = new PreloadLogo();
That's it. Just compile and run it. Yeah.. it works...

What do you mean you want more?
Status? Progress?

Ok I will add a textfield to this just to show the progress status.
Now in order to use a textfield, you need to add
import flash.text.TextField;
Then at the start of the class declaration add in
public var textFiled01:TextField = new TextField;
public var loadperc:int;
Now right after the addChild(activeLoadBitmap); add...
Now at the // TODO update loader add in these two lines...
loadperc  = e.bytesLoaded / e.bytesTotal * 100;
textFiled01.text = "Load " + loadperc.toString() + " %";
Compile and ran... that's it. now your preloader comes with a 'Load xxx %" shown on the top left corner! And it will automatically goes to the "main" after finish loading. Here is how mine look like...

Friday, March 21, 2014

Mochimedia closing down :( Absolute beginner blurrr case scenario for MMF users for Ad quickfix with Flash Develop

Well mochimedia will be closing it's doors coming 31st March 2014. :( With this, it will be the end of all my ads revenue from mochimedia. I have been using Multimedia Fusion for my flash games for some time so adding in the mochiads is rather simple as it's a built in feature for MMF Developer Edition.

The two immediate alternatives for ads I found is FGL and ZuperAds. FGL has been a long player in the industry while ZuperAds is a startup that is shaping up rather nicely after mochi's announcement of it's closure. None of them had an extension in Multimedia Fusion for it's flash exporter :(. I am sure sometime later it will be in but meanwhile I am left with embedding the swf files created by MMF in another SWF which acts as a container that serves the ads.

I am going to walk through on how to add FGL ads as at time of writing, ZuperAds requires you to call ZuperAds,hideAd(); to hide the ads once it's displayed while FGL handles the close ads on it's ad container itself... just to keep it simple.

This might not be the best way but it works... for now.

Ok here goes... what you need.
  • FREE Flash Develop - Get it HERE
  • . Download get the latest. I got mine yesterday ver 4.5.2 Zipped version.
  • FREE Adobe Flex SDK - Get it HERE Now if you got the Flash Develop Zipped version like me, you need to manually download this.
  • FREE Flash Player Active X Debug version - Get it HERE
Yes... I am a bit on a tight budget so everything used is FREE. Even the screenshot I captured was done in FREE GIMP.
Now the hard part... go through Flash Develop Wikidocs on how to set it up properly.

Once it's up and running, create your first Flash Project as shown below.

Make sure you choose AS3 Project and not the default 'Flash IDE Project' or you gonna have problem. I named my project 'TryFGL'

Now you will get a project which has a file class called 'Main' under the src folder. Just go there and click on the Main.as file to view the content. It should look like below

Now try to compile the project... right click on the project and choose 'Built Project'

If everything goes well, the output window at the bottom should show some things that ends with a blue Done.

Congratulations! You are a winner! Ahhh... that's not that bad. You have compiled your swf. It's located in your project directory's bin directory.

Now you need to signup with FGL to get the codes... well I am not going to walk you through the signup and getting the codes part. Just go to FGL.
I am just gonna assume you are able to figure it out by yourself, get the "FGLAds.as" file and get to the 'Download Ad Code' button to actually download the ad code for your game. You will get something like [NAMEOFGAME]_adcode.as. Mine is InvaderDefender_adcode.as.

Just copy the two files over to your project's src folder along with your SWF files created from MMF. Mine is InvaderDefender.swf

Open up the [NAMEOFGAME]_adcode.as. It should look like this.

Note the FGL Ad code number "FGL-2xxxxx28". Now go back to the main.as code and edit it as below.

Ok for those lazy lads that do not like typing... here is the code
 import flash.display.MovieClip;
 import flash.events.Event;
 import FGLAds;
 [SWF(frameRate='30', width='550', height='400', backgroundColor='0xffffff')]
  * ...
  * @author 
 public class Main extends MovieClip
  [Embed(source = "InvaderDefender.swf")] public var MMFswf:Class;
  public var ads:FGLAds  = new FGLAds(this, "FGL-2xxxxx28");
  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
   ads.addEventListener(FGLAds.EVT_API_READY, showStartupAd);
   var MMFswf:MovieClip = new MMFswf() as MovieClip;

         MMFswf.x = 0;
         MMFswf.y = 0;
  private function showStartupAd(e:Event):void 

Now, if only you would spent some time to read and understand the codes... but I guess you won't so... for a quick fix just change the

InvaderDefender.swf to your MMF swf filename.
FGL-2xxxxx28 to your FGL Ad Code.

Now lets compile! Yup... that's it! You have successfully embedded your MMF produced SWF into a new SWF with an ad container from FGL. Just click on your index.html in your bin folder.

Your FGL ad should display on top of your game!

Hope this article is useful.