Play With Your Peas

Play With your Peas

Play With Your Peas Another Lost Garden Prototype

I'm just about finished creating Play With Your Peas. This is another Lost Garden prototyping challenge game. The challenge was posted back in 2008 and I had created a prototype back then, but was never able to get enough fun out of it to publish. I started designing new ways to make the game fun and pulled in the ideas that Daniel Cook had posted when he gave out the medals for the challenge. 

The game  is now available on Flash Game License:

Use MochiBot to Capture Player Feedback

The fun rating is great for getting a quick view of what players think, but it is always fun to read actual user comments. You could spend all day roaming around the Internet looking at message boards on the three hundred sites where your game has been hosted or you could implement an in-game comment system. Even though I do enjoy going to Kongregate and reading "stolen!!!" or "1/999999999" on my games, I decided to implement a system that would send comments from all the sites where the game is played. Luckily Mochi Media has a Feedback API as part of the MochiBot system. Their example code is all in AS2 but it is just a simple POST, so I rewrote it in AS3. I updated the MochiBot class and added comment submitting and vote submitting. You can download the updated MochiBot class here:

Sending a Comment

import mochi.as3.MochiBot;
if (MochiBot.checkCommentLimiter(MOCHIBOT_ID, 30))
MochiBot.submitComment(comment, MOCHIBOT_ID);

Sending a comment is very easy, just call MochiBot.sendComment(commentText, MOCHIBOT_ID). However, you will want to minimize the amount of spam you get, so I implemented a commentLimit function that let's you check if the user has already sent a comment during a time period that you specify. The comment time is stored in a SharedObject and when you call checkLimit the current time is compared to the stored time. In Word War I the comment box is shown on the game over screen only if the user has not commented in the last 30 minutes. I am hoping that by only showing it on the game over screen most of the spammers will not spend the time to play the game. You can also limit the user to one comment ever by passing a -1 as the time limit, or allow as many comments as they can submit by passing a zero.

That's all there is to using the MochiBot Feedback API.

View comments for Word War I

Using Google Events to Track "Fun Rating"

Inspired by the Flash Love Letter Part 2 by Daniel Cook, I've included a fun rating in my latest game Word War I. The Word War I game has five stages and the rating is shown to the user once between one of these stages. The stage to show the rating is chosen randomly before the game starts and is only shown the first time you play. The player is given a dialog that asks them to rate the game 1 to 5, with 1 being hate it and 5 being loving it. I chose to store the rating by the stage that the user is on and the difficulty that they are playing. So in Google Analytics, I can see how many Fun Ratings I have and see what the rating is at each stage of the game. GA also shows the combined average of all the scores.

Example Data

This chart is showing 1034 votes over a one week period and the average fun rating is 3.12, which means according to the Flash Love Letter that I probably shouldn't charge anyone for this gaming experience :) Interesting that the players who were shown the rating later in the game tended to give it higher ratings, probably would be true for most games. One really cool thing about this being Google Analytics is you can use the Dimension drop down to further break down the average rating to see how your game is doing by a continent, browser, ect... . Europeans are giving the game a much lower score, 2.95, than Africans, 3.5, and people in Woodstock only think it is worth a 1 but people in Baltimore love it 5.

How To Use Event Tracking

Follow my previous post on including the swc files and add the import statements and create the tracker object. Then at the location in the game where you want to track an event add the following code:
label:String = null,

