Saturday, December 29, 2012

Jungle Jumper jumps past 1000 downloads

Today Jungle Jumper passed the 1000 download mark on Google Play. The game has also been downloaded 583 times on Amazon, Handster and Getjar.

The big 1.2 update is still on track and should come out soon.

Sunday, December 16, 2012

Jungle Jumper 1.2 Status

Done:


It's going great with the update. I got a bit stuck trying to figure out how to implement a few things so I took a little break for a week or so.

I really got back into it a few days ago and things that I couldn't figure out in hours, I implemented in minutes.

I've now gotten Shared Preferences implemented and working. The book I read on Android game programming used the system of writing a file to external storage and saving the data in there. There were several issues with this. It used the WRITE_EXTERNAL_STORAGE access which looks quite scary and I don't want any unnecessary accesses on my games and it also meant that you could just go into the file on your device and change the data manually. Theoretically setting your high-score to whatever you wanted.

I've also gotten Google Analytics implemented. I have wanted this implemented all along to get better numbers on my total install base and get feedback on how much people play the game and how high high-scores they can get. For some reason I got it in my head that this would be really difficult, but it turned out to be a breeze and only took 20 minutes. So far Analytics is only set up with the default statistics being tracked so I'll have to set it up so it can record high-scores as well, I hope this doesn't turn out to be too difficult.

I've also set up an achievements page. At the moment it has 12 achievements and I've set up the game so you can actually achieve them. The plan is to have 24 achievements that you can get and for every time you unlock three you will get a gift like a costume or a bonus you can use in the game.

I've also gotten rid of the WAKE_LOCK access. It was in the game originally because the game example I used as my basis for Jungle Jumper was one of the endless jumping games where you use the accelerometer to steer the character, meaning that you won't touch the screen while you are playing and the screen might fall asleep. In Jungle Jumper you touch the screen to jump constantly so it was completely unnecessary  I'm down to only having the INTERNET and ACCESS_NETWORK_STATE accesses now, which are used for the Admob ads and the Google Analytics.

I've given the menus a pretty big update to make them look better and give better information.

To Do:


There are still a bunch of things to do. I am in the middle of updating some of the jungle graphics and I plan on updating Jorvis himself so he has better animation.

I have to figure the remaining achievements and what all the gifts will be and implement them. Some of them will be new bonuses in the game so that will take quite a bit of work and might mess with other systems.

I have to go through the sounds and rerecord some of them, as a few are really bad.

Wish List:


There are two major things on the wish list that I feel almost certain wont be in the 1.2 update. New music and a global high-score list.

The new music won't get in there because I simple don't know how to compose good music myself yet and I want to make it myself rather than hire it out. I plan to spend quite a bit of energy in the new year leaning to write some simple melodies and synthesize them on the computer.

The global high-score list I could get in quite easily if I implemented some middle-ware, but I really don't want that. There are quite a few free system you can use for this, but that would mean bundling their SDK in my game and having to ad extra accesses. I'm planning on building my own little web-service to deal with these things and have my games connect with it. But I don't have the hosting for it yet and I'm not sure how much work it will be, but it will come eventually.

Conclusion


The update is going great and I'm quite certain I'll have it out before the new year. I'm not getting everything in there that I want, but with 1.2 Jungle Jumper will be very close its final full form I think.


Monday, December 10, 2012

Bah, Humbug



I've created a small Android game for my niece as a Christmas present. Give it a try here:



Tuesday, December 4, 2012

Learning to Program

This last year I have finally learned to program, but I have been interested in leaning to program for years and have tried getting started several times and failed. Here's a short summary of the road, that eventually lead me to be able to write my own Android game from scratch. I hope it might help anyone reading this to get motivated and maybe avoid a few pitfalls.


First Brush with Code


Some ten years ago I first got my first real contact with programming when I started designing and writing homepages with two school friends. We were of course working in some very static HTML back then and the most we saw of programming were a few mouse-over java scripts, that we didn't really understand but used anyway. But we felt very cool and sophisticated.

Boring Books and Tutorials


Several times over the following years I tried to pick up a book or read an introductory tutorial to programming. Here is what I always found.

A Character has a size of 1bite, signed it can have the values -128 to 127, unsigned it can have the values 0 to 255.
A Short Integer has a size of 2bytes, signed it can have the values 32768 to 32767, unsigned it can have the values 0 to 65535.
An Integer has the size of ... and on it went. It would then go into excruciating details about the fundamentals about how a CPU handled binary input or the history of Object Oriented Programming or something else equally unrelated for an aspiring programmer.

There are two very big flaws with this approach.
Firstly, as a person who can now actually write a decent program or game in Java I can tell you that when I sit down to program I really don't worry or care about any of this stuff. Yeah you have to know a bit about the different variable types, but most of the time you're really only using two or three of them and when you run into a situation where you need something else you just look them up.
As to how a CPU handles actual binary input; the theory is interesting to me as I'm a bit of a hardware geek as well. But it means absolutely nothing to me when writing code, I'm 50 layers of abstraction away from the hardware. The history of OOP is probably interesting and important if your writing a term paper on programming, but again, I don't care in the least when I'm writing code.
Secondly; it's boring! When you start out programming what you want is to learn of to create something cool and fun, and there is nothing that can kill your enthusiasm quicker than 50 pages of useless information and a Hello World example.

Working in IT


Nothing to do

Two years ago I got a job at IBM. For almost three months we had almost nothing to do other than sit at our desk and look busy, while we waited for our department to be set up. I got a bunch of new friends and we talked about games and I thought it might be fun to do a text base adventure game. I seriously though about doing it only as a Windows Shell script, but that quickly got to seem impossible. Then I tried to jump back into programming, choosing to look at both C++ and Python. Well I ran into the same issues as earlier, the books and tutorials started out with long explanations about really technical stuff that didn't really interest me when all I wanted to do was write a simple text based game. I managed to do a few more Hello World programs and then gave it up.

Scripting

We finally got started on our work. I had always been technical, but I learned so much the first year about everything from printer hardware to server software. But the biggest thing I picked up was probably scripting.
We had several scripts that developers had made to solve recurring issues, these were generally all written in Windows Shell or in VBScript. Any self respecting computer nerd who has used Windows will be familiar with some Windows Shell commands and I was as well, but I got considerable better. But I cast my love on VBScript. VBScript is extremely easy to work with and you can easily get a simple UI in the form of prompts and text fields for the user to fill out. It became a wonderful challenge to build little scripts, that could make our work easier and I had a whole production network to fiddle around with. I also became a big fan of pranking my fellow workers, by making their computers open strange links or talk to them or eject their DVD-drive.
All these things had one thing in common, they had very clear and easy to obtain results and rewards. Which is really what you need when you are trying to learn something new and difficult.

Making the Decision

Around a year ago I finally made the decisions that I wanted to become a programmer. It had become quite dull to do tech support, at some point there simply wasn't much reason or encouragement to learn more and I felt like I was beginning to stagnate.
It's difficult to say what was different about trying to learn programming this time compared to earlier. Part of it was without a doubt that I had written a bunch of scripts and learned a bunch of other things, so I simple understood a lot of the ideas better. But a larger part was a willingness to spent hours reading things I didn't understand in the belief that it would make sense down the road.

Learning to Program


This time around I decided to choose to learn Java. There were several reasons for this. Java is the main programming language for Android, which I did have a plan to program a game for. I'd also realized how many things were programmed in Java and how sought after good Java programmers are. And lastly Java was part of the same Programming family as C, C++ and C#, making it very easy to expand into those languages later on.

Now that the decision was made, I needed again to find some material to teach me to program. Here I made a mistake again. Rather than getting the basics down I went for a book about game programming. Which made sense to me because I wanted to write games so why should I start anywhere else, I didn't wanna do any more Hello World programs. The problem is that all books about game programming assumes that you know all the basics, which I did not. The book that I chose was:

Beginning Java SE 6 Game Programming

I worked through this entire book, and I was not too impressed. It might have been better if my Java fundamentals were more in order, but still I would guess that there are better books about Java programming.

I began realizing that I needed my fundamentals in order, so next I went as fundamental as it gets.

Sun Certified Programmer for Java 6 Study Guide

This is a good book for making sure you know everything about Java to pass your exams, but it is not a good beginner's book. I read the first few hundred pages of this understanding only a fraction. I'm pretty confident I could read through it now and have a good understanding. It might even be a bit less mind numbingly dull now that I know a bit more, but still, this is not a book I would recommend for actually learning to program.

I did a bunch more research into good books to learn Java and finally ended up choosing:

Head First Java

It hurt my soul a bit to buy this book, as I think this is possibly the worst cover I have ever seen, but it turned out to be a great purchase. The Head First series of books try to make it fun and challenging and engaging to learn something new and it really succeeds. Head First Java was the first book in the Head First series and the only one I have read. Some people say that it's the weakest of the Head First books, but I thought it was a breath of fresh air and can warmly recommend it.

I breezed through Head First Java in a few weeks and truly felt like I understood it all.

I was also introduced to Codecademy.com which is an awesome page to learn scripting and programming and I highly recommend it to anyone interested in learning programming. The thing that's great about Codecademy is that you get immediate positive reinforcement for learning all the little things that you have to get down to move on to the cool stuff.

I had now learned enough to start doing some small test games and programs, my first one was:

Pigeon Wars
(It played about as poorly as it looks)

I was also asked to build a program at work, I never finished it, but it forced me to learn to build a real UI with swing.


I then got the idea of a game where you were crawling up three jungle vines avoiding dangerous objects and creatures. My girlfriend thought it should be a little cute mouse crawling up the vines and Jungle Crawler was born.

Here is an early edition of the game, believe it or not, it looked even crappier than this in the beginning, but I can't find that first version.

Jungle Crawler Alpha

I was feeling pretty good about my programming prowess at this point and got started on the Android version. I thought that would be quite easy. It was not. There are quite a few things that are very different about programming for Android and I didn't know any of them. I tried to fake it and made some crappy tests, but I soon realized that I needed a book on Android game programming. I had a lot of problems finding a book I liked but ended up choosing:

Beginning Android Games

I really didn't like this book at first. I think tech books should be all about being accessible and possibly a bit entertaining to make it a bit fun to learn. The beginning of this book where Mario Zechner goes through a lot of the theory both of Android and games programming in general, is both boring and high and mighty at the same time. So I was quite frustrated, but when he actually got into the programming and example projects this book turned out to be a treasure trove. The examples are great and concise and the framework he set up, made perfect sense to me. I can definitely recommend this book as well, with the caveat that the beginning of the book is less than stellar.

And here is a picture of the final product, with it's name changed to Jungle Jumper, as a bit of alliteration makes everything better:

Jungle Jumper

Your Turn


I'm not a programming guru yet, but I feel like I've come a long way. I hope some people will get something out of reading a bit about my progression as a programmer. And maybe even feel inspired to get started yourself if you have a game programmer hidden away somewhere inside you.

If anyone has any questions or thinks it would be interesting to hear about any specific part of the development process or my learning process, please leave a comment below.