Wednesday, September 26, 2007

EverLotto

For those who haven't already heard, EverLotto was released a couple weeks ago. EverLotto is a simple program designed to automate playing of the goblin lotto game in EQ2. It allows you to specify how many tickets you want to buy, then it tracks your wins and losses as it plays for you. It doesn't, of course, change your chances of winning, but it is a nice little tool for those of you who are trying to catch the big prize (the odds of that happening, by the way, are 1 in 1,402,410,240 - that's 1.4 billion).

Dev-wise, it was an interesting project. Because the macro-end itself was so simple (literally, one click in the same place over and over again), I was able to devote more focus on making the internals work well, as well as using the project as a testbed for some of the Autocrat Framework changes I've made. The log file reader, for example, used to be an asynchronous event-based system, but I found over the course of working with it that the approach was simply too cumbersome to be viable. I reworked the reader for a synchronous model - queuing up the log lines as they come in and processing them when necessary - and the programming on the client end has been simplified just with that change alone.

Also changed were some of my graphic functions - in particular, I made them more Vista compatible. For example, the Calibration system (where the framework looks for a white square that denotes the presence of the Lotto window) has gotten a nearly complete overhaul. Whereas in Evercraft it takes between 5 and 10 minutes to calibrate (if Aero is turned on), EverLotto only takes a second or so - so fast, in fact, that I just have it calibrate with each run, rather than store calibration data in between runs.

Finally, EverLotto's distribution model is different than our previous software. Our previous projects all have auto-updaters to allow us to keep the released codebase up to date without requiring users to download and install new software themselves. This model works, but it has its flaws - the biggest, in my opinion, is the somewhat convoluted Uninstall process our users must undergo should they wish to stop using the software and get back to normal. EverLotto has no auto-updater - I released the executable as a standalone file. I had to use some pretty nifty tricks to get it to work, though - because EverLotto modifies your UI, it has to install some files in the UI folder to display the changes. To achieve this, I imbedded the files directly into the executable, and used assembly stream manipulation to draw the data out of the exe and into the right folders. Fun stuff... =P For a more complex project, one that would require the use of an auto-updater, I wouldn't recommend this approach - but for such a simple task as automating the lotto, it's just fine.

It hasn't been a huge seller, but then I'm not surprised. I knew it wouldn't be the runaway hit Evercraft was - it just doesn't have the same appeal, really. But that's why I priced it so low - $10, with no subscription fee - it's free forever. EverLotto was written not so I could make a bundle and retire in Tahiti... It was primarilly written as a testbed application for some of my ideas and changes to Autocrat. A tech preview, of sorts.

No comments: