<DOWNLOADS>

SUDOKU game

The autorun feature, discovered by igorsk has been widely used for modification of the firmware. One the other hand, DOM of Sony Reader together with JavaScript, allow creation of powerfull applications without necessity to write a binary code. The DOM of Sony Reader includes labels, sprites, backgrounds, animation and many other visual elements with support of styles, skins, transparent colors etc. With these elements rich user interface can be created relatively easy. Additional functions found by igorsk and Shade allows manipulate of the files etc. Many other functions are on their way to be discovered. Enough, everybody can have a look at the autorun.xml, autorun.js content or main.xml (Reader) file for these features.

As an example of such application I wrote SUDOKU game. I believe this is the first game created for SONY Reader. When card is inserted into the card slot it runs automatically. After card removal, or with "Quit" button, the Reader is back to it's normal operation. The SUDOKU can be used on both PRS-500 and PRS-505 Readers.

 

Update 02-20-08

In new Version 2 more control have been added.

1. Game New game can be selected either as "Random", "Next", "#", "Load". With "Load" previously saved game can be reloaded (at any stage). With "#" any certain game can be selected, just press digits to enter desired number.

2. Level. One more "simple" level added. As before, the files with templates are located in "simple.tpl", "easy.tpl", "medium.tpl" and "hard.tpl" files in the Sony Reader\software\sudoku folder. You can generate your own templates (see below).

3. Exit . Either "Quit" (just return to the book, or "Save" (save the game without quiting.

4. Added Clocks and "Play time"

5. Refresh (blink) the screen when entering menu (to remove ghostings).

7. Autocheck if the game is completed. If so some animated congratulation screen shows up.

Control: Left, Right, Up, Down arrows - cursor movement.
"Enter" (central button) or "Mark" buttons to enter the Menu and make selection in the submenu.

"Menu" - enter top level menu.

Sometimes autorun does not start automatically (after rotating circle, nothing appears on the screen, in this case press any control button (e.g. "menu")

Version 1

For this implementation I did not create SUDOKU generation algorithm myself (though probably it can be done with Javascripting), instead I used PC command line generator found at http://ostermiller.org/qqwing/download.html which can generate SUDOKUs of different levels of difficulty and write them in a file as a string of 81 characters. My program uses 3 files (in /sudoku/ Folder of the memory card) easy.txt, medium.txt and hard.txt for 3 levels of difficulty. Each contains approximately 500 puzzles. Sure, these files can be replaced to another ones.

Control of the game:

1. Menu line ("Start", "Easy"("Medium","Hard"), "Quit"). Move between them with left and right arrows.

2. Enter (central button of Sony joystick). Start: generate new game, change difficulty level, quit.

3. Move cursor with arrows. Put digits with numeric keys. Use 0 to erase a digit.

4. Sony Menu button - back to Menu line, game will be erased.

 

 

 

Get archive at www.msh-tools.com/ebook/sudoku.zip , unpack to the root folder of the memory card. Insert card to the Reader.