![]() |
#1 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 ... ![]() |
![]() |
![]() |
![]() |
#2 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 371
Karma: 1002274
Join Date: Mar 2008
Location: Australia
Device: Kindle
|
Great work Mackx, I look forward to trying it.
![]() ![]() I keep meaning to learn to program for the DR1000 but I'm not very familiar with linux. Is it difficult? |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
#4 |
ex-IRX developer
![]() ![]() ![]() 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 ![]() |
![]() |
![]() |
![]() |
#5 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
|
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.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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) |
![]() |
![]() |
![]() |
#7 |
Grumpy Old Man
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
#8 | ||||
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
|
Quote:
Quote:
Quote:
Quote:
Could you try again without enabling writing in another document? Below my latest version (binary only) writing should be improved compared to previous version. |
||||
![]() |
![]() |
![]() |
#9 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() Posts: 199
Karma: 666
Join Date: Oct 2006
Location: Eindhoven, the Netherlands
Device: iLiad, DR1000S, DR800SG
|
|
![]() |
![]() |
![]() |
#10 |
Lord
![]() ![]() ![]() ![]() Posts: 177
Karma: 328
Join Date: Feb 2009
Device: Q1 (on way out), PRS505, DR1000S (dead :<), TC1100 (10'' perfection!)
|
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.
|
![]() |
![]() |
![]() |
#11 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
|
|
![]() |
![]() |
![]() |
#12 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. Last edited by Mackx; 03-22-2009 at 02:07 PM. Reason: oeps I made a mistake |
![]() |
![]() |
![]() |
#13 |
Connoisseur
![]() ![]() 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? |
![]() |
![]() |
![]() |
#14 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
#15 | |
Connoisseur
![]() ![]() Posts: 59
Karma: 136
Join Date: Dec 2008
Device: iRex DR1000
|
Quote:
/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. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |