My job has recently changed from mostly programming in Perl to mostly Java. As such I’ve been playing around with Java at home a bit too.
A couple of weeks ago I got an email from someone who bought my Sky+ Remote Recorder app asking if I’d be updating it. I replied saying that I wouldn’t because I didn’t think it was worth the effort when Sky have their own app and at least my asp still worked for people with older versions of Android.
A couple of days ago I read that Sky’s apps got pulled because they got hacked. I cursed myself for not having bothered to update my own app and decided it would be good practice at Java and would be a welcome improvement to the people who still use my app regularly.
I’ve spent my evenings working on a new version this week. It’s coming along quite slowly because I’ve got no experience of most of the new Android development practises or designs.
I hope to have a very basic ugly version working by the middle of next week and then spend some time polishing it and doing what testing I can on the devices at my disposal before releasing it.
Rik moved down to London not so long ago and he’s been staying with Cheryl and me since then. It’s been kind of weird having someone else in the house again, not in a horrible way, just different. I’d forgotten what it was like. Anyway, glad to help him out in what is normally a very difficult and expensive thing to do.
It’s cool having him at work too, especially since Dan is abandoning me for Australia in a matter of weeks now.
It snowed in London for the first time this winter over the weekend. Cheryl, Charlotte, Aron, and I spent a good hour or two on the roof terrace in the middle of the night throwing snowballs and building snowmen. It was a lot of fun. I was soaking wet when I got back into the apartment, but it was enjoyable.
I’ve been working on one of my Android apps quite a bit recently. It’s really frustrating me at the moment though because things aren’t working how I’d expect them to. I think it’s just the dimension definitions that are making it look so horrible, but I can’t be sure. It also seems that there’s no font anti-aliasing on my phone. It could just be the dimensions and some horrible scaling though. Oh well.
I was looking around on the Android Marketplace today when I saw that BSkyB are now offering their own Sky+ app for remote recording shows, listings, etc. It’s a very nice-looking app. Lots of polish and shine.
I don’t really see any need to continue developing Remote Recorder now this app exists. It’s kind of a shame because I was still in the middle of my rewrite. I’ll leave my app listed and I’ll probably finish the new version at some point because it’s actually something I enjoy doing, but once the new version is out and stable I doubt I’ll plan any new features, unless I think I can offer something that BSkyB can’t, won’t, or don’t.
I finally got around to switching my morning alarms (I have 3 set) to my own Android alarm app last night.
The difference was noticeable straight away when I woke up at 6:30am without jumping out of my skin. I felt so much more relaxed, and so I went back to sleep until the 6:45 alarm went off letting me know that I really should hurry up and get out of bed, so I did. The 7am alarm went off telling me I should be leaving the house, and so I hurried along and set off for work. 🙂
I’ve been spending quite a bit of time working on the next version of Remote Recorder (my Android app for recording TV programmes with Sky+). I’ve listened to a lot of feedback and the main thing requested by people was the availability of listings for TV channels, rather than just a search interface. When I originally made the app I just wanted to be able to search, so I made it just for myself. That’s no longer the case though, as there are quite a few users of the app, and that number is growing every day.
So I have spent quite a bit of time looking at how best to implement this feature and the video below is what I’ve come up with. Keep in mind that it’s incomplete, and excuse the elevator music 🙂
So yeah, that’s the basics of how it will work. There will be some minor differences that I have in mind, like the ability to filter the channels/programmes by typing the name into the box at the top. This next version should go a long way towards making Remote Recorder a much more stable and usable Android app. 🙂
I received a notification from a user last night saying that there were problems sending remote record requests because of a login issue. I just wanted to update to say that I have replicated the problem with my own account, and so I plan to work on fixing this issue this evening, as soon as I get home.
Based on a tiny bit of checking I think it should be a fairly trivial fix, but that’s without knowing the true details of the problem.
I will update again when I know more, and will get a working version on the Android Market as soon as possible.
I made some changes to my Sky remote record app for Android available on the market today. The changes are fairly basic, and are mostly there to make the user experience a bit better.
For example, if your recording fails then you receive a screen where you can choose to test your login details on Sky’s website to make sure you’ve got them correct, you can also view the help on my site, or open the preferences to change your username and/or password.
The update will make it much easier for people to be sure their details are correct and solve any problems they may encounter when setting up remote record requests with Sky.
One of the most important parts of the entire game is the ability to shoot at the bad guys. For this you’ll definitely be needing some bullets (and I’ll get to the bad guys soon).
I thought adding bullet sprites would be quite complicated because it would involve finding the angle to be fired at, the start position based on the position and rotation of the character sprite, but that turned out to be quite simple in the end.
Rather than use any complicated mathematics I determined that the centre of the character sprite is something that won’t change because the character is on top of a non-moving tower. I modified the Sprite.java file in the Rokon files to include centreX and centreY values. If I eventually let the character sprite move then I will need to make sure that value gets updated, but that’s a very minor issue.
I create the bullet sprite when the user presses the trackball button, or the centre of the directional pad if that’s what the device has. The bullet sprite appears at the centre of the character sprite and has X and Y velocity applied to it like so:
To begin developing my game I downloaded the latest Android SDK and set up Eclipse as explained in great (and hopefully up-to-date) detail on Google’s instructions page.
Once this was working I got the latest version of the Rokon game engine and extracted it into my workspace folder. I imported the existing project into Eclipse and added my own class to the list. I copied one of the examples into my own class and then removed the com.rokon.examples class and files. I changed all references of the com.rokon.examples class to my own class in files like the AndroidManifest.xml file. I missed a few places at first, but Eclipse is pretty good at telling you what’s wrong. I found it helpful to clean the project using the Project->Clean menu item to make sure no errors were left over from before certain changes.
Once I had eradicated all errors from Eclipse I ran the source in an Android Virtual Device. To my immense surprise it was working!
I went into the code and started to strip out all the bits I didn’t want. I kept one sprite around, but changed the sprite texture to my own arrow, and made it considerably smaller.
That was all pretty easy, and I thought things were going to well until I realised that I now needed to get down to the harder stuff. The user would need to aim in different directions from one point, so I needed a way for the person to change the angle. My first thought was to use the scroll ball that appears on most HTC devices these days. I thought that might be a bit of a problem though, because I was planning on using the scroll ball press as the trigger, and that might lead to people accidentally pressing it when they didn’t want to.
I decided that it would be cool to have the character point towards where the user pressed on the screen. The problem with that is that code is required to work out what angle to rotate the character by depending on where the character is, and where the player has pressed on the screen. I managed to find various little bits and pieces online that helped me come up with a decent solution.
That looks very complicated, but it’s not that bad, really. The angle is worked out using the position of the centre of the sprite and the position of the press on the screen. I’d explain it in more detail, but that might take a while. You may notice the +90 near the end of the rotation line. Unfortunately that’s a bit of a hack to add 90 degrees of rotation to whatever angle is given to me. It works, so I’m fine with that for now.
Now when I run the “game” I see an arrow on the screen. If I press on the screen then the arrow points at where I pressed. If I move my finger while it’s pressed then the arrow follows my finger around. A good start to coding the actual character.