Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
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
Old 12-31-2010, 02:46 AM   #17
azit
Member
azit plays well with othersazit plays well with othersazit plays well with othersazit plays well with othersazit plays well with othersazit plays well with othersazit plays well with othersazit plays well with othersazit plays well with othersazit plays well with othersazit plays well with others
 
Posts: 16
Karma: 2600
Join Date: Dec 2010
Device: kindle
Hi Adrian,

I understood that loading images was asynchronous, so as a hack I slept for a second after loading them and it still made no difference. Surely it can't take that long! I started with static images of the right size and with a preset background, so actually 24 images (I'm very new to this!), but when it was working, changed them back to images with transparent background and also added scaling so that the board can be resized. Looking at some other active content, I can't believe this should be very hard to do even with images.

As for fonts, yes, I noticed that you were trying to use a unicode chess font and that it didn't exist on the K3, so I thought of adding a font as in the font hacks on this site, but that means it would only be of use to people who jailbroke their kindle. If you can load fonts as resources, than that could be nice. According to this: http://en.wikipedia.org/wiki/Chess_symbols_in_Unicode there seem to be some fonts with decent looking chess pieces. Maybe one solution is to ask amazon to add a font? Are they receptive to requests like this?

I will send you a git pull request as soon as I've cleaned up my changes (and figured out how to send a git pull request!). Alternatively, I could just send you a patch.

I couldn't actually see any licence text in your code. Is it supposed to be GPL/apache/public domain, or what? Do you work for Amazon as you put it in a com.amazon.kindle package which sort of implies that it's amazon code.

Cheers,

Paul

ps. how did you get on the KDK beta? I asked a month ago but it doesn't look like it's likely to happen.

pps. it turns out not to be too bad at all developing directly on the kindle.
$ ant build-signed-active-content && scp build/KindleChess.azw2 k:/mnt/us/documents
Takes 2 seconds
Attached Thumbnails
Click image for larger version

Name:	ch4.gif
Views:	644
Size:	10.4 KB
ID:	63816  

Last edited by azit; 12-31-2010 at 02:55 AM.
azit is offline   Reply With Quote
Advert
Old 01-01-2011, 11:10 PM   #18
dvhh
Enthusiast
dvhh plays well with othersdvhh plays well with othersdvhh plays well with othersdvhh plays well with othersdvhh plays well with othersdvhh plays well with othersdvhh plays well with othersdvhh plays well with othersdvhh plays well with othersdvhh plays well with othersdvhh plays well with others
 
Posts: 27
Karma: 2600
Join Date: Nov 2010
Location: Osaka, Japan
Device: Kindle 3
I've not tried this one as I'm still trying to figure out how to load images
http://forums.kindlecentral.com/foru...eID=1555&#1555
dvhh is offline   Reply With Quote
Old 01-02-2011, 01:13 AM   #19
azit
Member
azit plays well with othersazit plays well with othersazit plays well with othersazit plays well with othersazit plays well with othersazit plays well with othersazit plays well with othersazit plays well with othersazit plays well with othersazit plays well with othersazit plays well with others
 
Posts: 16
Karma: 2600
Join Date: Dec 2010
Device: kindle
Quote:
Originally Posted by dvhh View Post
I've not tried this one as I'm still trying to figure out how to load images
http://forums.kindlecentral.com/foru...ID=1555ؓ
Cheers. I'd already added mediatracker code due to another thread on that forum and the chess pieces now show up immediately. It works without having to call the image.width method though.
http://forums.kindlecentral.com/foru...messageID=1253 is the thread.
azit is offline   Reply With Quote
Old 01-02-2011, 01:33 PM   #20
jflanagan987
Junior Member
jflanagan987 began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Dec 2010
Device: Kindle
I just transferred the jar file as azw2 to my kindle 3 Wifi. When I try to open it a message comes up saying "The device is not registered as a Test Kindle to run this title. Please ask the developer to add this device to the list of registered test Kindles.". I don't know what I've done wrong. Has anyone else had the same problem or have I overlooked something?
jflanagan987 is offline   Reply With Quote
Advert
Old 01-02-2011, 03:01 PM   #21
azit
Member
azit plays well with othersazit plays well with othersazit plays well with othersazit plays well with othersazit plays well with othersazit plays well with othersazit plays well with othersazit plays well with othersazit plays well with othersazit plays well with othersazit plays well with others
 
Posts: 16
Karma: 2600
Join Date: Dec 2010
Device: kindle
Quote:
Originally Posted by jflanagan987 View Post
I just transferred the jar file as azw2 to my kindle 3 Wifi. When I try to open it a message comes up saying "The device is not registered as a Test Kindle to run this title. Please ask the developer to add this device to the list of registered test Kindles.". I don't know what I've done wrong. Has anyone else had the same problem or have I overlooked something?
You need to install a developer keystore on the kindle in order to run unofficial apps.
The instructions are here:
http://adq.livejournal.com/107360.html
azit is offline   Reply With Quote
Old 01-27-2011, 11:09 AM   #22
polomint
[Polo]
polomint began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Jan 2011
Device: Kindle 3G + WiFi
Is there anywhere I can download the chess game? I am currently trying to get my head round sorting out the dev environment for kindlets, and also trying to get my head round java, lol... I'm new to Java as you can already guess,


