Monday, December 20, 2010

Count > 0

Installed and configured the Java JDK this evening and wrote the first few lines of code.  Right now there is simply a println statement that prints hello world to the console, but it is a start and my java compiler seems to be configured correctly. 


Hopefully before leaving for the holidays I'll look into setting up a Subversion 'server' on my computer so I can keep the project better documented and tagged.

Sunday, December 19, 2010

New Direction

After much deliberation, I think I've settled on a direction; Java.  I feel that this will prove to be a more immediately transferable skill to have than Objective C.  Though I haven't given up on the iPhone app entirely, I hope to eventually port whatever I end up with to it eventually.  I am hoping that in the next year or so more people will write iPhone apps in Java and I can ride those coat tails.  In the mean time I will focus on wrapping my head around object oriented programming and do my best not to treat my computer like an 8-bit processor. 

There are two main factors in addition to the perceived usefulness of knowing Java that prompted my decision.  First, of all the University texts I have lying around I no longer have my C++ book, but do have two Java texts including Java in a nutshell.  Second, the open source project, FreeCol, made the switch very early from C++ to Java and I've been studying their project as a model for my own remake. 

FreeCol is a remake of Sid Meier's Colonization.  I've admired how they structured the project, with a series of dot releases leading up to 1.0.  Each release brings the project an incremental step closer to the final product.  For example, 0.1 was just a ship on a map that could be explored.  0.2 added a bit better graphics and the ability to send the ship back to the 'home port' in Europe.  Further releases improved graphics/added multiplayer and eventually added an AI.

The other thing they have on their site is a track of the number of lines of code programmed over time.  The project right now is something close to 130,000 if I remember what I read.  I like the idea of having the count and will need to look at some way of including a line count into the blog.  I will also need to plan out the project into reasonable blocks (my own dot releases) that I can target and feel a sense of achievement when I hit them. 

Over the next two weeks I'll dig into Java, and hopefully plan out the project.  I will start towards a similar simple first release of an explorable map.  My current lines of code count is at 0.

Tuesday, December 14, 2010

First Status Update

Greetings,

I have spent the past couple evenings configuring/installing Airplay.  It piggybacks Microsoft's visual studio C++, and builds for any phone/processor I imagine I'd need.  It will also build a deployable file that you can upload to your phone.  So far so good.

I began by loading their sample 'Hello, World!' application into Visual C++ express, and glancing over the code.  Simple enough, at a high level only a couple functions, screen changes colour after a timer expires.  Did a debug build for the ARM processor, and a window pops up that displays the screen, along with a panel of menus that lets me rotate the phone, and add other inputs that are hard to control with just a mouse.

Now the discouraging part.  I wanted to deploy to my iPhone, so I began the deploy process and encounter a substantial error.  I am missing my iPhone developer's license.  To be entirely fair, I knew this would be a problem if I developed in Xcode, that you can use the simulator only until you pay apple to become a developer.  I had hoped that AirPlay would be a work-around, and alas it is not.

Currently I feel as though I'm at a crossroads.  I see three options:
  1. I continue developing with Airplay.  This has the advantage of  letting me develop on my PC.  This has the disadvantage that I'll be developing with C++.  Not a huge disadvantage, however I was excited to use ObjectiveC, and hoped that it would leverage more of my embedded C experience.  I am also concerned about writing code for a Mac product without using a Mac IDE.
  2. I switch to Xcode, and 'borrow' my fiancee's older macbook.  This has the converse advantages and disadvantages of the above with the added disadvantage that the macbook's battery is EOL and only holds half an hour of charge.  I would need to share time on the power supply or go out and buy one I can dedicate.
  3. The third option is that I lose the iPhone as a destination and just try writing the game for the PC.  Then the language options open up a little I could try it in Java or C++, and try using OpenGL for graphics, something else I'd been curious to play with. 
I am torn.  Two paths keep the iPhone as the end goal, which would ultimately be a cool deliverable.  I'd just need to loosen up and pay Mac for the privilege to write code for them.  On the other hand, I could extend my programming skills into something that may be more immediately useful for my career. On the other hand, my goal (2 days ago) was to write the iPhone app and I'd hate to so hastily abandon it.  On the other hand, keeping the project in the PC might bring down the scope and increase the odds of successful completion.  On the other hand...

Sunday, December 12, 2010

Inaugural Post and Background

Hello and welcome,

This is my first attempt at web logging.  I have always considered bloggers to be self centred self important yuppie snobs.  Now I know better ;)

The purpose of this blog is to act as a motivator for me to achieve goals I set for myself by providing a weekly status update.  Hopefully these updates will encourage me to put time and effort into my projects each week.

The two projects I'm actively working on now are refreshing my control theory knowledge from university, and writing an app for my iPhone.  In regards to the iPhone I plan to write a version of one of my favourite computer games Exploration.  This game was never well received or reviewed.  Many critics found the end game to be rather anticlimactic, the UI was clunky, and overall the game was deemed a little dull.  For me it sparked an interest in the era, particularly for the Dutch who left most of their exploration and colonization to private merchants rather than 'federally' funded voyages. 

I realize that this is an overly ambitious project for a single software developer, since I'll be starting from 'Hello World'.  My background lies in a firm understanding of embedded C.  The thought of going to an object oriented language on a processor that can handle huge stacks of memory an inefficiencies is totally foreign, however I think it will be a great transferrable skill.

The timing of this project is good for three main reasons.  First, my fiancee and I are sick of paying for cable television so after Dexter tonight we'll be without all but the most basic of channels.  Second, I've been putting so much time into Civ5 lately that I feel ready for a break from PC gaming.  And finally the hollidays are coming up and I'll be out of the house and away from work for a little over a week and can really crack down with a little effort.

For the upcoming week I have found Airplay, which claims to be an iPhone SDK capable of programming iPhone apps from my PC.  Hopefully I'll be able to play around with it a bit and verify that I won't need to fight for time on my fiancee's macbook. 

So with all the enthusiasim of starting a project I hope to have exciting news for next week.

Daryl