Friday, June 28, 2013

Android indie developer interview: Krishna Teja from Mad Logic Games

Here's the first interview I've done for my blog. I want to do more of them in the future inviting interesting people and asking them questions about their work. I hope you find it educating. Enjoy your reading!

Bartek: Please, tell us something about yourself. Who are you? Where do you live? What do you do in life?

Krishna: Thanks for inviting me. My name is Krishna Teja, the founder of Mad Logic Games, and my vision is to make it the world's best game development studio. I am a 19 year old student studying Computer Science at VNR Vigyana Jyothi Institute of Engineering and Technology, Hyderabad. I am just getting started with my Android programming career. As an independent Android developer I published 5 games on Play Store and currently making more. My aim is to turn my Android development hobby into a professional company.

Bartek: So, how did it all start? Why did you decide to make Android games and not for example iPhone games or some other kind of apps? I know that you used to make money through Internet marketing. What was wrong with it?

Krishna: I develop my games using a cross platform engine, so I can compile them for Android, iOS and Windows too. My games are already ready for iPhone and iPad but the only problem is I need a Mac and an iPhone/iPod to publish my games to the iTunes App Store. I don't have them yet since they are too costly and I don't have the money right now to buy them. Once I earn enough money, I will immediately publish my apps to the Apple App Store. I've spent all the money I made through Internet Marketing to buy my development PC and the Game Development tool called GameMaker: Studio.

Bartek: Can you tell me some more about it? Why did you choose this tool? What are your experiences with it? What language do you use to program?

Krishna: I have a paid license for GameMaker: Studio Master. Though it's costly, it's an amazing tool which allows you to create games very quickly and is very easy to learn. You can make games without any coding, just use the built-in drag and drop features. Also, once you develop the game you can deploy it to various platforms like Android, iOS, Windows, Mac, Ubuntu, Tizen, web (HTML 5) with a click of a button. Because of all these features I carefully chose this tool and feel it's been totally worth my investment.

Bartek: What other tools did you consider? Can you write Android native code?

Krishna: Yes, I can write Android apps in Java. A year back I started programming with Java and used a third party open source library called LibGDX. LibGDX is Free and Open source and can be used to create games for Android, iOS and HTML 5 too. But, it was very hard for me to make even a simple game. So I started searching for other tools and found GameMaker Studio.

Bartek: What language do you use to write games in it? What features do you think it has that makes it better than other tools?

Krishna: For beginners, you don't need to know any programming. GameMaker offers a Drag and Drop user interface which can be used to develop games. For advanced users, if you need to include any complex functions you can do that too using the special Game Maker Language. It's easy to learn and includes a lot of documentation. I personally use both Drag and Drop and GML language to write my games. I think it's better than any other tool because of its easy to use Drag and Drop interface.

Bartek: How much time did it take you to learn how to use GameMaker?

Krishna: A week to learn the interface and the basic functions. I was able to make games within minutes! GameMaker offers plenty of tutorials which are easy to follow.

Bartek: How much is the GameMaker version that you have?

Krishna: I have the GameMaker: Studio Master Collection license which costs $499.99. For those who want to get started you can use the Free version to build the game for PC and later buy Android license to publish it to Play Store.

Bartek: Where do you take your game ideas from?

Krishna: I come up with game ideas myself. I think of all the possible things I can do with GameMaker without much programming/graphics involved and then come up with some simple games. I show it to my friends and ask them if they like it. If I get positive feedback, I start developing the game.

Bartek: What about game resources? Where do you get you graphics, sounds, and music from?

Krishna: Graphics are mostly done by me. But my friend helps me too. Sounds and music are taken from others and are commercially free to use. I use Adode Photoshop and Illustrator to make graphics. My favourite site to get sounds and music is

Bartek: Do you also use some other programming tools? Source control (SVN, git?) or something like that?

Krishna: No, since I am the only one who programs I don't use any source control tools. This is what I do to quickly convert my idea into game:

  • Write down all the ideas you get onto a piece of paper/notepad.
  • Think of a theme and story for your game.
  • Check if the game can be programmed easily.
  • Now start developing a prototype for the game. (Simple game showing what you want to make without any graphics)
  • Split the programming into parts.
  • Try to program all the complex parts first.
  • Finally, assemble them and start applying nice graphics to it.

Bartek: How long does it take you to write a game?

Krishna: My first game took me a month, because I was still learning and didn't know about some functions. Other games took me about 2 weeks to develop.

Bartek: How many hours a day are we talking about?

Krishna: About 3 hours a day.

Bartek: How much are you making on your games now? Which one has been the biggest success and which one has been the biggest failure so far and why?

