Thursday, 19 August 2010

Propositions

This morning I had a very quick chat with one of my lecturers about the prospects of continuing study to take an MSc. There were a few things that I would have been very interested in looking at, and - by some amazing fortune - two of them can be combined into a mega-research project that should be both (a) useful and (b) fascinating.

I'd get to carry on developing the genetic algorithm that I worked quite hard on during the diploma (one of the highlights of the course, to be honest) and try to integrate it into the wider context of Web Services and a more useful application than the rather abstract "workers and tasks" scenario that I'd been testing previously.

So, all in all, a rather productive morning! Now I actually have to do a bit more background reading and sort it all out as a full on research proposition. All very exciting!

Wednesday, 18 August 2010

Platformer blues

"I've got a great idea for an app - but what phones should I write it for?"

It's an interesting question and - as it turns out - the answer is harder than I thought. Now, in an ideal world, you'd just write and release it for all the major smartphone OSs - Symbian, iOS, Android and RiM. But that's quite a lot of effort for just one person! So how do you maximise your returns or exposure for minimal effort?

First of all, it's probably an idea to think about what language you're comfortable working in, and what operating systems that the language plays well with.
  • Nokia -- a whole variety of languages supported, so you'll pretty much have to pick the one you want and grab the relevant package for it.
  • RiM Blackberry -- Java
  • Android -- Java
  • iOS -- one of the C languages. You'll also need (yes, really - it's mandatory) a Mac.
Next up, let's look at the different platform distributions (data from Gartner).
  • Symbian: 41%
  • RiM: 18%
  • Android: 17%
  • iOS: 14%
It might be worth noting, though, that the market share for Android jumped from 1% in 2009 to 17% in 2010 - obviously this might not be indicative of future trends, but Google have put a lot of effort into getting it onto as many handsets as possible. Also of note is that Oracle are currently taking legal action against Google for unlicensed use of the Java platform - though the future of that action is somewhat uncertain.

Lastly, we'll need to have a look at the different distribution systems for the different operating systems. (This is just a summary, though - there are multiple delivery platforms for most operating systems, so you don't have to follow the well-trodden path - it might just be a lot easier! Also, having not personally explored them inch by inch, there may still be pitfalls to discover...)
  • iOS: Sign up for an AppStore developer account - this is $99 per year, and lets you distribute your apps through the AppStore, after they've been checked out by Apple.
  • Android: Sign up as an Android Market developer for $25 (one-off fee), and this lets you distribute your apps through the Android Marketplace. However, there are caveats here based on countries - the list of countries where you can charge for your apps is currently quite small.
  • Nokia's Ovi store: Sign up for $50 to register yourself as a publisher - this lets you upload content for distribution via the Ovi store.
  • RiM's Blackberry AppWorld: I can't find a price for signing up as a developer, but again, there's a central hub for app distribution.
Most seem to offer a standard 30% distribution charge.

So, where does this leave us? Personally, I'm going to carry on working with Android for now - I think that it has a good future ahead of it, and I'm far more comfortable working in Java than with C. At some point, I'd like to give the iOS development thing a go, but it would mean buying another computer, which would be a little annoying.

Tuesday, 17 August 2010

Android app: details

Seventh Sea dice-rolling application
This is something that I've been working on for a little while. The dice rolls in the role-playing game Seventh Sea are not the most intuitive or easily calculated sometimes, particularly later in the game when you can be sorting through handfuls of dice, frantically adding some - but not all - of them together to get a total. This isn't exactly adding to the fast and frenetic nature of the genre. Therefore, I've been working on some kind of application to help speed this up.

History
It started out as a purely Swing based Java application, and since developed into a Java applet for ease of access. Finally, it has evolved into an application for Android platform phones, purely as a development challenge...
The development has taught me a good deal about developing for Android - and mainly that it's actually not that hard (particularly for something as simple as this)! There are plenty of good tools available, and the UI creation tools are a breeze - certainly much easier to get into than Swing.

UI
The UI is very simple for this app: there is a main menu screen with a few options available. The only one of any real practicality is the Roller screen, which contains the nuts and bolts of the application. There are two keypads, one of which selects the number of dice that you want to roll, and the other selects the number of dice that you want to keep. There are also buttons available to choose whether the dice "explode" or if and Drama Dice are added to the roll.
The layout files are all quite simple XML files, detailing the page elements available to each page of the app. Each layout file comes in two "flavours", one for the portrait orientation of the phone, and one for the landscape. On a change of handset orientation, the phone switches between the layouts. (This does, however, call the onCreate() method of the layout again, resetting any options that have been chosen.)

Problems
There haven't really been many problems in development at all. The most challenging part was to develop the object-oriented approach to the dice-rolling, as there are some slightly awkward options and corner-cases to be handled.

Future tweaks
There are still some tweaks that I'd like to make to this app, though.
Firstly, it would be nice if changing the orientation of the phone didn't cause the app to forget any dice rolls that it had just made - this, I assume would be handled by a new implementation of the onCreate() or onResume() methods of the particular activity.
Secondly, it'd be nice to check out the RNG for the engine as a whole. This probably isn't essential, as I'm using the Random class, which should be more than enough of a random generator - each single die is given a 48-bit seed based on the system time when it's created - but it might be an interesting experiment to run some tests on how random it actually is.
Lastly, it'd be nice to add some extra touches from the mobile interface itself - perhaps some (optional!) sound effects. On the other hand, they are rather gimmicky, and would probably become extremely irritating rather quickly. (On the other hand, it would be a good reason to start working with storing user settings, so that's a good reason to implement them by itself!)

Friday, 13 August 2010

Thank the Maker!

It finally works! My first Android application - the 7th Sea dice roller that I've been going on about for a while and that has seen simultaneous development as a Java applet - is up and running. It's not available online yet, but depending on how confident I feel (and if I can convince anyone to be part of a beta test) I might end up forking out the $25 to sign up for Google's Android Marketplace and set it out in the real world.

The UI on the Android app is considerably nicer than the UI on the Java applet. I think I might need a little bit more practice using the Swing controls.

More detail will follow, when I'm not shattered :-)

Friday, 6 August 2010

Experiments in digital video, part 1

Finally! I've managed to convince an old XP machine that our (rather) old camcorder does indeed have a valid video driver. The result of that is that I can actually import a load of video from the tape that's been in there for ages and bring it into Adobe Premier. Now all I have to do is try and figure out how the heck Premier works! It's all a bit trial and error at the moment, but I'm making progress.

Of course, the next step will be to try and work with the other tools available in things like AfterEffects: you never know, at some point I might even convince a few people to get together and we'll attempt something crazily ambitious like Beyond Black Mesa. But that's a long way away yet ;-)

In the mean time, I get to watch the "Encoding Video" dialog tick ever so slowly towards completion...

Wednesday, 4 August 2010

An applet is born

Having found a pretty useful little article on the deployment of applets the other day, I promoted by 7th Sea dice roller up the priority ratings as an experiment to see what they can do. So there's now an unlinked page on my regular site which I'll be using as a sandbox (here) to test them. The current applet is a little crude, but serves to demonstrate that it works.

Next steps


The next steps will be to implement the option to change the number of dice that are kept on a roll, and to set up the other options mentioned on the dice roller development page.

(The article is here, and I found it very useful, even if it is a little old!)