Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > More E-Book Readers > iRex

Notices

Reply
 
Thread Tools Search this Thread
Old 03-12-2009, 04:10 PM   #1
Mackx
Guru
Mackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to behold
 
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
Sudoku again

There are not a lot of 'positive threads' lately, so let me post yet another version of Sudoku. Again I hope that the supplied source code inspires others to also write some programs for the DR.

It reuses the sudoku generator and solver from gtk-sudoku, but the complete 'look-and-feel' is new.

Copy the content mxSudoku.zip in the root of your SD-card. After inserting the card in the DR you will have a 'Programs' folder with the mxSudoku short-cut to start the program.

It shows two grids, one empty and one with the number 1-9, ?, C and V

First select 'new' or 'open' from the menu, this will fill the upper 'board' grid with some values. Search for a number to add, select it first in the lower 'keypad' and then the cell in the 'board'-grid into which it should go.

The number that is selected (grey) will be copied into every cell you select in the board grid. Use 'C' to clear a cell. Use 'V' to verify your current solution.

The '?' selects the 'cheat'-mode and fills in the correct value in every cell you touch on the board.

Note that my main goal was to practice some programming on the DR, so the game will not be perfect. (E.g. the random games generated are far to difficult for begining sudoku players and a lot of more comments can be made.)

If you want to play with the source code, it is easiest to use the VMWare image from Adam on a windows machine (see the sticky thread).
Once the source is unpacked:
- run the Ajunta plugin by clicking mxSudoku.anjuta
- enable the poky plug-in (Edit->Preferences)
- Do an auto generate (Build-menu)
- and a configure with --prefix=/usr
- Then build the project

See the iRex documentation for more information on developing and development environment.

(Use the 1.03 poky images since the 1.5 do not allow you to use the mouse as a 'stylus')

I tried to put a lot of comments in the code, so I hope it is self explaining, but please let me know if something is not clear to you.

pfff thats posted ...
Attached Files
File Type: zip mxSudoku.zip (110.2 KB, 491 views)
File Type: gz mxSudoku_v1.tar.gz (55.7 KB, 405 views)
Mackx is offline   Reply With Quote
Old 03-13-2009, 12:27 AM   #2
RobbieClarken
Addict
RobbieClarken ought to be getting tired of karma fortunes by now.RobbieClarken ought to be getting tired of karma fortunes by now.RobbieClarken ought to be getting tired of karma fortunes by now.RobbieClarken ought to be getting tired of karma fortunes by now.RobbieClarken ought to be getting tired of karma fortunes by now.RobbieClarken ought to be getting tired of karma fortunes by now.RobbieClarken ought to be getting tired of karma fortunes by now.RobbieClarken ought to be getting tired of karma fortunes by now.RobbieClarken ought to be getting tired of karma fortunes by now.RobbieClarken ought to be getting tired of karma fortunes by now.RobbieClarken ought to be getting tired of karma fortunes by now.
 
Posts: 371
Karma: 1002274
Join Date: Mar 2008
Location: Australia
Device: Kindle
Great work Mackx, I look forward to trying it. The extra hard random games won't bother me.

I keep meaning to learn to program for the DR1000 but I'm not very familiar with linux. Is it difficult?
RobbieClarken is offline   Reply With Quote
Old 03-13-2009, 03:34 AM   #3
Mackx
Guru
Mackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to behold
 
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
I had some basic unix knowledge from long time ago, this helped me to quickly take things up.
The document here on the iRex website is a good starting point. You can follow the document and install Ubuntu yourself or use the VMware image published by Adam even on a windows PC (it is not as fast as a native machine, but for me it works).

On internet you can find a lot of information on GTK used for the UI of the DR (google for GTK tutorial). Start studying the helloworld example of iRex and the other programs that have been ported or written for the DR and published in this forum.
Also the published code of the DR by iRex is a good source of 'example' code.

Its basically a matter or just starting .

Keep posting your specific questions here (or the iRex forum) I assume more people will benefit from the answers.
Mackx is offline   Reply With Quote
Old 03-13-2009, 09:01 AM   #4
Gertjan
ex-IRX developer
Gertjan doesn't litterGertjan doesn't litterGertjan doesn't litter
 
Gertjan's Avatar
 
Posts: 158
Karma: 224
Join Date: Oct 2008
Device: Irex DR800S, DR1000S, iLiad
Nice job, that keypad works much better than the keyboard of gtkSudoku!

