Archive for March 2013

Choosing your own adventure.

Recently I decided to write an Android app. This isn’t a completely crazy idea as I’m a web developer by trade. I wanted to do this partly to have a pet programming project outside of work, and partly because my fiction writing had got stuck in a bit of a rut so I figured I’d take a break from it. Then, perhaps because of the second point I hit on the idea of the app being essentially a choose your own adventure game.

I didn’t have anything ambitious in mind. Certainly not anything as involved as the legendary (and recently revived) Fighting Fantasy books of my youth. However it proved to be a bigger undertaking than I’d anticipated.

When in doubt, draw a picture

The choose your own adventure format strongly invites the creation of a flow diagram. At first I thought a single flow diagram would suffice, but once I started contemplating putting dry-wipe tape on the walls I realised I needed to rethink matters. So I used the programmer part of my brain and split the work into discrete chunks. More specifically, I made the decision to make the adventure a series of linked areas, each of which had their own diagram. This allowed me to  write flow diagrams with only 20-40 boxes, then link them together at their entrances and exits. I’d recommend the same approach to anyone else taking on the same task.

Micro writing

At first the writing was purely about fun. Unlike more conventional fiction writing, I felt no responsibility to traditional flow and narrative. Each page, for want of a better word, was a brief description. There was a lot of scope to just have fun with both the format and the language, and the slightly unpredictable way a reader could work their way through the pages made a mockery of linear narrative. It was mostly about one-liners, and in that respect it was fun to just write something nicely without worrying about how it would work with the rest of the story.

Macro writing

Naturally it wasn’t that simple in the long run. Writing amusingly around the flow diagrams was important to get the puzzles, such as they are, implemented. However I also wanted to have a larger narrative in play, so the reader gets a sense of a story while working their way through the application. This was difficult because there’s no guaranteed route through the pages.

I’ve played quite a few computer games in my time, and am quite familiar with the technique of found information. This is where in the course of playing the game you discover objects which fill in a piece of the game’s story. This works particularly well in linear games where the player progresses through levels. However I’d already made the decision to allow the discrete areas of the app to be accessed in any order, so I couldn’t rely on that to keep the narrative in order.


I settled on what I think of as a shotgun approach. I can’t hit the target dead-on every time, so instead I aim to cover it randomly enough times that the player will see enough of the pieces to get the narrative even though it’s received piecemeal.  I aimed to do this via a combination of some guaranteed story telling in the early part of the app so that what follows isn’t completely unfamiliar, and randomly discovered bits of information which add to it. I’m not entirely sure how successful the approach is, but it strikes me as something which can work. The tricky part is knowing how many of the pages should include portions of narrative. I hope to find out from feedback from the app itself. To some extent it mirrors a challenge of traditional narrative, which is how to write just leanly enough to keep the reader on their toes without confusing them.

You have not been eaten by a grue

Overall I’m glad I took on this project. From a purely writing point of view I’ve enjoyed the freedom from writing to the standard linear format. However it’s also made me think a lot more about that same format. It’s made me think about how much information is required to get a story without it being obvious from a different perspective. And that’s something I can’t wait to consider in more detail when I start writing my next short story.

You can download the app Google Play. It’s free!

Here’s a photo of a mouse on a swing:


(Although it might be a hamster)

I Decided To Write an Android App

By trade I’m an ASP.Net / C# developer. I spend most of the working week inside Visual Studio. Occasionally I get old skool and bust out SQL Server Management Studio in order to bother some data more directly. It wasn’t always like that however. In the past I’ve worked with PHP, and a long time ago I spent most of my time plugging away in classic ASP’s VBScript. A few times I’ve even been known to do some Java. Well, just enough to be dangerous, as they say.

I own an Android phone, so rather than go down the more natural Windows Phone development route, I thought I’d dust off my Java skills (a very careful dusting as they’re somewhat fragile) and write an Android app.

What is it?

That’s a good question. I know what it is now and I’ll tell you shortly, but when I set out to make an app I didn’t really have anything particular in mind. I certainly didn’t have some inspired cash-cow at the ready. So I sat down and tried to figure out what I wanted to do. It seemed to me that I had two main goals for the app:

  • It had to be fairly simple so I wouldn’t get bogged down in complexity on my first attempt.
  • It had to be somewhat silly.

The second point was largely to differentiate it from my day job. Not that the day job isn’t fun sometimes, but if I was going to motivate myself to finish this in what little spare time I have, I had to hang my serious hat up as soon as I got back to my flat.

User hostility

At first I thought it would be funny to make something slightly hostile. I had the idea of an app that purports to help people find lost keys, but which actually berates them for losing them in the first place. Then I realised I was being a dick, so I didn’t do that. The idea of of an app to find keys was good though. The only problem was, as a practical app it was quite impossible.

After talking with a friend I began to like the idea of making a choose your own adventure sort of experience behind the pretence of an app that can find keys might be fun. This ticked an extra box with me as it would allow me to not only write an app, but also write some fiction, albeit in a format I’ve little experience writing. That side of it would prove to be more work than anticipated, which I’ve covered in a separate blog post.

Where are my fucking keys?

That was the working title for the app. At the time I thought it was funny, but at the back of my mind I realised it probably wouldn’t survive into the app store. So now it is known less offensively as Sheepless Key Finder. The sheepless part does have relevance to what thinly passes as narrative in the app.

It’s fair to say that the app took longer to write than I initially thought. Some of that was how much planning and writing the adventury bit needed. The rest was at first simply getting stuck on implementation, but later it turned out I have quite a flair for scope creep. There was always another little bit I wanted to add. But eventually it was done.

Was it worth it?

It was never going to make me rich so the only measure of its success I have is whether I feel it was worthwhile taking the time and effort to write it. Well, I’m happy to say that yes, it was. I’ve learned how to write a fairly basic Android app, but in doing so I now have a good appreciation of how to use the framework and would feel quite confident about writing another, completely different app. I may go into the technical details in another blog post, but I’d like to summarise a few points here in conclusion:

  • Java, while similar to C#, is not C#. I knew this before of course, but also, shhhhh – it’s not that different to C# really.
  • The Android framework is pretty well thought out, with Activities naturally separating  concerns without too much effort.
  • I still don’t like Eclipse as much as Visual Studio, but debugging worked well enough for me.
  • The Dalvik VM was horrifically slow when I first started, but after an update it’s much, much faster. The VM management is also quite nice to use. It was easy to make a range of VMs covering different screen sizes and densities.
  • Debugging on my phone itself was a doddle. I was expecting to have to jump through many hoops to get it working, but essentially all I had to do was plug my phone in and pick it as a target when debugging. Lovely!
  • That said I did have one annoying issue where a VM got screwed up and had to be deleted. Grrr.
  • Signing the app is actually very straightforward, but one crucial step is a bit ambiguous and caused me some strife.
  • Actually running the finished app on my phone felt nice.

You can download the app Google Play. It’s free!

Here’s a sheep wearing a hat: