Talking about Actionscript 3, Flash, Game development and Monetize.
I am using Mochi Media services for almost four years and I was the first to use their in-game leaderboards, so when I recommend them I know what I am talking about.
What happened during these years? Mochi grew a lot and from a simple service to display ads and let you earn money, like a lot more you can find on the web, became a complete solution to improve players’ experience allowing you to track links, introduce achievements, leaderboards, in-game shops and more, while keeping the main feature: let developers make money with their games.
With this huge set of offers, often new developers get lost and end with adding Mochi APIs without the full control of their power.
This guide will cover all Mochi services with a real world example, to make clear how to get the most out of your game and the Mochi API.
Your first Mochi game
If you aren’t already registered with Mochi Media do it, and once you are logged in select ADD GAME:
You will be asked to fill some basic game informatin in the Add a New Game page:
Enter the title, the dimensions in pixels with the [width]x[height] format, agree to terms and conditions and enable Live Updates.
Enabling Live Updates will give you access to an incredible set of features, such as:
* Your game will be encrypted, preventing it to be decompiled from code thiefs
* Your game will be loaded with a Mochi preloader showing an ad. No need to build your own preloader, and you are making money at each game load.
* If you game is widely distributed around the web and you need to fix a bug or make any kind of change, just do it and update the game on Mochi servers. They will take care about the rest.
Then, click on CREATE GAME and proceed to next step.
Here you will be asked to authenticate your game. It’s simple, as you just need to copy/paste the line of code with your Mochi game id into your game.
In the example I am making, the code of the main class is this one:
package {
import flash.display.Sprite;
public class Main extends Sprite {
private var _mochiads_game_id:String = "7a2e0f0bad9d0c77";
public function Main() {
var game:gameMc=new gameMc();
addChild(game);
}
}
}
As you can see at line 4, there is my game id.
That’s all. Although the page suggests you to download and include their APIs, it’s not necessary at the moment.
Now you have to style the preloader ad. You don’t want to use the default preloader, so we will upload our own image.
Here is the image I am using:
Notice how there are reserved spots in the background, where the ad and the preloader bar will be shown.
Finally upload the game, give it a version number and a description which won’t be public and will help you to recognize the various versions of the game you are working on, and press UPLOAD YOUR GAME.
Eureka! Your game is ready to make money.
Now you can download your live updates enabled game inside the zip package. Extract the game from the zip package, execute it and you should see this screen:
Press DONE to complete game creation.
You will be brought to your game dashboard, but we will look into it next time, meanwhile here it is the game with the Mochi live updates preloader enabled:
You may need to reload the page to see the preloader working.
At this step, your game isn’t actually making money because it hasn’t been approved yet. But you can test everything is ok with preloader and custom background placement.
Never miss an update! Subscribe, and I will bother you by email only when a new game or full source code comes out.