It would be even cooler when you could write in the box like a scribble and do character recognition but that might be a bit too much to ask
Gertjan is offline   Reply With Quote
Old 03-13-2009, 11:02 AM   #5
Mackx
Guru
Mackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to behold
 
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
Quote:
Originally Posted by Gertjan View Post
It would be even cooler when you could write in the box like a scribble and do character recognition but that might be a bit too much to ask
Well that is indeed the plan, this is the first step. Lets see how many hours I can spend ... I have some ideas on how to proceed with some simple digit recognition from pen strokes.
Mackx is offline   Reply With Quote
Old 03-15-2009, 11:14 AM   #6
Mackx
Guru
Mackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to behold
 
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
I gave it a first try, most of the times I succeed in getting the correct number ...
If there is no digit selected in the keypad, you can (try to) write the digit on the board. A digit on the keypad can be de-selected by tapping on it again. So both modes, keypad and direct scribbling on the board is now supported.

The code is far from perfect any ideas to improve?

(The zip only contains the modified application, so you will need the first zip-file as well for the other files)
Attached Files
File Type: zip mxSudoku_v0.2.zip (92.8 KB, 371 views)
File Type: gz mxSudoku_v0.2.tar.gz (59.9 KB, 372 views)
Mackx is offline   Reply With Quote
Old 03-16-2009, 04:44 PM   #7
allovertheglobe
Grumpy Old Man
allovertheglobe can even cheer up an android equipped with a defective Genuine Personality Prototype.allovertheglobe can even cheer up an android equipped with a defective Genuine Personality Prototype.allovertheglobe can even cheer up an android equipped with a defective Genuine Personality Prototype.allovertheglobe can even cheer up an android equipped with a defective Genuine Personality Prototype.allovertheglobe can even cheer up an android equipped with a defective Genuine Personality Prototype.allovertheglobe can even cheer up an android equipped with a defective Genuine Personality Prototype.allovertheglobe can even cheer up an android equipped with a defective Genuine Personality Prototype.allovertheglobe can even cheer up an android equipped with a defective Genuine Personality Prototype.allovertheglobe can even cheer up an android equipped with a defective Genuine Personality Prototype.allovertheglobe can even cheer up an android equipped with a defective Genuine Personality Prototype.allovertheglobe can even cheer up an android equipped with a defective Genuine Personality Prototype.
 
allovertheglobe's Avatar
 
Posts: 267
Karma: 30194
Join Date: Jul 2006
Location: L.A., Euro ex-pat
Device: Kobo, Nook Classic,Color,ST/Glow, iRex DR1000, Sony 505, REB1100&1200
- For some reason, it seems to be stuck on the "Please Wait" window until I go into the menu and select "New Game".

- Again, the icon shortcuts work, but are still invisible.

- The handwriting works OK, I have a really hard time with 3 and 8 though for some reason.

- It didn't work at first because typically I don't have the pencil enabled by default ( to avoid accidentally scribbling over all my docs) I have to launch a document to get to the writing menu, to switch to the pen, before launching mxSudoku.

It would be good to add the standard writing menu to mxSudoku, or at least an icon to switch to pen mode, or switch automatically when launching it, which ever is easiest to implement.
allovertheglobe is offline   Reply With Quote
Old 03-16-2009, 05:09 PM   #8
Mackx
Guru
Mackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to behold
 
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
Quote:
Originally Posted by allovertheglobe View Post
- For some reason, it seems to be stuck on the "Please Wait" window until I go into the menu and select "New Game".
Mmm yes I also noticed that, I will have a look at that. (I am focussing at getting the recognition more robust.)

Quote:
Originally Posted by allovertheglobe View Post
- Again, the icon shortcuts work, but are still invisible.
I think that is a problem in the firmware, lets hope they fixed that in 1.6...

Quote:
Originally Posted by allovertheglobe View Post
- The handwriting works OK, I have a really hard time with 3 and 8 though for some reason.
Yes, I also have some problems and am improving it. (I sometimes think I just created a random generator ...) It seems to work better on the emulator then on the real thing. I can post my current version which seems more robust. I use longer sequences to match against, in the new version, which seems to improve the recognition.

Quote:
Originally Posted by allovertheglobe View Post
- It didn't work at first because typically I don't have the pencil enabled by default ( to avoid accidentally scribbling over all my docs) I have to launch a document to get to the writing menu, to switch to the pen, before launching mxSudoku.
I do not understand this completely, the code is just handling the 'motion' events of the windowing-system. So it should work without writting being enabled. Was one of the numbers in the 'keypad' enabled? That would also prevent writing.

Could you try again without enabling writing in another document?

Below my latest version (binary only) writing should be improved compared to previous version.
Attached Files
File Type: zip mxSudoku_v0.3.zip (93.3 KB, 369 views)
Mackx is offline   Reply With Quote
Old 03-17-2009, 02:09 AM   #9
Matthijs
Groupie
Matthijs will become famous soon enoughMatthijs will become famous soon enoughMatthijs will become famous soon enoughMatthijs will become famous soon enoughMatthijs will become famous soon enoughMatthijs will become famous soon enough
 
Matthijs's Avatar
 
Posts: 199
Karma: 666
Join Date: Oct 2006
Location: Eindhoven, the Netherlands
Device: iLiad, DR1000S, DR800SG
Quote:
Originally Posted by Mackx View Post
(Use the 1.03 poky images since the 1.5 do not allow you to use the mouse as a 'stylus')
Did you try this lately? I think I've replaced the Qemu images with correctly working ones...
Matthijs is offline   Reply With Quote
Old 03-17-2009, 02:17 AM   #10
Grimulkan
Lord
Grimulkan has a complete set of Star Wars action figures.Grimulkan has a complete set of Star Wars action figures.Grimulkan has a complete set of Star Wars action figures.Grimulkan has a complete set of Star Wars action figures.
 
Grimulkan's Avatar
 
Posts: 177
Karma: 328
Join Date: Feb 2009
Device: Q1 (on way out), PRS505, DR1000S (dead :<), TC1100 (10'' perfection!)
Quote:
Originally Posted by Mackx View Post
(Use the 1.03 poky images since the 1.5 do not allow you to use the mouse as a 'stylus')
I can confirm that the 1.5 emulator does let you use the mouse as the stylus. I've seen that "scribbles" sometimes do not trigger a screen refresh and need a CTRL+ALT+1 to make them visible, but apart from that I have not had any trouble.
Grimulkan is offline   Reply With Quote
Old 03-17-2009, 03:09 AM   #11
Mackx
Guru
Mackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to behold
 
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
Quote:
Originally Posted by Matthijs View Post
Did you try this lately? I think I've replaced the Qemu images with correctly working ones...
No, I was still using the old ones, Thanks.
Mackx is offline   Reply With Quote
Old 03-22-2009, 11:42 AM   #12
Mackx
Guru
Mackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to behold
 
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
OK, I got a version that should be usable for others (to play sudoku or to reuse the code). It should recognise the numbers 1-9.

The numbers might not all be logical. (4 only has strokes left-down and straight right, 5 only down and then the half circle.)
(I tried to make a picture of the strokes, but 'merge' refused to work, maybe later)

Have fun,
Marcel.
Attached Files
File Type: zip mxSudoku_v0.71.zip (121.6 KB, 443 views)
File Type: gz mxSudoku_v0.71.tar.gz (62.0 KB, 385 views)

Last edited by Mackx; 03-22-2009 at 02:07 PM. Reason: oeps I made a mistake
Mackx is offline   Reply With Quote
Old 03-28-2009, 11:36 AM   #13
Viacheslav
Connoisseur
Viacheslav doesn't litterViacheslav doesn't litter
 
Posts: 59
Karma: 136
Join Date: Dec 2008
Device: iRex DR1000
Here is a Russian translation for this Sudoku app.
But, where should I put the .mo file?
Attached Files
File Type: zip mxSudoku-ru.zip (1.3 KB, 394 views)
Viacheslav is offline   Reply With Quote
Old 03-30-2009, 02:56 AM   #14
Mackx
Guru
Mackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to behold
 
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
Thanks for the translation. I am still learning how to properly use i8n (other languages). Since you put effort in this translation, I will put it higher in my priority list.
Anyone having some tips (how to tell the application where to find the mo files?) I am using the makefiles from HelloWorld as basis so now it will probably look somewere in /usr/bin/data or something simular. For the moment however I would like the whole application with its data on the SD-card.
Mackx is offline   Reply With Quote
Old 03-30-2009, 05:03 AM   #15
Viacheslav
Connoisseur
Viacheslav doesn't litterViacheslav doesn't litter
 
Posts: 59
Karma: 136
Join Date: Dec 2008
Device: iRex DR1000
Quote:
Originally Posted by Mackx View Post
Anyone having some tips (how to tell the application where to find the mo files?) I am using the makefiles from HelloWorld as basis so now it will probably look somewere in /usr/bin/data or something simular. For the moment however I would like the whole application with its data on the SD-card.
The standard place is
/usr/share/locale/xx_XX/LC_MESSAGES/yyy.mo
where xx_XX is the locale name consisting of the language and country codes and yyy is the name of the executable. Unfortunately, mxSudoku is built with non-standard root and fails to load it from there. I tried to guess the relocated path on SD but failed. Why not just build it without relocation?

BTW: The help message is not available for translation. ... And it would be great to make a port of evince to view DJVU and PS files.
Viacheslav is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Where to get Sudoku for PB 301+ ?? ppawel PocketBook 6 02-03-2011 11:01 PM
DR800 Sudoku (reminder) dima_tr iRex 0 07-05-2010 03:15 AM
PRS-600 sudoku any good? munakuppi Sony Reader 4 12-15-2009 10:34 AM
Sudoku jpchan Sony Reader 10 03-21-2008 12:35 AM
Multiplayer Sudoku: Sudoku Combat! PostGrant Lounge 1 06-20-2006 06:14 AM


All times are GMT -4. The time now is 12:23 AM.


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