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

0 Response to "Use MochiBot to Capture Player Feedback"

Post a Comment