Scuba Chibi Postmortem #2: Data and Analytics

About two weeks ago on Thursday, June 18th, I released my game Scuba Chibi to the iOS App Store.  You may be wondering, how has it been doing since then?  I’m going to grab data from iTunes Connect App Analytics, Google Analytics, my blog, my Facebook page, and my Twitter.  Let’s see how this game held up day by day, week by week!

iTunes Connect App Analytics

This shows the number of app downloads

IOS Daily Downloads 6/19 - 6/28
IOS Daily Downloads 6/18 – 6/28
IOS Country Downloads 6/19 - 6/28
IOS Country Downloads 6/18 – 6/28

TOTAL APP DOWNLOADS (6/18 – 6/28): ~99-102 (?)

Google Analytics

New Users:

  • THU 6/18: 17
  • FRI 6/19: 37
  • SAT 6/20: 13
  • SUN 6/21: 3
  • MON 6/22: 2
  • TUES 6/23: 1
  • WED 6/24: 4
  • THURS 6/25: 0
  • FRI 6/26: 0
  • SAT 6/27: 3
  • SUN 6/28: 1
  • MON 6/29: 2
  • TUES 6/30: 15
  • WED 7/1: 4
  • THURS 7/2: ?

Active Users:

  • THU 6/18: 19
  • FRI 6/19: 39
  • SAT 6/20: 20
  • SUN 6/21: 11
  • MON 6/22: 7
  • TUES 6/23: 5
  • WED 6/24: 7
  • THURS 6/25: 2
  • FRI 6/26: 5
  • SAT 6/27: 5
  • SUN 6/28: 6
  • MON 6/29: 4
  • TUES 6/30: 19
  • WED 7/1: 6
  • THURS 7/2: ?
New Users / Active Users 6/18 - 7/2
New Users and Active Users 6/18 – 7/2


  1. United States: 156 sessions (69.03%)
  2. China: 36 sessions (15.93%)
  3. Germany: 6 sessions (2.65%)
  4. Vietnam: 4 sessions (1.44%)
  5. Switzerland: 3 sessions (1.33%)
  6. United Arab Emirates: 2 sessions (0.88%)
  7. France: 2 sessions (0.88%)
  8. United Kingdom: 2 sessions (0.88%)
  9. Netherlands: 2 sessions (0.88%)
  10. Russia: 2 sessions (0.88%)
  11. Argentina: 1 session (0.44%)
  12. Canada: 1 session (0.44%)
  13. Spain: 1 session (0.44%)
  14. Indonesia: 1 session (0.44%)
  15. India: 1 session (0.44%)
  16. Philippines: 1 session (0.44%)
  17. Poland: 1 session (0.44%)
  18. Venezuela: 1 session (0.44%)
Countries 6/18 - 7/2
Countries 6/18 – 7/2

Top Device Models:

  • iPhone: 142 sessions (77.6%)
  • iPad: 41 sessions (22.4%)

User Engagement:

  • Screen Views: 285
  • Average Time On Screen: 00:02:33
  • Crashes: 0  😀
  • Events:
    • Ad Views: 500
    • Button Clicks:
      • Game Over Menu – Play Again: 367
      • Main Menu – Play Game: 240 
      • Main Menu – View Instructions: 98
      • Instructions Menu – Back to Main Menu: 94
      • Game Over Menu – Back to Main Menu: 52
      • Game Over Menu – Share Facebook: 4
      • Game Over Menu – Share Twitter: 2
    • Score View: Game Over Menu – LocalStorage Score: 147 (this is the number of times the high score was saved in the device’s local storage)
User Engagement 6/18 - 7/2
User Engagement 6/18 – 7/2

WordPress Blog –

Best Views Ever: 197 on Friday, June 26

Blog Stats - June/July
Blog Stats – June/July

I couldn’t pull data that includes info from 6/18, but here is data from 6/25 – 7/5:

Blog Stats 6/29 - 7/5
Blog Stats 6/29 – 7/5

These are my all-time most popular blog posts:

Top 10 Most Popular Blog Posts
Top 10 Most Popular Blog Posts

Facebook Page –

Page Likes

  • THU 6/18: 14
  • FRI 6/19: +30
  • SUN 6/21: +11
  • MON 6/22: +3
  • TUES 6/30: +2
    • TOTAL: 60 likes
Facebook Likes 6/18 - 7/2
Facebook Likes 6/18 – 7/2

Twitter –

THU 6/18 – THU 7/2:

  • Tweets: 4
  • Tweet Impressions: 727
  • Profile Visits: 67
  • Mentions: 1
  • Followers: 43
  • Engagement Rate: 4.3%
  • Link Clicks: 12
  • Retweets: 8
  • Favorites: 12
Tweet Impressions 6/18 - 7/2
Tweet Impressions 6/18 – 7/2



What can we draw from this data?  Hrmmm…

  1. Well, I admit that I am no expert in marketing, and I spent $0 on marketing, so the numbers are not high and are also decreasing.  :'(  Lol.
  2. Also, although we saw some low numbers in New Users in Google Analytics, we still saw that there were Active Users each day, even on the days when New Users were at 0.
  3. Interestingly, if the data holds correct, there were more app downloads in China (according to iTunes Connect App Analytics), but more sessions in the U.S. (according to Google Analytics).
  4. Furthermore, the day after the release (Friday, 6/19) had the highest number of downloads, New Users, Active Users, and the highest increase in Facebook likes.  I think it had to do with people seeing the news about the app up to a day late, because the other Fridays don’t necessarily have any high numbers.
  5. There was a bit of an increase in New Users and Active Users on Tuesday, 6/30.  I am not sure how or why that happened.  I didn’t do any blog posts, Facebook posts, or tweets on that day.  Hrmmm!
  6. However, on Friday, 6/26, the Scuba Chibi blog was mentioned on the Phaser website, so that day I received 197 views, my best views ever for my blog!

In my next postmortem, I am going to write about the backstory of Scuba Chibi and how the game evolved into what it became.  It should be interesting from a game design perspective.  Stay tuned!

Scuba Chibi: What’s Next?

In as much as I would like to move on to my next project, there are still a few things I need to finish with Scuba Chibi:

1. Android Support

Android friends, I haven’t forgotten about you.  I’ve tried out the game on Android, but it appears that Ad Mob and Phaser.js are not working well together.  If I remove Ad Mob, then the game loads fine.  I might have to look into using another Ad Mob plugin that works in Phonegap, or maybe I’ll do some Javascript magic without a library.  We’ll see.  There are also some resizing issues that I would need to take care of.  The game does not resize to the screen for my Android tablet.  This will be fun…

2. Suggestions?

I’ve had some suggestions as far as leaderboards, more enemies, and more backgrounds.  All are possibilites!  🙂  Any other suggestions?  🙂

Stay tuned for my upcoming blog post when I do my Postmortem #2 – Data and Analytics!

Scuba Chibi Released to the iOS App Store!

Scuba Chibi is now available on the iOS App Store!  Check it out!


Other links:

Scuba Chibi website:

Facebook page:



Scuba Chibi Postmortem #1: The Technical Learnings

I can finally say that Scuba Chibi is done and will soon be released to the iOS App Store!

As simple as this game is, it actually took me a whole lot longer to finish than I had expected.  Most of it was due to finding the free time to actually work on it.  But it was a lingering item on my To-Do list and I wanted it done and over with so that I can move on to my next project.  🙂

Nevertheless, from a technical and artistic standpoint, it was fun to work on.  It was a game that I had made with Phaser, Javascript, and Phonegap Build.  I do Javascript for work and I have played around with some small Phaser examples, but I am new to Phonegap Build.  So there would be times when I ran into some issues here and there and after googling for some solutions, I could not find any, so I resulted in doing a bit of trial and error.  That is where my blog comes into play.  I’ve always thought that my blog would be my way to remind my future self on how to do things.  Because let’s face it, I have a bad memory :-).

So here is a compilation of technical things that I have learned along the way while making Scuba Chibi:

Also, here are some blog entries for the art that I made for the game:

So, look out for my game Scuba Chibi, coming soon to the iOS App Store! 😀

Check if Device is Ready in Phonegap

Apparently, you have to check if your device is ready before you can use Phonegap plugins like Google Analytics and Admob.  Use the “deviceready” listener:

if(( /(ipad|iphone|ipod|android|windows phone)/i.test(navigator.userAgent) )) {
  document.addEventListener('deviceready', initApp, false);
} else {

Custom Share Buttons in Phaser and Phonegap

So let’s say you want a Twitter share button and a Facebook share button at the end of your game. With Twitter, you can share your high score. With Facebook, you can share your game’s website link. Here’s what you do.

Make a function for opening a window in a browser. For more on that, see

In index.html:

function openDeviceBrowser(externalLinkToOpen) {, '_system', 'location=no');

In JS:

// Custom share buttons in Phaser
shareTwitterButton = game.add.button(10, 10, 'shareTwitterButton', this.shareTwitter, this, 0, 0, 0);
shareFacebookButton = game.add.button(10, 50, 'shareFacebookButton', this.shareFacebook, this, 0, 0, 0);

openDeviceBrowser() opens a URL that uses Twitter web intent. More on that here –

shareTwitter : function() {

The Facebook sharer.php is no longer documented, but it should still work. Just replace “http://custom_url” with your own custom url.

shareFacebook : function() {

The HTML of the URL that you are sharing should have the proper <meta> tags. That way, data such as a title and image will populate when you share your link. For Twitter, see For Facebook, see

Example (put these in your <head> tag in the HTML of the web page (http://custom_url above) that you are sharing):

<!-- Twitter Card data -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@custom_twitter_handle">
<meta name="twitter:title" content="Custom Title">
<meta name="twitter:description" content="Custom Description">
<meta name="twitter:image" content="http://custom_image.png">
<!-- Facebook Open Graph data -->
<meta property="og:type" content="website">
<meta property="og:title" content="Custom Title">
<meta property="og:url" content="http://custom_url">
<meta property="og:description" content="Custom Description">
<meta property="og:image" content="http://custom_image.png">

Object Pooling Example in Phaser

Scuba Chibi is potentially endless, so if I’m up to 120 points or so, I could experience lots of lag if I don’t use object pooling. It’s because I’m doing a lot of creating and deleting of objects (i.e. the enemies), and that wastes memory. This is a situation when object pooling becomes useful, so that I just deactivate objects that aren’t used and then reactivate them when they need to be reused.

So let’s make an object pool for enemies and have up to 10 enemies of one type on the screen at one time.

this.enemyPool1 = [];

Create all the enemies in the object pools, but deactivate them. Setting “obstacle.outOfBoundsKill = true;” means that the enemy will be deactivated when they go offscreen.

create: function() {
  var obstacle;

  // define obstacle group
  this.obstacles =;
  this.obstacles.enableBody = true;
  this.obstacles.physicsBodyType = Phaser.Physics.ARCADE;

  // create enemy object pools and deactivate enemies
  for (i = 0; i < this.MAX_ENEMIES_PER_TYPE; i++) {
    obstacle = this.obstacles.create(-1000, -1000, 'enemy1');
    obstacle.checkWorldBounds = true;
    obstacle.outOfBoundsKill = true;

Activate an enemy.

addObstacle: function(x, y, type) {
  var obstacle,
    i = 0;
  if (type === 1) {
    for (i = 0; i < this.enemyPool1.length; i++) {
      if (!this.enemyPool1[i].alive) {
         obstacle = this.enemyPool1[i];
         obstacle.reset(x, y);
         return obstacle;
  return obstacle;

So basically, a couple of important functions in Phaser for object pooling are:

sprite.kill(); // halts rendering, but the object still exists
sprite.reset(); // reactivates the object so that it renders again and you can interact with them

Resizing Sprites to Fit Screen Resolutions Using Phaser

When I started Scuba Chibi, I made the mistake of making sprites small, and then scaling them up to fit larger screen resolutions.

game.stage.smoothed = true; // render crisp art
game.stage.scale.fullScreenScaleMode = Phaser.ScaleManager.SHOW_ALL;

One problem is that they never scaled up at all. They remained small instead of resizing to larger resolutions. I had to do something more than those 2 lines of code.

But if they did scale up, I realized a potential second problem — the sprites would be artifacted and not crisp and clear. So, it’s best to create sprites that are really large and then scale them down for lower resolutions. Luckily, I use vector art, so resizing them (I used Flash to draw the images in the first place, and then used Flash to resize them 4x larger and then exported them as PNG’s) was not a problem at all.

So, I thought about the larger resolutions to support. I was at first thinking of my own device which was really small, 960×640, but it appeared to show things even smaller, at 480×320. So I resized everything to 4x larger. That means the base dimensions are now 1920×1280. And that is my baseline for all the sizes of my sprites.  1920×1280 is what is considered 100% width and 100% height.

Here are some examples of that in my code:

var GAME_WIDTH = screen.height,
 GAME_HEIGHT = screen.width,
// 1920x1280
 BASE_WIDTH = 1920,
 BASE_HEIGHT = 1280;
// add a chibi to the screen - 360x360
this.chibi = game.add.sprite(0, 0, 'chibi');
this.chibi.scale.setTo(((GAME_WIDTH/BASE_WIDTH)*360)/360, ((GAME_HEIGHT/BASE_HEIGHT)*360)/360);
this.chibi.anchor.setTo(0.5, 0.5);
this.chibi.x = GAME_WIDTH/2;
this.chibi.y = (GAME_HEIGHT/9)*4.5;
this.chibi.smoothed = true;

The actual chibi.png is 360×360. scale.setTo() considers “1” as being being “100%.”

The formula is this:


GAME_WIDTH and GAME_HEIGHT is synonymous to the width and height of a device’s resolution (notice they are set to screen.width and screen.height above).

So if my device is 480×320, let’s try inputting the numbers:

this.chibi.scale.setTo(((480/1920)*360)/360, ((320/1280)*360)/360);


this.chibi.scale.setTo(0.25, 0.25);

which is what we want. 1/4 of 360 is 90, and that was my chibi’s size in the first place in a 480×320 screen.

The iPhone 6 is 1334×750.  Let’s input the numbers for that:

this.chibi.scale.setTo(((1334/1920)*360)/360, ((750/1280)*360)/360);

which is:

this.chibi.scale.setTo(0.6947916666666667, 0.5859375);

You’ll notice that the chibi will no longer be proportional in an iPhone 6, but that is one of the things to accept when developing for multiple devices.

Adding Custom Fonts in Phaser

Obtain the ttf, fnt, and png formats of the font

You can download free fonts in ttf format from You can convert the ttf to fnt or png formats using the web application
Load the font in your HTML or CSS

    @font-face {
      font-family: 'dimbo'; src: url('assets/fonts/dimbo-regular.ttf');
    * {
      margin: 0;
      padding: 0;
      font-family: 'dimbo', sans-serif;
    #game_div {
      margin: auto;
      background: #000;
    #preload-font {
      font-family: 'dimbo', sans-serif;
      text-indent: -9999px;
      font-size: 0;
  <span id="preload-font"></span>

Preload the font in your JS code

preload : function() {
  game.load.bitmapFont('dimbo', 'assets/fonts/dimbo.png', 'assets/fonts/dimbo.fnt');

Add the text to the screen
  10, // x
  10, // y
  'Test', // text
  { // font, style, alignment
    font: "14px dimbo",
    fill: '#ff0000',
    align: 'center'