Things to note when committing your Unity Project to GIT

In your Unity Project:

  1. Go to Edit > Project Settings > Editor.
  2. Set Version Control Mode as Visible Meta Files. 
  3. Set Asset Serialization Mode as Force Text.

In your GIT Project:

    1. Set .gitignore
    2. If you’re using SourceTree, go to Settings > Advanced > Repository-specific ignore list > Edit.

Then you’re good to go! 🙂

Yeti Crab also wrote a good tutorial on how to use GIT with Unity without using command line (they used SourceTree and BitBucket).

#indiesvspewdiepie weekend jam

So I haven’t done a game jam in a while (after I failed my #nar8). And I wasn’t really planning on doing #indiesvspewdiepie.

But then my lil sis and I woke up on Saturday and saw that one of our colleagues were doing it, and we’re like yah, we should do it too.

But first French Toast with eggs and bacon, sprinkles (because why wouldn’t you add sprinkles. actually, it’s my first time adding sprinkles on my toast, and yah, you wouldn’t, you shouldn’t).

We decided to make a fighting game starring fat animals. Because we saw that really cute video starring fat balloon animals.

My little sis sketched this:


We started with a box model, of the basic game play. We simplified the controls to just tapping two keys alternately really really quick.

Oh yah, and as usual, I used Unity as my game engine, I was only on Basic, because I couldn’t remember which of my accounts had the Pro license.

Literally a box model:

Screen Shot 2014-11-24 at 10.37.28 PM

One thing that we have been doing at work is using box models to test out basic gameplay. If it’s fun during the box model, you should be good to go. And using box models is a good way to test out asset sizes etc.

And then:

Screen Shot 2014-11-24 at 10.39.14 PM

I started with a 2 player mode, and then added a 1 player vs com mode.

And pandas have colors now:

Screen Shot 2014-11-24 at 10.41.11 PM

And then we decided that we’ll just stick to pandas. Just pandas. Because pandas are the cutest animals ever.

And then while my lil sis was drawing everything, I was voicing pandas. Saying things like “I’m so fluffy” and “I hate you.”

And then lots of UI:

I placed in the cool background music that I had been using for all my previous game jams.

Some more tweaks and we were done.

And we uploaded it.

End of Saturday.

On Sunday, we did laundry, and I baked cupcakes.

With sprinkles, obviously.


And I was going through the Game Jam Rules again, and read that all audio assets needed to be done within the 72 hours as well.

So I recorded some more nonsense as our background music.

And uploaded it again.

And since we still had a lot of time on our hands, we also made a trailer for our game:

By the way, the name of our game is “Fist of Furry”.

It’s on GameJolt:


Voting just started, so please vote for us. Please and thank you.

Voting just ended and results are in! And Fist of Furry is #39 out of 700+ games! We didn’t win, but it’s pretty okay.

The important part is finishing a game in less than a weekend, and for people to play our game and appreciate its cuteness and soundfx.


Open in Instagram

I was a little obsessed with trying out different Photo Captioning apps for a while, until I finally settled on Typic, and then deleted the rest.

What does apps (Overgram, Instaquote and Typic) had in common was that at the end of the day, they all let you share your work in Instagram.


I’m just gonna write a really short code bit on how to do that.

Instagram allows apps to interact with their using different iPhone hooks (

I’m going to use Document Interaction API.

It’s pretty simple, according to the Instagram developer page, you’d need to save your picture with a “.ig” or a “.igo” extension. And it has to be at least 612 pixels, either in width or height, anything less, won’t be accepted by Instagram.

When your picture is opened in Instagram, it’ll go automatically to the Filter screen. That means there’s no crop option, so better if your picture is a square.

So code bits:

In the .h of your ViewController, declare a UIDocumentInteractionController:

@property (strong, nonatomic) UIDocumentInteractionController *documentInteractionController;

And then set it as a UIDocumentInteractionControllerDelegate, like this:

@interface ComicViewController : UIViewController <UIDocumentInteractionControllerDelegate>

And then in the .m of your View Controller you add a button, or whatever that you want to use to trigger “Open in Instagram” that calls this method:

-(void) openInInstagram
    NSString *strImagePath = [[NSHomeDirectory() stringByAppendingPathComponent:@”Documents”] stringByAppendingPathComponent: filename];

    NSURL *url = [NSURL fileURLWithPath: strImagePath];

    self.documentInteractionController = [UIDocumentInteractionController interactionControllerWithURL: url];
    [self.documentInteractionController setDelegate:self];

    NSMutableDictionary *annotationDict = [[NSMutableDictionary alloc] init];

    [annotationDict setValue: @”Instagram Caption” forKey: @”InstagramCaption”];

    self.documentInteractionController.UTI = @””;

    self.documentInteractionController.annotation = [[NSDictionary alloc] initWithDictionary: annotationDict];

    [self.documentInteractionController presentOpenInMenuFromRect: CGRectZero inView: self.view animated: YES];

You need to pass an url to your Document Interaction Controller, since my file is saved in the Documents folder of my app, so my url looks like that.

So if you want to open your picture in Instagram and any other app that supports opening image files, simply use the file extension “.ig” for your image, but if you only want to open in Instragram, use “.igo”. Also, the UTI I set in the code above is “”, if you want it to be exclusive, use “com.instagram.exclusivegram”

You can set the caption you want to appear in Instagram. You can add hash tags in your caption, that works too.

And that’s it, when you click a button that calls the “openInInstagram” method, you’ll be able to see an action sheet similar to that screenshot.

Thoughts while reading Cocos2d-X by Example Beginner’s Guide Chapters 1 & 2

Packt published a new book on Cocos2d-X, “Cocos2d-X by Example Beginner’s Guide” by Roger Engelbert (

Cocos2d-X by Example Beginner's Guide

First off, book cover is adorable.

Second, the book’s spiel says no programming knowledge required, oh really now? Anyway, I know Cocos2d, but I don’t know Cocos2dx nor C++, the language for Cocos2dx, so here I go. If I can make some cookie cutter games at the end of this review then…

I’m just going to spurt words while I read the blog and maybe give an overall summary and reviews at the end of this post. You can ignore the italicized parts, those are just random ramblings.

#nowplaying Lana Del Rey’s Young and Beautiful #onloop after watching “The Great Gatsby” last night.

Chapter 1 covers Installation. Installing Cocos2dx and whatnots.

The book assumes that you are on a Mac and you have Xcode, which yeah, I am and iOS dev and all, I have Xcode.

Okay, the book gives pretty clear instructions on where to download Cocos2dx. now, I just need a few minutes to download them.

Cram my Crash Course for Creativity assignment till then.

Okay, the instructions for installing are pretty clear. Although my Terminal had some other suggestions for how to properly install it. Anyway, that’s done. So when I create a new project in Xcode now I’ll be able to see the different Cocos2dx templates, awesome.

Just “built” and run my first Cocos2dx program, okay, the coconut head is silver and blue now. Looks kinda funky like Pepsi Blue.

Anyway, he did a brief run through on how to run the Cocos2dx samples so that we could see all the infinite possibilities, okay not really infinite, but it’s a pretty long list of sample tests.

And then, he says might need to spend some money on additional tools. He recommend and uses four tools.

TexturePacker, although you can also use Zwoptex as a free alternative. TexturePacker’s Andreas Löw actually used to offer (not sure if he still does, try tweeting him) licenses for bloggers. So yah, I have a free copy of TexturePacker.

ParticleDesigner, which will ease the process of making particles. No, I don’t have that. I’ll probably look for some free alternatives, the author didn’t mention or recommend any.

A tool to help build bitmap fonts, he recommended Glyph designer (not free), bmGlyph (cheaper, but yah, still not free) and FontBuilder (yeah, free). According to him “It is not extremely hard to build a Bitmap font by hand, not nearly as hard as building a particle effect from scratch, but doing it once is enough to convince you to get one of these tools fast.” Back in my Cocos2d days I used Hiero (free) and Photoshop (self advertise: blog on How to Make Fancy Labels using Cocos2d

And according to him, no contest cfxr for sound effects. Free!

And we are done with Chapter 1. We installed Cocos2dx, and run a few sample projects and got to know the structure of basic Cocos2dx applications, so on to Chapter 2.

Chapter 2 gives an intro of C++ and Cocos2dx.

“This chapter will be aimed at two types of developers: the original Cocos2d developer who is scared of C++ but won’t admit it to his friends; and the C++ coder who never even heard of Cocos2d and finds Objective-C funny looking.”

I’m the first type, but I’m not afraid to admit that I’m afraid of C++. I am terrified of C++. If you give me an exam in C++, I will (and have, twice) submit an empty exam sheet (surprisingly passed one of those exams, I think the examiner took pity on account of my C++ phobia).

Can you tell that I’m stalling?

First the author goes through the basics of Cocos2d, if you know Cocos2d then you’re good to go. So far…

And then comes the dreaded C++ bits.

He says, “Don’t worry. The C part is easy, the first plus goes by really fast, but that second plus, Oh, boy.” Er… Oh boy…

I like the way the author talks in this book, kind of entertaining in a way.

He said to open your favorite text editor, because he doesn’t want code hinting and autocomplete features to get in the way. What? How did you think I finished a game in XNA without little knowledge in XNA, and completely zero knowledge in C#?! Code hinting and autocomplete, seriously.

My favorite text editor – TextEdit, because it comes bundled with a Mac. if I were on my PC laptop, I’d say Notepad, because that’s bundled there. I used to write websites in Notepad, those were the days… Yah, still stalling.

C++ syntax. Okay, so far, apprehensive.

Instantiation and Memory Management. Two words, no ARC. “so Objective-C developers who have forgotten memory management might have a problem here.” Uh oh.

The rule regarding memory management with C++ is very simple: if you new, you must delete.” Okay, I get that. And it supposedly has some other options and commands that’s similar to Objective C without ARC, okay.

 And then he continues with how to instantiate stuff. Okay, so far so good. And a little about the Cocos2dx equivalent of Objective C stuff. Okay, understood.

And summary. He says, “hopefully non C++ developers have learned that there is nothing to fear”. Um.. so far, not completely convinced, but I think I can manage.

He ends this chapter with “and furthermore Cocos2dx is awesome!” (fan boy) and “So let’s create a game already!”. 

Yes, lets. But maybe I’ll continue reading this tomorrow.

How to add Facebook to Unity Android?

I searched for this before, but couldn’t find a solution that was easy or cheap (by cheap, I mean free).

Pavel Kultyshev (@getencapsulated) also wrote a blog post, sharing messages on Twitter or Facebook by following the link in the browser of a mobile device or by opening the client app on this device. I haven’t tried this approach though, because I’m looking for something more “native” to Unity.

If you’d like an easy drag and drop solution and willing to spend, then there are a couple of available plugins: the aptly named Facebook Plugin for Android by Mida Mobile (for $20), Unishare, that also includes Twitter, LinkedIn, Sina Weibo, etc. (it’s $25, I don’t know how good it is, but for 5 more dollars you get way more social stuff, sounds pretty good), and of course, Prime31 also has one, it includes Twitter too (for $65 though).

Macaronics (phardera) also wrote a blog post on how to do this using Android Plugins: (it’s in Chinese though). Don’t worry, the entire project is available in phardera’s github (

Creating Games with Cocos2d for iPhone 2

Packt Publishing recently released a new book called “Creating Games with Cocos2d for iPhone 2”, written by Paul Nygard.

The name is a bit confusing to me, the 2 in the book title refers to the book being the second Cocos2d book from Packt or 2 as in Cocos2d version 2.0?

Anyway, the book in detail from their website:

Cocos2d for iPhone is a simple (but powerful) 2D framework that makes it easy to create games for the iPhone. There are thousands of games in the App Store already using cocos2d. Game development has never been this approachable and easy to get started.

“Creating Games with cocos2d for iPhone 2” takes you through the entire process of designing and building nine complete games for the iPhone, iPod Touch, or iPad using cocos2d 2.0. The projects start simply and gradually increase in complexity, building on the lessons learned in previous chapters. Good design practices are emphasized throughout.

From a simple match game to an endless runner, you will learn how to build a wide variety of game styles.

You will learn how to implement animation, actions, create “artificial randomness”, use the Box2D physics engine, create tile maps, and even use Bluetooth to play between two devices.

“Creating games with cocos2d for iPhone 2” will take your game building skills to the next level.

You will learn:

  • Control sprites with touch, joysticks, and tilt controls
  • Use sprite sheets, particles, and plists effectively
  • Learn multiple approaches to solve common challenges
  • Integrate cocos2d with the Box2D physics engine
  • Use third-party programs for joystick control, tile maps, and more
  • Implement Bluetooth to play across multiple devices
  • Learn game-specific A.I. design methodologies

Looking at the book’s Table of Contents, I see that there are 9 different games that will be taught in the book. Like all other Packt books, Source Codes are included.

There is a memory game, “Thanks for the Memories” (which reminds me of the Fall Out Boy song). It’s basically a memory card game. A Match 3 game, Whack-a-Mole, Snake, a breakout game, “Light Cycles of TRON” game, pool, a scrolling shooter, and an endless runner. They are pretty run-the-mill games.

This book is aimed at readers with an understanding of Objective-C and some familiarity with the cocos2d for iPhone 2.0 framework.

I’m not through reading the book yet, so this is it for now. Sorry >.< I’ll write the review as soon as I’m done with it.

You can get the book on the Packt website: