until !self.sleeping?
self.code(:sweetness)
end
software development notes
photo © 2008 cmcbrown | more info (via: Wylio)
It's been a while since I've posted anything real. I started on a couple articles thinking I didn't have time to update Thumb War, but in the end didn't have time to finish those articles either.
Which brings me to the simple question. Where does the time go? My guess is work and family. I found the above image free online, so I cannot really vouch for it's accuracy, but it sure looks pretty.
On the Thumb War to-do list is:
As for the articles that I've started but didn't finish:
Enjoy your summer!
Fabrice Bellard built an x86 PC emulator using JavaScript. He's even gone so far as to install Linux kernel 2.6.20 on top of it. "The code is written in pure Javascript using Typed Arrays which are available in recent browsers," Bellard wrote. It works in Firefox and Chrome 11, but not not Chrome 12.
As for the Linux instance, Bellard wrote: "The disk image is just a ram disk image loaded at boot time. It contains a filesystem generated with Buildroot containing BusyBox. I added my toy C compiler TinyCC and my unfinished but usable emacs clone QEmacs." You can see Linux running JavaScript here.

Bellard did it just for fun, but he speculates that it could be useful for the following purposes:
Oddly enough, he found that Linux ran twice as fast on Jaeger Monkey as it did on V8. He's not sure why.
DiscussI've discovered that no amount of screenshots or marketing speak will ever get someone past the $1.99 price point. So with a bit of research and rework a free version Thumb War is now available here.
For a while I thought the process of making 1 project into 2 was going to break the time bank, but after running into this article on the Android Developer site the pieces fit together quite nicely.
The secret is in one property setting of an Eclipse project which allows a project to be shared by another. The setting is "Is Library". Once enabled all classes and resources (drawable, layouts, strings, etc) are available to users of the library. The activities can be addressed in the manifest with absolute package names instead of the relative package names.

The best part of the whole thing is I don't need to create a separate jar build process to make it all work. Now, if you're the type that likes everything automated, I'm leaving that as an exercise to the reader.
After changing the original project a library, I did the following to get the paid version working again.
Surprisingly everything just worked.
The next step was to actually create the free project. This is pretty much the same as the paid project so I started with the paid project as the base.
This also worked. It was functionally the same as the paid project and the original pre-library-itized project and both were on my device at the same time. Which means it meets Androids unique package restrictions, too.
The final step in the free project was to add a few restrictions to it and add a few dialogs to encourage the players to purchase the paid version. That fortunately was the trivial work, phew! In case you're curious, I've restricted 3 of the 5 games and if a user selects a restricted game from the menu a dialog will tell them that it's unavailable in the lite and provides a button to go to the Android Market to purchase the full version.
Too tired to give any details, but here's a screen for the curious.
I believe I'm almost finished with some thing that I wouldn't hate being in the market. I know that standard seems a bit low, but if I don't release this thing soon it won't ever get released.
The past sessions were all about artwork. This could have been a long rabbit trail, but my wife reminded me to get this thing done. And that every minute I send on this creation, I lose with my son. Anyway, artwork is basically done. I have to crop here and there. But I think it's workable.
Here's some things that are completed:
Stuff yet to do before release:
Stuff to finish after release:
After release I'll post images of the game...