View Full Version : Christmas gift: MahJonG game (starting from SD card via autorun)


Clemenseken
12-10-2008, 04:24 AM
:xmas: Hi! :xmas:

Here is one more game for Sony Readers.
Though I developed it for my PRS-500 I first post this version for model PRS-505.
(Version 1.0 for 500s is here... (http://www.mobileread.com/forums/showthread.php?t=33666))

Quite some time ago I posted a previous game (Fiveballs) (http://www.mobileread.com/forums/showthread.php?t=24608).
MahJonG seems to me much better suited to a reading device like ours... Actually I find myself sitting on our couch for hours diddling with it.

If you like it and want to try it, I'd be gratious grateful for your opinion AFTER you tried it!
(It is quite easy to design new layouts but I did not implement that feature into the game. Anyway this should be done "outside" the device...)

There is a zip file that has to be unzipped: afterwards put "Sony Reader" onto the root directory of your SD card.
ATTENTION: applications starting from SD cards drain battery power quite fast! I usually play it with the AC plug connected.

I'll attach a screenshot to this article; this was taken after I "migrated" my PRS game to a "normal" JavaScript browser application. It just gives you an idea how it might look on your PRS (look at it in a 67 percent view !).

Have a nice Christmas time!

Clemens

(Just a forgotten "tool tip": if you move the joystick up/down it will go sideways TWO steps.
PLUS: while developing this app it sometimes SEEMED not to load on the screen; if I then moved the joystick in any direction it appeared immediately - I think this would only happen on MY device, still ...)

I removed the file "..._9.zip" as it only lacked the ability to use PAGE buttons for left/right navigation. Then I did away with version "..._9_1.zip" and "...92.zip" but here is a new one with ONE undo-step and much smoother interface (cursor is set correctly after each delete)

* PLUS * number of tiles and current PAIRS left displayed in the status line!

(Just for records: 1st version "Sony..._09.zip" 75, 2nd "...09_1.zip" 73, 3rd "...92" 140 views/downloads.)

xanlexian
12-10-2008, 06:53 AM
Looks great, loads QUICKLY (very nice!)

I'm going to be wasting a LOT of time with this! Thank you much for your work on this!! WooHoo!

Nate the great
12-10-2008, 08:04 AM
You're back! Yippee!

=X=
12-10-2008, 12:45 PM
Well to quote a previous post http://www.mobileread.com/forums/showpost.php?p=192979&postcount=2

Sweet! Clemenseken = :stanta"
Thanks Majongg is one of my favorite board games. I'll give it a try

=X=

stasys
12-10-2008, 12:57 PM
I can not unzip it.

Clemenseken
12-10-2008, 02:16 PM
:help:

Hi stasys!

Here is the same files again, zipped with a different application - though I never had any difficulties with mine up to now...

stasys
12-10-2008, 03:07 PM
Something is wrong. I'm using WinXP pro, for unzipping I'm using Winrar 3.80 (latest). It seams that problem is in file Icon name - Winrar also shows rectangle just after letter n

Here is the listing of your file from first message :
************************
! C:\Documents and Settings\s\Local Settings\Temp\Sony_PRS505_MahJonG_09.zip: Cannot create C:\Documents and Settings\s\Local Settings\Temp\Sony_PRS505_MahJonG_09.zip
! Access is denied.
! C:\Documents and Settings\s\Local Settings\Temp\Sony_PRS505_MahJonG_09.zip: Cannot create Sony Reader\database\Icon

! The filename, directory name, or volume label syntax is incorrect.
! C:\Documents and Settings\s\Local Settings\Temp\Sony_PRS505_MahJonG_09.zip: Attempting to correct the invalid file name
! C:\Documents and Settings\s\Local Settings\Temp\Sony_PRS505_MahJonG_09.zip: Renaming Sony Reader\database\Icon
to Sony Reader\database\Icon_
! C:\Documents and Settings\s\Local Settings\Temp\Sony_PRS505_MahJonG_09.zip: Cannot create Sony Reader\Icon

! The filename, directory name, or volume label syntax is incorrect.
! C:\Documents and Settings\s\Local Settings\Temp\Sony_PRS505_MahJonG_09.zip: Attempting to correct the invalid file name
! C:\Documents and Settings\s\Local Settings\Temp\Sony_PRS505_MahJonG_09.zip: Renaming Sony Reader\Icon
to Sony Reader\Icon_
! C:\Documents and Settings\s\Local Settings\Temp\Sony_PRS505_MahJonG_09.zip: Cannot create Sony Reader\software\Icon

! The filename, directory name, or volume label syntax is incorrect.
! C:\Documents and Settings\s\Local Settings\Temp\Sony_PRS505_MahJonG_09.zip: Attempting to correct the invalid file name
! C:\Documents and Settings\s\Local Settings\Temp\Sony_PRS505_MahJonG_09.zip: Renaming Sony Reader\software\Icon
to Sony Reader\software\Icon_
! C:\Documents and Settings\s\Local Settings\Temp\Sony_PRS505_MahJonG_09.zip: Cannot create Sony Reader\software\skins\Icon

! The filename, directory name, or volume label syntax is incorrect.
! C:\Documents and Settings\s\Local Settings\Temp\Sony_PRS505_MahJonG_09.zip: Attempting to correct the invalid file name
! C:\Documents and Settings\s\Local Settings\Temp\Sony_PRS505_MahJonG_09.zip: Renaming Sony Reader\software\skins\Icon
to Sony Reader\software\skins\Icon_
*******************

Here is the listing of second file unzip:
**********************
! C:\Documents and Settings\s\Local Settings\Temp\Sony_PRS505_MahJonG_PKzip.zip: Cannot create Sony Reader\database\Icon

! The filename, directory name, or volume label syntax is incorrect.
! C:\Documents and Settings\s\Local Settings\Temp\Sony_PRS505_MahJonG_PKzip.zip: Attempting to correct the invalid file name
! C:\Documents and Settings\s\Local Settings\Temp\Sony_PRS505_MahJonG_PKzip.zip: Renaming Sony Reader\database\Icon
to Sony Reader\database\Icon_
! C:\Documents and Settings\s\Local Settings\Temp\Sony_PRS505_MahJonG_PKzip.zip: Cannot create Sony Reader\Icon

! The filename, directory name, or volume label syntax is incorrect.
! C:\Documents and Settings\s\Local Settings\Temp\Sony_PRS505_MahJonG_PKzip.zip: Attempting to correct the invalid file name
! C:\Documents and Settings\s\Local Settings\Temp\Sony_PRS505_MahJonG_PKzip.zip: Renaming Sony Reader\Icon
to Sony Reader\Icon_
! C:\Documents and Settings\s\Local Settings\Temp\Sony_PRS505_MahJonG_PKzip.zip: Cannot create Sony Reader\software\Icon

! The filename, directory name, or volume label syntax is incorrect.
! C:\Documents and Settings\s\Local Settings\Temp\Sony_PRS505_MahJonG_PKzip.zip: Attempting to correct the invalid file name
! C:\Documents and Settings\s\Local Settings\Temp\Sony_PRS505_MahJonG_PKzip.zip: Renaming Sony Reader\software\Icon
to Sony Reader\software\Icon_
! C:\Documents and Settings\s\Local Settings\Temp\Sony_PRS505_MahJonG_PKzip.zip: Cannot create Sony Reader\software\skins\Icon

! The filename, directory name, or volume label syntax is incorrect.
! C:\Documents and Settings\s\Local Settings\Temp\Sony_PRS505_MahJonG_PKzip.zip: Attempting to correct the invalid file name
! C:\Documents and Settings\s\Local Settings\Temp\Sony_PRS505_MahJonG_PKzip.zip: Renaming Sony Reader\software\skins\Icon
to Sony Reader\software\skins\Icon_
**************
It seams that problem is in file Icon name - Winrar also shows rectangle just after letter n

=X=
12-10-2008, 04:59 PM
Wow Clemenseken, I am truly impressed with your creativity. I'm having quite some fun with my first game.

I guess the only comment was I wished you used the page Left/Right instead of navigation key it. Playing would be a lot smother to be able to used two hands to navigate instead of just one hand.

=X=

Clemenseken
12-11-2008, 02:51 AM
Wow Clemenseken, I am truly impressed with your creativity.(Well, I admit that I'm (was) a graphic artist by profession...)


I guess the only comment was I wished you used the page Left/Right instead of navigation key it. [...]...which is what I just did (no, I added this feature) and will post/exchange as zip file in a minute (just had to change two source lines: very easy. Pity I don't have a model 505 ...)

Clemenseken
12-11-2008, 03:38 AM
Something is wrong. I'm using WinXP pro, for unzipping I'm using Winrar 3.80 (latest). It seams that problem is in file Icon name - Winrar also shows rectangle just after letter n [...]

@ stasys:

Hmmmm.

I just made a new zip file with all Apple icon files (normally no problem with PCs) removed.
Did you really move the folder "Sony Reader" onto your SD card root (in your Windows Explorer - not in any SONY application!) ?
(Nobody else reported any problems so far. Hmm. Sorry for your problems.
If this doesn't work for you I'll have to think about a way to get my files to you unzipped...)

=X=
12-11-2008, 11:20 AM
(Well, I admit that I'm (was) a graphic artist by profession...)

It shows, good job.


I added this feature)

Much better thanks!

Okay now on installation. A couple issues.

1) There are several files called "Icon" that have no apparent value and are included in the zip. It also has a special char wich might cause problems on removal.
2) You reuse the name "skins" and "label.png" I would strongly recommend, (wish, plead,beg) you use unique names for your programs so they don't conflict. (I'm still using your dictionary).
3) I'd rather you not include the directory structure prior to "Sony Reader" I've seen path differences between Vista and XP where unzipping from the root will cause problems. (Vista tends to add an extra directory)
4) You create a database directory, which has no files. (Not an issue if you go with option 3)

