View Single Post
Old 12-31-2010, 12:50 AM   #16
apetresc
Junior Member
apetresc plays well with othersapetresc plays well with othersapetresc plays well with othersapetresc plays well with othersapetresc plays well with othersapetresc plays well with othersapetresc plays well with othersapetresc plays well with othersapetresc plays well with othersapetresc plays well with othersapetresc plays well with others
 
Posts: 6
Karma: 2600
Join Date: Dec 2010
Device: Kindle DX
Quote:
Originally Posted by azit View Post
Hi Adrian,

I've managed to compile your KindleChess to run on a jailbroken kindle 3. I reduced the square size to 64x64 so it would fit on the screen, as it appears you originally wrote it for a dx. I then created 64x64 images for the pieces. It's a bit of a mess as I've only spent a couple of hours on it and I have to figure out how to debug it. Since I don't have a simulator I can only run it on the kindle which is a bit of a pain. Progress so far attached.

Edit. Now working, but with some refresh issues at startup. Seems the board isn't all displayed, perhaps because the images haven't been read in in time? Just got to fix the grey scale background for black.

Cheers,
Paul
Hi Paul!

Wow, I'm surprised you got KindleChess so far -- I haven't focused as much on it because I was discouraged by the lack of the chess figures in the Unicode fonts on the device. It works fine on the simulator, but shows up as squares on the device.

The solution, of course, is to load images for each one. As you've discovered, loading 12 different images in 32 places is non-trivial for the Kindle to do, especially since all image loading in the KDK has to be done asynchronously (!!) I'm actually impressed you got as far as you did -- please feel free to send me a pull request on GitHub if you're so inclined.

The better solution, I think, it to add hacks to KWT to allow the loading of fonts as resources from the JAR. Then I can put in a decent Unicode font that includes the chess glyphs I linked above. The Kindle is much better at rendering fonts than images! If that were to work, I would go back to putting in effort to KindleChess to make it work as well as KindleGoban does.

Thanks!
-Adrian
apetresc is offline   Reply With Quote