Distributing an online Flash game
I guess this article should really be titled Developing An Application Using Flash And AS 3: Part Five: Distributing an online Flash game, however that sounds a bit of a mouthful.
In my quest to put together a flash game (see Developing An Application Using Flash And AS 3: Part Four), I have spent a little time looking at the distribution channel – after all, there is little point in having a game if no one knows about it. For these purposes I have looked at 5 channels to provide a distribution facility to my online Pairs game.
Self Hosting
The first place to start is to upload the game onto my own site at jasonslater.co.uk – in the newly created Games section and to Twitter about it to let people know what it is and where it is. So far it has amassed an incredible 17 plays – I clearly need some distribution help.
The game is located at Play Pairs Game.
Surprisingly, finding a number of suitable mechanisms for distributing my game isn’t as straight forward as I initially thought it might be but I soon discovered four popular ones: MochiMedia, Kongregate, MindJolt and Newgrounds.
MOCHIMEDIA
The first place I looked at in my quest to find someone with real experience of distributing online games to partner with led me to MochiMedia. Using MochiMedia for distribution also provides additional opportunities for high score leader board provision, and possible ad placement.
The process seemed quite straightforward – setup an account, create a game, upload it and join the distribution channel. I had difficulties implementing the version control and encryption system but the automatic adding of ads into a pre-loader was quite straightforward and I soon got my game approved and into distribution.
There is quite a lot of documentation to help you get up and running using MochiMedia, however much of this is aimed as AS2 using timeline coding techniques. The AS3 system was much more simplified but I couldn’t get it working initially so it must have been something I was doing wrong – and indeed it was (having a deeper knowledge of Flash and AS3 would have helped). It turns out I needed to add a couple of lines of code to my main loop class (the one pointed to from Flash). The adFinished in the code below simply points to wherever the main game logic is stored.
if (stage)
initStage(null);
else
addEventListener(Event.ADDED_TO_STAGE, initStage);
private function initStage(e:Event=null):void
{
stop();
stage.frameRate = 30;
stage.showDefaultContextMenu = false;
stage.scaleMode = StageScaleMode.NO_SCALE;
callMochi();
}
private function callMochi() : void
{
stop();
MochiServices.connect("yourid", this); MochiBot.track(this, "yourbotid");
mochi.as3.MochiAd.showPreGameAd({clip:this,id:"yourid", res:"460x470",ad_finished:adFinished});
}
I tore my hair out for a few days over this for which I am grateful to Bob from Mochi and kegogrog from Monetizing flash games: MochiAds version control & encryption issues for helping me through it.
The main part of the code is the Event.ADDED_TO_STAGE parameter. I had originally used Event.ENTER_FRAME which was causing a slow game and MovieClips to be overlayed upon each other (from the Adobe ActionScript 3.0 Language Reference: this event is dispatched continuously in conjunction with the frame rate). The ADDED_TO_STAGE is executed once when a display object is added to the stage.
Now I have it up and running and everything seems to be working fine and version control is of great benefit when making revisions to the game.
Since uploading my Pairs game I have netted an incredible amount of 12 cents after 2,073 impressions.
KONGREGATE
Portal site Kongregate has been the easiest so far to get started. I simply set up an account uploaded my game and off I went. There are APIs available within Kongregate to further add to the experience but I have yet to implement any of these – Kongregate say they have an arrangement with Mochi which means I don’t have to remove my Mochi API from the game.
Since uploading my Pairs game I have netted an even more incredible 62 cents after 438 plays. Add this to the Mochi revenue and I made nearly 50 pence in UK money – not that I ever expected to make any money doing this but it shows why online flash gaming is becoming a popular activity – it almost has the feel of the 80s home computer boom.
MINDJOLT
MindJolt prefers you to add their own score submission API for high score management though I am not sure how that works if the game is Mochi enabled. Since uploading the game it is still in the processing queue – I will report more if and when it moves along.
NEWGROUNDS
It took some time finding the submission area on the Newgrounds site but I got there in the end. The game has only been submitted in the last few hours and is reporting as being “UNDER JUDGEMENT” – I can almost hear the drum roll. I will report more when I get more information.
-
You can also use http://flashgamedistribution.com/ to distribute your games. They have an automatic distribution and a nice list with sites that accept manual submits,
-
In distribution, shouldn’t you talk a bit about spreading it to the masses. Check out http://gumbota33.mybrute.com to see how they’ve slanted the game to enable this viral spread.
Comments