Guide to Mochi Media services – How to set up a game and enable for Live Update

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.

Get the most popular Phaser 3 book

Through 202 pages, 32 source code examples and an Android Studio project you will learn how to build cross platform HTML5 games and create a complete game along the way.

Get the book

214 GAME PROTOTYPES EXPLAINED WITH SOURCE CODE
// 1+2=3
// 100 rounds
// 10000000
// 2 Cars
// 2048
// A Blocky Christmas
// A Jumping Block
// A Life of Logic
// Angry Birds
// Angry Birds Space
// Artillery
// Astro-PANIC!
// Avoider
// Back to Square One
// Ball Game
// Ball vs Ball
// Ball: Revamped
// Balloon Invasion
// BallPusher
// Ballz
// Bar Balance
// Bejeweled
// Biggification
// Block it
// Blockage
// Bloons
// Boids
// Bombuzal
// Boom Dots
// Bouncing Ball
// Bouncing Ball 2
// Bouncy Light
// BoxHead
// Breakout
// Bricks
// Bubble Chaos
// Bubbles 2
// Card Game
// Castle Ramble
// Chronotron
// Circle Chain
// Circle Path
// Circle Race
// Circular endless runner
// Cirplosion
// CLOCKS - The Game
// Color Hit
// Color Jump
// ColorFill
// Columns
// Concentration
// Crossy Road
// Crush the Castle
// Cube Jump
// CubesOut
// Dash N Blast
// Dashy Panda
// Deflection
// Diamond Digger Saga
// Don't touch the spikes
// Dots
// Down The Mountain
// Drag and Match
// Draw Game
// Drop Wizard
// DROP'd
// Dudeski
// Dungeon Raid
// Educational Game
// Elasticity
// Endless Runner
// Erase Box
// Eskiv
// Farm Heroes Saga
// Filler
// Flappy Bird
// Fling
// Flipping Legend
// Floaty Light
// Fuse Ballz
// GearTaker
// Gem Sweeper
// Globe
// Goat Rider
// Gold Miner
// Grindstone
// GuessNext
// Helicopter
// Hero Emblems
// Hero Slide
// Hexagonal Tiles
// HookPod
// Hop Hop Hop Underwater
// Horizontal Endless Runner
// Hundreds
// Hungry Hero
// Hurry it's Christmas
// InkTd
// Iromeku
// Jet Set Willy
// Jigsaw Game
// Knife Hit
// Knightfall
// Legends of Runeterra
// Lep's World
// Line Rider
// Lumines
// Magick
// MagOrMin
// Mass Attack
// Math Game
// Maze
// Meeblings
// Memdot
// Metro Siberia Underground
// Mike Dangers
// Mikey Hooks
// Nano War
// Nodes
// o:anquan
// One Button Game
// One Tap RPG
// Ononmin
// Pacco
// Perfect Square!
// Perfectionism
// Phyballs
// Pixel Purge
// PixelField
// Planet Revenge
// Plants Vs Zombies
// Platform
// Platform game
// Plus+Plus
// Pocket Snap
// Poker
// Pool
// Pop the Lock
// Pop to Save
// Poux
// Pudi
// Pumpkin Story
// Puppet Bird
// Pyramids of Ra
// qomp
// Quick Switch
// Racing
// Radical
// Rebuild Chile
// Renju
// Rise Above
// Risky Road
// Roguelike
// Roly Poly
// Run Around
// Rush Hour
// SameGame
// SamePhysics
// Save the Totem
// Security
// Serious Scramblers
// Shrink it
// Sling
// Slingy
// Snowflakes
// Sokoban
// Space Checkers
// Space is Key
// Spellfall
// Spinny Gun
// Splitter
// Spring Ninja
// Sproing
// Stabilize!
// Stack
// Stick Hero
// String Avoider
// Stringy
// Sudoku
// Super Mario Bros
// Surfingers
// Survival Horror
// Talesworth Adventure
// Tetris
// The Impossible Line
// The Moops - Combos of Joy
// The Next Arrow
// Threes
// Tic Tac Toe
// Timberman
// Tiny Wings
// Tipsy Tower
// Toony
// Totem Destroyer
// Tower Defense
// Trick Shot
// Tunnelball
// Turn
// Turnellio
// TwinSpin
// vvvvvv
// Warp Shift
// Way of an Idea
// Whack a Creep
// Wheel of Fortune
// Where's my Water
// Wish Upon a Star
// Word Game
// Wordle
// Worms
// Yanga
// Yeah Bunny
// Zhed
// zNumbers