Purely so that the first post on my homepage isn’t about depression, here is a photograph of some kittens.
Author Archives: ardavey
Photosphere
I’ve only ever had limited success with Android 4.2+’s “Photosphere” feature – probably because I only ever tried it in enclosed spaces. Well, today I tried it outdoors for the first time, above Athens with an open view to the Acropolis – here is the result:
And now another one from beside the Parthenon:
Comments Off on Photosphere
Filed under Photography
Wordfeud Tile Tracker
https://wordfeud.ardavey.com
It’s been up and running for a while now, and has had a coat of paint or 2 since the last post, so I thought I’d pimp my Wordfeud Tile Tracker again.
I’ve been promoting it on the Wordfeud League of Honour site semi-regularly, and mentioning it to my opponents – well, the chatty ones anyway 😉 There have been 18 unique user logins in the past 10 days, and a total of 5709 (and counting) total page views to date.
I’d like to encourage anyone reading this to spread word about the site – I made it for people to use.
For those of you who haven’t yet dived in, here’s a fresh set of screengrabs to show how far it’s come since the last post:
Positive and negative feedback is welcome in the comment section of this post!
Zookeeper Battle – Another reason to root an Android phone
It’s no secret that I have a keen interest in video games – from large-production epic console titles to casual smartphone games, and everything in between. There’s a recent growing trend in mobile games, where a game is advertised as “free” but requires some kind of in-game purchase in order to unlock or make significant progress. This is really starting to piss me off, but I’ve managed to get something positive from this frustration, as a result of working around the crippled functionality of just such a game.
I’m a shameless addict of so-called “match three” casual games – the most famous example of which is probably PopCap’s excellent “Bejeweled”. However, I am currently hooked on the cute art style and naff music delivered by the Zoo Keeper collections of games, across several platforms, so I was delighted when I discovered Zookeeper Battle for Android (and iOS). Finally I could play challenge matches with random strangers on the internet, and it was free!
Well, after the first few games, it seemed that all was not as good as I had naively thought. Only the first few blocks of game credits are free, and then the game is crippled. The game credit indicator is a bar with 6 spaces which are initially full. You start out with a few “power bottles”, each of which will completely refill this bar. Each game empties one of the spaces on the bar and, upon depletion, the bar refills one slot every 6 minutes, but only up to a maximum of 2 slots.
Since I enjoy this game so much, I would happily pay a few pounds for an unlimited version, but a browse of the in-game store reveals no such option. One can buy a single “power bottle” (to refill all 6 slots) for $0.99, 6 bottles for $4.50, or 14 for $8.50 – respective rates of $0.165, $0.125 and $0.10 per game. Really, $0.10 is the cheapest option to play this game. I regularly come up against opponents who have played several thousand games – does this mean that they have stumped up in excess of $300 to the mobile game gods? I sincerely hope not!
Being a little devious, I decided to have a poke around the files which this game deploys on one’s Android device (and, without getting into too much detail, this kind of thing is exactly why I chose Android over iOS for my phone) and found a very interesting XML file containing all kinds of data for the game. With a bit of experimentation, I was able to determine that, while most of the data appears to have been written to the file following a download from the game server, some of the elements are read directly from file – including the “number of game credits” field.
Following a very brief spot of Perl scripting using the incredibly handy SL4A package, I now have a solid workaround for this game- (and wallet-) crippling “feature”, which is as follows. Note – this does require root on your Android device. If you do not know what this means then please Google – this particular post is not intended as a “how to root an Android device” tutorial.
- Play until you see the dreaded “give us more money to keep playing” screen, and then hit cancel and quit the application. It’s important that you *actually* quit, rather than just jumping to the Home screen:
- Using your file explorer/editor of choice (or a command shell), update the permissions on ‘/data/data/jp.kiteretsu.zookeeperbattle.google/zk.dat’ to make it world readable and writeable:
- Fire up SL4A and create a new Perl script as follows. I saved this as “zkpatch.pl” – note, you only need to create the script the first time:
use Android;
my $droid = Android->new();
my $datafile = '/data/data/jp.kiteretsu.zookeeperbattle.google/zk.dat';unless ( open FILE, $datafile ) {
$droid->dialogCreateAlert('Error',"Failed to read file: $!");
$droid->dialogShow();
exit 1;
}
my @content = <FILE>;
close FILE;unless ( open WRITE, ">$datafile" ) {
$droid->dialogCreateAlert('Error',"Failed to write file: $!");
$droid->dialogShow();
exit 1;
}foreach my $line (@content) {
$line =~ s!<zk_cp>.*?</zk_cp>!<zk_cp>6</zk_cp>!;
print WRITE $line;
}
close WRITE;$droid->dialogCreateAlert('Done',"$datafile has been patched");
$droid->dialogShow();
- Now execute this from within the SL4A app. It will show an alert if there’s an error opening or updating the file, and a confirmation if it’s successful:
- Reload the game and enjoy your full credit bar!
There you have it – a nice workaround for a stupid game payment mechanic!
Ideally, I’d like to wrap this up in a standalone application for Android, rather than using the Perl script. Also there is word that future version of SL4A will allow performing operations as root – this would allow me to set the target file’s permissions from the script for a more elegant solution. Until then, I’d rather take 10 seconds to perform these steps than wait 6 minutes to play another game.
Automated Tile Tracker Beta!
The first incarnation of my automated tile tracker is now available to try out. I’m looking for people to beta test it and identify any functional problems, and to make any suggestions for features. Both forms of feedback may be left in the comments section below.
Update: Moved to wf.ardavey.com
Here is the kind of thing you should expect:
Automatic Wordfeud tile tracking
As previously mentioned I’ve been working on a Perl library for talking to the Wordfeud game servers.
After having issues logging in to my own account, I’ve discovered that passwords on older accounts seem to have a fixed string appended to them. I have no idea why – the new account which I created with my API does not share this requirement, so I can only assume it’s some kind of legacy mechanism to allow users to have no password set.
Anyway, now that I no longer see a ‘wrong_password’ response on my own account, work can continue. My first project is going to be a simple webapp which will allow the user to view the board layout, their own rack and the remaining tiles for any of their active games.
Here’s the output from the proof of concept script I knocked together which does just that – just need to wrap it in something prettier now (and which doesn’t just have a hardcoded game ID!)
board: +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | N | | | | | | | | | | | | | | | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | U | H | | | | | | | | | | | | | | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | | O | R | | H | O | W | | | | | | | | | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | L | | A | X | E | | E | F | | | | | | | | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | O | D | I | U | M | S | | | | | | | | | | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | G | I | D | | | P | A | C | T | | | | | | | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | | D | E | | F | A | | | I | | | | | | | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | | | R | | | s | K | I | D | | | | | | | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | | | | | | | A | T | E | | | | | | | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | | | | | | | | | | | | | | | | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | | | | | | | | | | | | | | | | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | | | | | | | | | | | | | | | | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | | | | | | | | | | | | | | | | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | | | | | | | | | | | | | | | | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | | | | | | | | | | | | | | | | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ rack: [WRNITBG] remaining: [?AAAAAABCDEEEEEEEEGHIIIIJLLLMNNNNOOOOPQRRRSSSSTTTTUUVVYYZ]
Wordfeud tile tracking
As I play more league games at Wordfeud League of Honour, I’m finding it increasingly useful to count the tiles played in my games. This gives me 2 important bits of information.
Firstly, I know at a glance which “high risk” tiles are still out there, so I can be careful not to leave spaces open which may be used by some of the higher scoring letters.
Secondly, towards the end of a game, it tells me exactly which tiles my opponent has on their rack.
This is a completely legal tactic in competitive Scrabble, and is allowed in the particular league I play. However, because of the mobile-centric nature of this game (I tend to play it on my phone), it’s not always convenient to perform such tracking on paper.
After some brief Googling, I came across a simple web-based tool written by James Byers, found at www.tile-tracker.com. However, Mr Byers is clearly not a Wordfeud player, so I have created an updated copy of this tool which supports my game of choice – ardavey.com/tiles
Eventually, I hope to write an automated web-based tool to perform this task – something which, given your Wordfeud credentials, will present a list of all current games and the remaining tiles, or something along those lines. This of course depends on me completing the API I’m working on – I’m getting there!
Filed under Wordfeud
Wordfeud development
I play a lot of Wordfeud on various devices (online Scrabble-like game – imagine Words With Friends didn’t look like it’s for children), and I’m finding a disappointing lack of game tools out there. I’m not talking about cheat apps – there are plenty of those.
I’m interested in collating statistics and tracking my current games in progress – including counting which tiles have been played, current scores, etc. All of those kind of things are not classed as cheat tools – they’re the kind of thing you can do with a pen and paper.
Over the last couple of days I’ve started writing a Perl library to allow communication with the Wordfeud game server, as a first step. Once I have essentially written an API which provides access to all of the game client’s functionality then I can start writing some useful tools.
Everyone needs a hobby!
New car!
After 2 1/2 years of joy, the novelty has somewhat worn off and I’m feeling it’s about time to replace my beloved MX-5. I came up with a set of requirements for a replacement, pretty much as follows:
- Reasonable fuel economy – I’m sick of averaging <30mpg
- Able to seat 4 adults – I kind of miss road trips with friends
- Comfortable – increasing back trouble has made low-slung sports cars a bit painful
- No more expensive to tax/insure than the MX-5 (not difficult!)
- No more than 6 years old
- Pretty! No self-respecting petrolhead wants to be seen driving a shed.
After cooking up a savings plan such that I could afford to go and buy a replacement in March/April then sell the MX-5 just in time for next summer, I made the mistake of taking a look at the market just to see what was available now within my planned budget.
I found a few interesting BMWs – mostly 320d and 520d, but they’re a dime a dozen. I planned to go and take a look at a nice 520d which seemed like an unmissable deal, but they’d taken a deposit on it before I was free to travel through to see it.
Since I was already geared up for car shopping, I decided to take a punt and go to see a nice looking silver Jaguar X-Type 2.2d SE – heated leather, electric everything, built in sat nav – the works. Not really a model I’ve ever given a second thought to, to be honest, but after seeing her up close and going for a test drive I was completely and utterly sold.
Well, one thing inevitably led to another, and I am now a proud Jag owner, 3 months ahead of schedule. Here she is:
Filed under Motoring
Welcome!
I’ve owned this domain for a while and finally decided to do something with it. I may go no further than making this inaugural post, but I have a few ideas for what I’d like to host here.
WordPress seems like the ideal way of just throwing content on here without having to write any HTML (yay!) so let’s roll with that for now and see where it gets us.
Filed under Random