Thank you.
polomint is offline   Reply With Quote
Old 01-28-2011, 12:57 AM   #23
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 polomint View Post
Is there anywhere I can download the chess game? I am currently trying to get my head round sorting out the dev environment for kindlets, and also trying to get my head round java, lol... I'm new to Java as you can already guess,


Thank you.
My crappy beta version is at http://github.com/apetresc/KindleChess . I still haven't received the big improvements that azit implemented, but I'm still hoping for a patch eventually

Cheers,
Adrian
apetresc is offline   Reply With Quote
Old 01-28-2011, 12:59 AM   #24
azit
Member
azit plays well with othersazit plays well with othersazit plays well with othersazit plays well with othersazit plays well with othersazit plays well with othersazit plays well with othersazit plays well with othersazit plays well with othersazit plays well with othersazit plays well with others
 
Posts: 16
Karma: 2600
Join Date: Dec 2010
Device: kindle
Quote:
Originally Posted by polomint View Post
Is there anywhere I can download the chess game?
The original code is here: https://github.com/apetresc/KindleChess
My hacks to get it working are here: http://www.sbrk.co.uk/kdk.tar.gz

Note, it only replays pgn games, it doesn't actually play chess against you. That's left as an exercise for the reader
azit is offline   Reply With Quote
Old 02-04-2011, 11:10 PM   #25
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
The original code is here: https://github.com/apetresc/KindleChess
My hacks to get it working are here: http://www.sbrk.co.uk/kdk.tar.gz

Note, it only replays pgn games, it doesn't actually play chess against you. That's left as an exercise for the reader
Thanks for posting this, azit! You've encouraged me to breathe new life into KindleChess -- I've incorporated your changes into my GitHub repository (I credited the commit author as "azit") and I've started cleaning it up and improving it (I think I've already made a significant performance improvement).

As for what it does, a comfortable PGN viewer is all I envision for this project, for my part. If you want to read my vision for it, just see this post: http://apetresc.wordpress.com/2010/07/03/kindle-goban/

Thanks again! Please send me any more contributions if you have them I'll probably be making a bunch more commits to KindleChess in the near future.

Cheers,
Adrian
apetresc is offline   Reply With Quote
Old 02-05-2011, 10:13 AM   #26
azit
Member
azit plays well with othersazit plays well with othersazit plays well with othersazit plays well with othersazit plays well with othersazit plays well with othersazit plays well with othersazit plays well with othersazit plays well with othersazit plays well with othersazit plays well with others
 
Posts: 16
Karma: 2600
Join Date: Dec 2010
Device: kindle
Hi Adrian,

I did actually send you a pm via this site a few weeks ago, but I guess it got lost in the ether. I'll download your new repo and see if I can add anything.

Cheers.
azit is offline   Reply With Quote
Old 02-07-2011, 12:40 PM   #27
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 did actually send you a pm via this site a few weeks ago, but I guess it got lost in the ether. I'll download your new repo and see if I can add anything.

Cheers.
Hey, azit!

Sorry, I didn't get your PM It appears I had set the forum to e-mail me about new replies to this thread, but not about new PMs. My bad!

I've reimplemented the BoardController to use a new PGNParser library that I ported to PBP. It now displays all kinds of moves properly, and displays PGN comments as well. Working pretty well so far, and I have lots of UI-related features in the pipeline.
apetresc is offline   Reply With Quote
Old 03-11-2011, 01:38 PM   #28
dhdurgee
Guru
dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.
 
Posts: 824
Karma: 2525050
Join Date: Jun 2010
Device: K3W, PW4
Would there be any possibility of porting this to the Kindle 3 WiFi:

http://code.google.com/p/opensoftphone/

It would be limited in its capabilities, as I am unaware of a way to connect a headset to the Kindle, but it would be interesting to see if this would work.

Dave
dhdurgee is offline   Reply With Quote
Old 03-11-2011, 04:49 PM   #29
hawhill
Wizard
hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.
 
hawhill's Avatar
 
Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
OpenSoftPhone uses JNI which doesn't really work well for kindlets. It would work only on jailbroken Kindles with changed Kindlet settings anyway. And then someone would have to figure out a way to force unloading of the JNI library upon Kindlet termination. Otherwise, it only works for the first start of the Kindlet after each framework start. The Kindlet API isn't really prepared for this at the moment. It does not provide an audio API either, I think.
hawhill is offline   Reply With Quote
Old 03-12-2011, 08:23 PM   #30
dhdurgee
Guru
dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.
 
Posts: 824
Karma: 2525050
Join Date: Jun 2010
Device: K3W, PW4
That doesn't sound encouraging. Thanks for the information. So if an SIP phone package is to be implemented on the kindle it would probably need to go through another route.

Dave
dhdurgee is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I write Kindlets? nathansuchy Kindle Developer's Corner 3 11-17-2012 04:16 PM
Kindlets crashing ger1972 Kindle Developer's Corner 8 06-28-2012 11:26 PM
Developing kindlets on the K4 NT ger1972 Kindle Developer's Corner 10 06-15-2012 11:45 AM
List of Kindlets available inameiname Kindle Developer's Corner 27 04-14-2012 07:16 AM
iLiad jharker:would you please write a guide on installing iLiadPowerManagement tudou331100 iRex Developer's Corner 10 01-22-2009 11:19 PM


All times are GMT -4. The time now is 06:44 AM.


MobileRead.com is a privately owned, operated and funded community.