JSWolf
12-11-2008, 11:43 AM
Something is wrong. I'm using WinXP pro, for unzipping I'm using Winrar 3.80 (latest). It seams that problem is in file Icon name - Winrar also shows rectangle just after letter n
What you need to do is sort out your system so WinRAR is not the default for for handling ZIP files. Windows Explorer will handle the ZIP file with no issue at all. So once you get WinRAR to stop being the default application for ZIP files, then you can just double click the ZIP and get it to be readable with no problem.

Clemenseken
12-11-2008, 01:43 PM
A couple issues.
1) There are several files called "Icon" that have no apparent value [...]They are remains of my MacOS 9 - I'll skip them next version (tomorrow, I think)2) You reuse the name "skins" and "label.png" I would strongly recommend, [...] you use unique names for your programs [...]I assumed they were a standard on PRSs... but I'll invent s.th. crazy for you ;)3) I'd rather you not include the directory structure prior to "Sony Reader" [...]Well, how do I do this? I only dragged the folder "Sony Reader" onto the ZIP window...?4) You create a database directory, which has no files. (Not an issue if you go with option 3)You mean I DO create it? ...or I should NOT create it?

(Sorry for my questions - I'm a "native" English reader but a native German speaker ...)

=X=
12-11-2008, 02:28 PM
I assumed they were a standard on PRSs... but I'll invent s.th. crazy for you ;)

From looking at the source the only thing that looks like a standard is the filenames "autorun.xml" and "autorun.js" from there you can call any file you wish. You just have to update the resources in the autorun.xml file.


Well, how do I do this? I only dragged the folder "Sony Reader" onto the ZIP window...?You mean I DO create it? ...or I should NOT create it?

I don't know, in windows just zipping the files at the current directory omits parent directories but includes all sub directories and files.

You are including it in the zip file and I am saying you should NOT including it. It might be tied to the ICON files maybe when you resolve that issue the creation of the "database" directory will go away as well.


(Sorry for my questions - I'm a "native" English reader but a native German speaker ...)
Well your English is very good.

=X=

Clemenseken
12-28-2008, 03:40 PM
Hi 2 all!

this is just so folks here will get a notification if they watch this thread:

[..] but here is a new one with ONE undo-step and much smoother interface (cursor is set correctly after each delete).
* PLUS * number of tiles and current PAIRS left displayed in the status line!

Actually I wanted to post this version on december, 22nd, but it is really hard to find the cause for a bug on PRS models. (One line of text set a few pixels too high caused a screen refresh every time I deleted pairs of tiles... how could you think of that???)

Well, at last here is a smoother running, more comfortable version 0.94.
Have fun with it!!!

(P.s.: As the app has to check for pairs now it MAY happen now and then that you'll get a delay of maybe 1-3 secs. But mostly only if you just deleted two tiles from very high stacks...)

stasys
01-30-2009, 04:05 PM
I did a stupid thing - put SD card with Mahjong into prs700. And it launched. Of course there is no way to put cursor down - page turn controls shifts it left-right only. Question: would it be possible to make Mahjong touch-sensitive?

Clemenseken
01-31-2009, 07:33 AM
I did a stupid thing - put SD card with Mahjong into prs700. And it launched.Your idea wasn't stupid at all!!!
... would it be possible to make Mahjong touch-sensitive?
I'd really love to "better" MahJonG so it would run on PRS700s - actually I assume development for them would even be easier as we might use "normal" (Browser) JavaScript.
But - alas! - I do not own one and cannot do any tests on the device...

I'll look into the 700-developper's Corner, though, and see if anybody posted s.th. helpfull.

Although I do have the time to adapt MahJonG (and also Sudoku, 5balls etc.) to the newer 700, I do not have the money to buy one (and my old 500 works well so far).
Sorry, better times may come for me ...

Mark Cameron
02-10-2009, 05:14 AM
Great idea and implementation - works fine for me - thanks for adding a new dimension to my SONY!

Clemenseken
02-12-2009, 02:23 AM
Great idea and implementation - works fine for me - thanks for adding a new dimension to my SONY!

:) Thank you, Mark - Glad you like it! :)
(Clemens)

Clemenseken
05-06-2011, 03:09 PM
Just a short notice:
I ported my MahJonG game to my new ereading device, an android pad reader from Pockbook, the model IQ-701.
(I am just writing this post on its soft keyboard.)

Whoever's interested may download this colourful version in thread "Pocketbook IQ?".

It will only run on a 800*600 screen or better but there's a screenshot for an impression...
Obviously Android is required - an iPhone is not good enough ;-)