Krishna: I am making an average of $3.5 a day (a little more than $100 a month). My biggest success was my first game: Box Game. Biggest failure? Scary Prank Game, but I can't say failure because I published it recently and it needs some time to get downloads. Also Scary Prank Game was a rehashed version of Box Game.

Bartek: How do you monetize your apps? Do you have any advice on it?

Krishna: All my games are free. They don't have any In App Purchases (for now). I only use banner and interstitial ads in my games. Many of you will have different opinions regarding monetization. But my advice to indie developers who don't have any initial investment/budget for marketing is to make a game free and add ads or in app purchases. I personally feel that for Android ads work better than IAPs because of the demographic of the users. For iOS people are more likely to pay so use IAPs.

Bartek: What ad network(s) do you use?

Krishna: I only use AdMob right now. I will be adding Millennial Media Ads very soon.

Bartek: Interesting, why did you choose Millennial Media Ads? I have to say it's the first time I hear about it .

Krishna: Actually I didn't choose it. :P GameMaker only supports AdMob, AdColony and Millennial Media so I had no choice. I talked to their support team and they said they would be supporting PlayHeaven soon. So I am waiting for it.

Bartek: That explains much. So, what are your plans for the future? Are you making a new game now? Can you reveal some of the secret?

Krishna: Build more games for Android. After I start earning a steady income, I will buy a Mac and iDevices and port my games to the iTunes App Store. Yes, I am making a new game now. I will publish it next week if everything goes well. There are no secrets, whatever I do I post it to my blog. All you have to do is work hard to reach your goals.

Bartek: What's your favourite Android game?

Krishna: Tough question haha. Some of my favourites are Temple Run, Plants vs Zombies, Subway Surfers.

Bartek: What android device(s) do you own?

Krishna: I own a very low end phone LG P350. It can't run any new games. I use my friend's tablet to play and test games.

Bartek: Do you read some interesting blogs on Android development? Do you know any interesting sites that you could recommend?

Krishna: I follow, and yours, all other blogs are dead, no one actively posts. I also follow the forum which has some nice informaton regarding monetization.

Bartek: What advice would you give to other developers (beginners and more advanced ones) - something that would have helped you the most if you had known it earlier?

Krishna: First decide what you want to make, a game or an app? Search for some development tools to make it. Choose the right tool. For 2D games I use GameMaker (paid) but you can also select free tools like AndEngine, PhoneGap, LibGDX. For 3D choose Unity 3D. Try to learn everything regarding the tool using freely available tutorials and youtube videos. Then start building a simple game first. Don't try to develop the next Angry Birds! Start small, you can later try complex stuff. First develop a simple game and publish it to Play Store. Wait for feedback/reviews, it will definitely inspire you to build more games.

Bartek: Great piece of advice! If someone wants to find out more about you and your games, where should they go?

Krishna: You will find all the information regarding my development journey at my blog: and all my apps can be found here:
You can talk to me directly at krishnatejanew [at]

Thank you for the interview.

Bartek: It was my pleasure. Good luck with your games.

So, did you like it? Do you want me to do more interviews in the future? Let me know!

If you have something interesting to say and are willing to share your knowledge, feel free to contact me as well. I'll be glad to hear your story.

Thursday, June 20, 2013

Android static code analysis tools

If you think you know Java well, you are probably wrong. And even if you are a true pro, you certainly still make mistakes - yes even those silly ones. To make it more daunting, Android is not just plain old Java. It enforces the use of mechanisms that are not easy to understand at all: multithreading, generic types, memory management, and various design patterns. Do you still think you're good enough on your own? Watch the videos below (or at least skim them).

The guy in gray hair is Joshua Bloch - the former Chief Java Architect at Google (he quit in 2012 after 8 years there) and the author of  Java Collections framework. As you can probably guess, he's a pretty smart guy. He also has a good sense of humor, which isn't very common in the IT world. If you'd like to rake your brains some more, check out his book: Java Puzzlers: Traps, Pitfalls, and Corner Cases.

But back to the point. Knowing the syntax of a programming language is not the same as being a good programmer. I remember reading Effective Java (again by Joshua Bloch) and getting surprised every chapter at how little I knew about high quality code. I worship this book for showing me that I had (and most certainly still have) a lot to learn and that Java is much more complex than it appears to be at the first glance. After reading it three times back to back and getting a couple years of experience I feel much more comfortable now in the world of classes, variables, and methods. However, the conclusion you should be getting from this rant is that no matter how skilled or smart you are, you will always be creating bugs.

So, is there anything we, programmers, can do to prevent at least some of the mistakes we make? The answer is yes and we can achieve it using static code analysis.

For all those who are not familiar with this term, do you remember when Eclipse suggested that you get rid of a variable because you were not using it anywhere or when you used the assignment operator for comparison when you actually meant to write ==? That's, more or less, it, but there are much more powerful tools that can take it to the next level. Let's see what they are.


This tool is already there for you without the need to install anything. It has been introduced in ADT 16 and has been a part of your Eclipse ever since. What can it do? It works with Android specific functionality, checking such things as:
  • missing translations, e.g. when you have a text resource in one language but not in another
  • layout performance problems, e.g. when you nest views unnecessarily
  • unused resources, e.g. when you have images in your res folder that you never refer to
  • accessibility and internationalization problems, e.g. when you hardcode strings
  • icon problems, e.g. when you failed to provide icons for all screen densities or they have wrong sizes
  • manifest errors
Lint is always there for you, running in the background. However, it does not scan the whole project unless you tell it to by pressing the checkbox icon in the toolbar. Make sure you do it from time to time and don't just ignore the messages that appear in the Lint Warnings view. Each of them provides a lengthy explanation of what's wrong with your code and even if you still don't get it - ask Google.

It's one of my favourite tools. You can easily install an Eclipse plugin by going to the Eclipse Marketplace (Help/Eclipse Marketplace...). Then right click your project and choose Find Bugs/Find Bugs...

I guarantee that you'll be surprised at what you find. They scanned the latest Java JDK itself and discovered quite a lot of things that should have been done differently. If the Oracle's employees have been so sloppy, I wonder how your projects do...

Here's what bug patterns FindBugs looks for:
  • difficult language features
  • misunderstood API methods
  • misunderstood invariants when code is modified during maintenance
  • garden variety mistakes: typos, use of the wrong boolean operator
P.S. They use FindBugs regularly at Google to keep their code quality high.

Google CodePro Analytix

You can again get it from the Eclipse Marketplace. It provides similar functionality as FindBugs, but also:
  • finds duplicated code
  • generates JUnit test for you
  • computes code metrics
  • computes test code coverage
  • draws dependency analysis diagrams
I discovered CodePro quite recently and I must say it's very powerful and helps me a lot.

It used to be a tool checking if the code meets the specified coding standards. It has evolved since then and has become a very powerful ally in the battle with bugs. You must certainly get to know it, because it has been the industry constant for a good couple of years. Extremely easy to install through Eclipse Marketplace.

Yet another code analyzer. Very powerful, one of the best known by programmers and downloadable as an Eclipse plugin.

Other tools

If, for some reason, the tools mentioned above are not enough for you or you just want to experiment with more of them, make sure to take a look at the list of tools for static analysis at Wikipedia. It contains useful utilities for languages other that Java as well.

Use it!

I hope I don't have to repeat myself and tell you one more time that using static code analysis is a must. You don't have to install all of the tools mentioned, but choose at least one that you like and run it whenever you add some new functionality. Don't ignore the warnings! There will be false positives from time to time, but treat them with caution and look for a detailed description online whenever you don't quite understand what's wrong. I guarantee, that you'll find bugs you haven't event thought of and that you'll learn a lot by correcting them.

If you feel like sharing your experience, let me know what tools you like the most and what unexpected errors you were able to find. Don't be ashamed of your code. Remember that even smart people make dumb mistakes.

Sunday, June 9, 2013

Unity free for mobile indie developers

If you want to start making Android games, the guys from Unity just got you a huge present. They released their cross-platform engine for free. Well, at least if you're making less than $100,000 a year with your apps, which I suppose you do. Watch the announcement yourself or read it on the official blog.

If you haven't heard about Unity yet, you should check out the Wikipedia article about it and see some games created with this tool: Bad Piggies, Temple Run 2, Slender: The Arrival. Also, here's their official YouTube channel (go to the Made With Unity section for some amazing stuff) and Facebook profile with news, announcements, and deals.

Mike Kasprzak, an indie game developer whose blog I follow, wrote a nice article some time ago about modern middlewares, featuring Unity as one of the most interesting tools. After that, he continued his reasearch and described his experiences in another post. Apart from that, Mike is a really cool guy. I suggest checking out his game Smiles which got plenty of awards. I used to watch the indieconversation YouTube channel where he talks with other developers about... well basically all aspects of indie game development. It doesn't focus on Android, but it's fun to watch and gives you some insight into the lives of a bunch of geeky individuals.

For all those who want to learn Unity, here's a great forum thread which mentions probably all possible resources there are. Let me know if you create something cool... or even if you fail miserably. If you've already made a game with Unity and want to show off to others, feel free to comment and post a link to it.