Facebook Bookmark Bookmark Bookmark Bookmark Bookmark Bookmark Bookmark Bookmark My Bookmark

LorenzGames, All about Flash Games!

Follow me on Twitter!

How to import games to your site from MochiAds

June 27th, 2009 - Category: MochiAds, PHP, Publishers
MochiAds gives you the possibility to directly download the games to your site through JSON.
The problem is that many people has no clue how this thing works, that's why i have created a script that not only allows you to Download how many games you want from theire site, but gives you the possibility to use the button "Post to my site" that is on the page of every game on MochiAds for manuale downloading.

Mochiads Logo

This script will only unpack the JSON, then you will have to put everything in your own Database and downloading the files the way you want wherever you want. For example you can use the method:
file_put_contents("where you want the file to be", file_get_contents("url of the file on mochiads"));

The only thing you have to change in the code is the Publisher ID, you can find your own here.
If you are going to use the manual submission from MochiAds dont forget to add the link to the file where you put this script in "Auto POST URL".
I set the type of games to download to only featured games, if you want to download all just change "featured_games" to "all".
Please enjoy and share. Emoticon

PHP
$pubID = "Here put your Publisher ID";
$gt=$_POST['game_tag'];
$extrag=$_POST['extrag'];
$typeGame="featured_games"; // Change it to 'all' if you want to import all the games.
 
if($gt!=""||$extrag!=""){	
	if($gt!=""){
		$json=file_get_contents("http://www.mochiads.com/feeds/games/".$pubID."/".$gt."/?format=json");
		$n=1;
	}
 
	if($extrag!=""){
		$json=file_get_contents("http://www.mochiads.com/feeds/games/".$pubID."/".$typeGame."/all?format=json&limit=".$extrag);
		$n=$extrag;
	}
 
	$jsonArr=json_decode($json,true);
 
	$g=0;
	while($g<$n){
		$gameArr=$jsonArr["games"][$g];
		$name=$gameArr["name"];
		$description=$gameArr["description"];
		$instructions=$gameArr["instructions"];
		$swfUrl=$gameArr["swf_url"];
		$imgUrl=$gameArr["thumbnail_url"];	
		$category=$gameArr["categories"][0]; // This is an Array [0] will take the first catgeory choosen.		
		$keywords="";
		$nTags=count($gameArr['tags']);
		for($i=0;$i<$nTags;$i++){
			$keywords=$keywords.$gameArr['tags'][$i].' ';
		}
		$width=$gameArr["width"];
		$height=$gameArr["height"];
		$g++;
 
		echo "<a target='_blank' rel='nofollow' href=".$swfUrl." target="_blank"><img style='margin:10px 0px 10px 0px; border: solid 2px #FFFFFF;' src=".$imgUrl."> ".$name."</a><br>";
	}
}


HTML
 <br><input name="extrag" value="5" size="5" type="text"><br>MochiAds Games <input value="Download" name="Submit" type="submit"><br> 


Write a comment

How to add MochiAds to your game and earn money from it

June 21st, 2009 - Category: Developers, Flash, Monetize
As many of you know it, Mochiads as improved a lot in the past 2 years.
One of its competitors, GameJacket, failed last week.
Many developers are doing good money with the Mochi Advertising right now.
Are you doing it? Probably you should give it a try!

Mochiads Logo

Mochiads Version Control not only works as advertising but also protect the code of your game.
Here I am going to explain you how to add it to one of your games in ActionScript 3.

First important thing to do is, if you don't have an account, click here to Sign-Up MochiAds Developers Program.
Login in the dashboard and click on the yellow button Setup New Game.
Now it will ask you:
  1. The Title of your game.
  2. The dimensions of you game, write it how big it is, like 640x480 for example (The game must be not smaller than 300x300).
  3. Version Controll click Yes.
  4. Create Game.
In the Version Controll version you dont need to download the Include files from MochiAds.
Now it will ask you to Authenticate your game, write that string of code on the first frame of the time line, or in the document class. The string will be something like this:
var _mochiads_game_id:String = "your code";


If you are using a Document Class remember to clear everything from the Main Function.
For example let's pretend your Document Class is named MyGame.As inside you need to be sure it will look something like this:
package {
	//...imports
 
	public dynamic class MyGame extends MovieClip{
		//...declarations of variables
 
		public function MyGame () {
			//Here nothing!
		}
 
		//... other functions.
	}
}


Now select the colors of you preloader, you can even upload a custom image if you want, make a custom JPG the same size of your game and upload it to make it appear under the preloader line. It will look more fancy!

Then upload your SWF, give it a version number, like "1.0" or" 0.5alpha"... as you want... Emoticon
And eneter a little description only for you, like "First upload".

OK, now continue, download the file they just created for you, it contains the SWF you will have to distribute.
It's almost over Emoticon.
You need to fill out the game profile.

In Game URL write the Link of a page where people will be able to see your game and then upload the swf you just got there.

Add Description, an icon of 100x100 (I suggest you to make a very cute icon becouse it is the first thing people will see), Catoegories, Keywords and Save.
Great, now you are DONE!

Last thing to do if you want is to enable your game for distribution so that Mochiads will help you to spread it on internet.


Write a comment

Mochiads Or Gamejacket - Which One Gives More Money?

May 28th, 2008 - Category: Monetize
The War for the best In-Game Flash Advertisement is just started, the biggest company right now are know by almost all the developers, MochiAds and GameJacket, but, does everybody know all the details about them? Lets analyze their features searching all the Pros and Cons to understand what is the best choice for our game.

MochiAds

Pros:
- It is very easy to set up, just put a AS file they give to you in the same root of your game and put their code on the time line. - The game is accepted very fast. - When the advertisement is displaying, the game loads in background. Which is very important if you want to avoid a too heavy loading screen. - After the advertisement is displayed it automatically disappear. - Support Inter-Level Advertising, I don't suggest it because gamers hate it. - If you need it they provide you a very nice Leader Board to set up on your game. - You can personalize the colors around the advertisement. - You can upload your games on their server and use that space to show them on your Site or Blog. - The distribution of the game is good, but they could do better.

Cons:
- The eCPM (The effective cost per 1000 impressions) sometime is ridiculously low. It happened to me last month to notice that my eCPM was of 0.02 cents, this means that to earn 1 dollar I had to show 50.000 times their advertisement... of course I sent them a mail to understand why my eCPM was so low, the answer was: ...in your game you can see that most of the impressions are coming from Brazil and Thailand which do not currently monetize very well... - The statistics system is very cute but not very functional. Emoticon

GameJacket

Pro:
- The eCPM is always at least 0.50 cents which is the highest of its category. - The smaller size allowed is 300x250 (With MochiAds is 300x300). - As MochiAds they send you the payment via PayPal 28 days after the end of the month in which your earnings reach $100 (actually MochiAds is after 30 days). - If your game has never been published and they like it they give you $1000 advance in advertising royalty. If you earn more than $1000 in royalty, you keep that too. This means that if a game is very good you will earn $1000 instantly plus a minimum of 50 cents every 1000 times your game is played. - If you need it they have a team to help you to distribute your game on the other portals. - If your game has a bug and you have to fix it, but you already submitted it to a thousand of games portal, it's not a problem, you just send it to GameJacket and it is automatically fixed everywhere.

Cons: - To understand how to set up it you have to make some tests. - The statistics system has lots of options but sometimes it doesn't work. Emoticon - After the advertisement is displayed you have to click on Play to move on and usually it appears a screen without anything for 3-4 seconds before to show you the full loading screen. - I think GameJacket has some problem with the AS3 script, because sometime the Advertising Loader does some mess with the frames of the time line. - The advertising is not exactly on your SWF file, you have to submit them the file, then they give you another file of 10 Kb size which loads your file loaded on their machine, this means that if they go down, your game goes down with them. - Sometimes the game doesn't preserve the background color, so you have to create a square on a level of the game with the color you want to be sure it wont be lost. - The colors of the advertisement are just 2: white and gray. I think they are both very strong, for some aspects MochiAds looks better, but my personal experience says that with GameJacket you can earn more. I am still using MochiAds on some of my games though, just because for some reason they don't work on GameJacket. Emoticon


Write a comment