tracker.trackEvent("Word War I",
"Fun Rating",
currentLevel.type + gameStage.stageURL,
The trackEvent function takes four parameters. The first parameter is the event category, for the category I used the Game name so in the GA control panel I will see all the events for "Word War I" listed in the same area. The second parameter is the action, I called my action "Fun Rating." The third parameter is the label, the label I used is the location the user is in the game and the difficulty they are playing. The label is useful for tracking where the user was when they submitted this Fun Rating. The last parameter is the actual rating the user submitted.

Tracking Events vs Page Views

The benefit of events is that you can assign a value to the event. The values are automatically averaged for you. Events should be used for things like average playtime or to see how many people use a certain item. Make sure you don't send too many events from your game, there is a limit on the number of events and page views you can send in one session. On Word War I also created an Event for trackacking how many games a user plays. The number of times played is stored in a SharedObject and incremented each time they click a difficulty level to start a game. I am trying to see how many players only play once versus play multiple times.

The benefit of the pageView is you can setup goals and see how far users are progressing and where they are dropping off. I've found the Funnel Visualization to be the most useful feature for seeing where I should make changes.

A Note on Goal Funnels

I setup goals for this game to see how far the average user was making it in the game, but I sent out the pageView "gameOver" whether they finished all the levels or were killed on the first level. The funnel visualization graph started showing that everyone who finished the first level then went on to finish the game, which I know isn't true because the Hard level is almost impossible to finish. So make sure you send out a different pageView url for "gameOverKilled" versus "gameOverFinishedGame."

Play Word War I and other Typing Games at

New Game: Word War I

The last few weeks I've been busy developing a game for the Word Play competition. It is inspired by the old Paratroopers game. The paratroopers are letters and to shoot them down you have to type the word that the paratroopers are forming. Which would be easy except some of the letters are missing. Anyways, I tried out new web based screen capture program called Screenr and here is a short video showing the first level of Word War I:

How to Use Google Analytics in a Flash Game

For this tutorial I will be using Flash Develop and the Google Analytics for Flash library. I will show how to use the trackPageView function to track player progress in your game. You will need to sign up for a Google Analytics account.

Setup Library
First, download Google Analytics for Flash. Copy the two .swc files from the lib directory in the zip into your project. In Flash Develop edit your project properties and under Compiler Options add the two .swc files to SWC Libraries.

Add Tracking Code to Project
In your AS3 class you will need to add the import statements, initialize the tracker, and call trackPageView.

tracker = new GATracker(stage, analyticsCode, "AS3", false )

Create the tracker by passing in a reference to the stage and your tracking code. The analyticsCode is your Google Analytics tracking code you can use any site for your tracking code. I am actually using the same tracking code for this blog as I use for the game. (Where can I find my tracking code?) Once the tracker is created you can call tracker.trackPageview anytime you want to send a new page view event to your Google Analytics. The page does not need to actually exist. For my game I send page views for each rod and a page view for finishing the game.

Setting Up a Goal
On the Website Profile page in GA click Edit next to the profile you are using for this game. Under Conversion Goals and Funnel click Edit to create a new Goal. Set the Goal Active to On. The Goal URL is the "page" you are going to use for game over or whatever you want to have the user finish. The Goal Name is just a readable title for that goal. Now enter the steps to reach that goal, so for my game I have the steps of starting the game and getting each of the rods. Leave out the final game over step, that will be included for you. Click Save Changes.

Today's Data
Most people (including me) assume that you only get data the next day because by default Analytics only shows up till yesterday. However, you can get today's data by opening the date range calendar and clicking on today's date.

Tracking Player Progress using Google Analytics

I've been trying to find an easy way to track the progress of players in my Fisher Girl game. Up till now I've been using Mochibot to track the number of people playing the game, but there is no information about how many players actually made it to the first rod or how many players come back and play again. Google Analytics is great for giving tons of details about your users for websites and can be used in a flash game to give the same information even if the game is hosted on multiple portals.

The latest version of the Fisher Girl game was created for mindjolt and includes the analytics tracking code. In the Fisher Girl game the fishing rod is the leveling mechanic. The better your rod level is the farther you can cast and the better fish you can catch. To win the game you must purchase all the rods and save the Fisher Boy. I setup a Goal in Google Analytics for tracking how many people go through all the steps to finish the game. The goal steps are:
  1. Game start
  2. Purchased silver rod
  3. Purchased gold rod
  4. Purchased legendary rod
  5. Game Finished saved fisher boy.
Using the goal I can track where users are dropping out of the game. Here is the Goal Funnel Visualization for three days on

Click the image to see full size.

So you can see how many people dropped out at each rod level. The worst area seems to be between level one and level two where only 34% of the players keep playing. The percentage of players progressing between each level is staying very consistent with only a few percentage points of difference each day. That should make it obvious if any changes increase player retention or not. For my next game update I'll focus on making that second part of the game more interesting and minimizing the frustration of losing lures to turtles.

Update (7/21/2009): After just moving the turtles near the second buoy down, so they wouldn't eat the lure as soon as it hit the water and removing one turtle, the average progress rate between level one a level two went up from 34% to 42% , which increased the game finish average from 6% to 10%.