August 31, 2011

Android Development

I had a decision come across my mind a little while back. Basically, I want to develop for android. I've played around with applets and that is good and all. However, after literally 'scouting' out android development I've come to realize my time is much better spent working on Android as my plan was to port the game to it. The structure is a bit different than I had anticipated, but it simplifies a significant amount of work for me. With two reviews behind my back I can focus on development for the next month or so. Unfortunately, that means I'll be scraping the current project and putting my resources towards Android. The game I'm developing will be identical to Project X.

I'll will keep updating my blog as I progress through the development. I will probably start off with an extremely simple game. I think I'll call it RMC!

August 24, 2011

Reviews Reviews and more Reviews

Well development might hit a halt for the next little bit as I had another review pop up from under my sleeves. I have a feeling a few more are to come after that, which makes for a pretty busy time. I'll have to see how much time I have for things as I'll be taking a course over the next couple months as well. I think I might be getting a bit too busy these days. I might have to make a few adjustments if I want to seriously keep up development at a reasonable rate.

August 21, 2011

Release 0.2.5

Today I decided to release a cumulative sum of a number of changes/features I had completed. The best news about this is I've made a number of changes so that development can be significantly faster than before for certain things. The bad news is that I still have lots to do haha! Currently, in the tower defense, units don't have any stats, towers cost nothing, and well it makes for a very easy game. On the other hand it is significantly more 'playable' now, but don't worry, the stats for the units is nothing more than me simply adding in a few numbers. I just still am deciding on what kinds of numbers and where :P

I have myself another hardware review to write so I'll be MIA for the next couple of days getting that all finished up. I hung out with a friend of mine last night, he just had laser eye surgery, I wanted to see him and check out how he was doing. I found it hilarious when he told me he has a lifetime warranty on his eyes. I guess they give out warranties for your body parts nowadays. (Scary thought). I know it isn't a whole lot yet, since it the game is still in an early alpha build, but in a few weeks from now it should be heading into a beta stage.

August 18, 2011


I've added a couple of new features to the Tower Defense. I mostly work on this in my spare time between jobs so sometimes I get a bunch done, and other times it seems like development stalls. That is the unfortunate situation of working two jobs, one which happens to be full-time. I certainly enjoy my other jobs, no doubt about that, but I do wish I had more time to spend working on developing the game.

I've planned out roughly 30 tasks to do and by my estimates I might be able to get them done by early September. After that, well, I'm thinking I'll have to play the game a reasonable amount and fine tune it a bit. I'm thinking about that time I'll consider working on an Android version. I avoid thinking too far into the future as things come up and I find I have to move my plans around. However, right now, I think its time for bed!

August 13, 2011


Don't you just hate bugs? Now, I'm not talking about insects here. I'm talking about the little computer bugs, and I have to say I've grown to appreciate Test Driven Development (TDD). I'm not referring to extreme programming, which is a type of TDD, but the whole concept of testing your code before you even deploy it. I know so many people think some things are trivial and it wouldn't be useful. For the most part, you probably are right, but the beauty of it is for large-scale systems. Let's also not forget how handy it can be when trying to modify old code.

I was overhauling how input is handled in my framework, essentially gutting and redoing roughly 1500 lines of code. Which, isn't really a whole lot, but certainly has room for error. I decided to quickly draw out my basic plan, followed by rough implementation and then continued to develop and refine it with test code. I caught 4 little bugs before I had even executed the code once because my tests caught some really silly mistakes. Later, during my deployment of the new code into the framework I ran the program and it didn't work and the program was doing something weird. I looked at the code and couldn't find what could have possibly caused it, especially when my tests I ran earlier proved that the case should work. So, for good measure, I ran the tests again, and guess what? I got failures. It took me a bit to figure out the root cause, which ended up being one line of code that I had added during the transition for "convenience". I don't have tests for a good majority of my code, but this little experience has made me value how all the time and effort up front has paid off later. It would have taken me hours to find that one line, which I had completely forgotten about, instead it took me minutes.

Honestly, you don't write tests to make sure your code works. That is just a benefit of writing tests upfront. The real reason is so that when you go and change your code, you can check to see if you broke something without even having to run the program. It is more just for a convenience to save yourself time when you want to change something. If you are writing code that you know you're never going to touch again, then don't bother with the tests. However, if you think there might be a chance you'll change it later, probably best just to go and write some tests that covers the basic cases of how the code will run and a few odd cases. Obviously, if you were really serious about the tests you would analyze the code and figure out your input domains and boundary conditions, heck, you might even see how your code coverage is. Code coverage is another topic, and is really a double edged blade when used incorrectly.

The short version: If you write code that you are going to change down the road, write some unit tests and save yourself tons of time later.

August 7, 2011

User Input

One of the challenges with games is figuring out how to translate user input into meaningful actions in the game. Unlike GUI design you don't always have nice interfaces and buttons that do a lot of the input tasks. I've found my basic input system I've been using just won't cut it for the next tasks I have planned with the tower defense. After 250 unit tests and ~4000 lines of code later I've come up with an extremely robust user input system. Unfortunately, I still have to integrate it into the framework, but that task 'should' only be a few hours of work. On the plus side, I'll be able to do a ton of really cool things behind the scenes with how input is handled by the framework.

I'll probably focus on getting it in and running by the end of the week, I have a few other things on the go right now. Then it will be time to get back into development. I've been doing some planning and figuring out what sorts of things I want to add into the game. Like tower and unit types, how upgrades work, levels/waves work, and so on. The first thing on the to do list is give the ability to sell towers. Which should be a fairly quick change and then I'll probably work on the 'upgrade system' for towers.

August 2, 2011

Server Upgrade

Progress towards the games has been very limited as I've been working on a number of other tasks. I always get sad when I feel like there has been no progress. However, I have fixed a minor bug where the background music doesn't loop. I cleaned up a little bit of code, really minor stuff. Basically, I think it would be pointless to do an update for something so trivial.

Now, what have I been doing? Well, as we speak I'm actually setting up a new server to host a number things from so I'm not bogging down my main computer. I'm running 10GB/12GB ram is a little bit unnerving... but surprisingly, I don't take a performance hit from it! Good news, the new server will have 16GB dedicated to actual server tasks and I can return this machine back to more of a development role.

I've been working on a little tool for myself to help with development for the games. It is a bunch of stuff nobody will ever see, but it makes my life easier hence why I'm doing it. Once I've finished it off and used it to update the games I'll probably put out a new version on the website.