Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 08-13-2016, 08:50 AM   #31
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
it looks like landscape shown in a portrait view.

I.E: the horz and vert sizes are exchanged (which on a Kindle, they are compared to a CRT screen).
knc1 is offline   Reply With Quote
Old 08-13-2016, 08:50 AM   #32
Sukarn
Enthusiast
Sukarn began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Apr 2015
Device: Kindle PaperWhite 2
Quote:
Originally Posted by sguerrini97 View Post
You were right about the color depth, with the default one the window is not messed up

I launched it from the ssh session.

Still some of the tiles are out of the screen, I tried to change some values that I tought were the sizes but I don't see any changes.
I have no idea what I'm talking about here:
Maybe you need to find a way to rotate the display? Mahjong is generally in landscape anyway, isn't it?

The current status is that it's looking okay and accepting touches, but is too wide for the kindle's display, right?

Sincerely,
A lurker keeping a hopeful eye on this thread.
Sukarn is offline   Reply With Quote
Advert
Old 08-13-2016, 08:51 AM   #33
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
ninji'd
knc1 is offline   Reply With Quote
Old 08-13-2016, 08:52 AM   #34
Sukarn
Enthusiast
Sukarn began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Apr 2015
Device: Kindle PaperWhite 2
Quote:
Originally Posted by knc1 View Post
ninji'd
Haha {^_^}
Sukarn is offline   Reply With Quote
Old 08-13-2016, 10:21 AM   #35
sguerrini97
Enthusiast
sguerrini97 began at the beginning.
 
Posts: 27
Karma: 12
Join Date: Jan 2016
Device: KT2
We can resize the tiles to make them fit the screen. The "gnome2" tileset is fitting well but it may be too small. I will post a working version soon.

Rotating the screen is a good idea, can we do it on the Kindle side?

Edit: here is the working KUAL extension. I made the gnome2_bigger tileset the default. It is the same as the gnome2 tileset, but bigger and with a sign to make blank tiles with black numbers different from the blank tiles with red numbers (it was hard to distinguish them in grayscale).
Attached Thumbnails
Click image for larger version

Name:	screenshot_2016_08_13T16_52_35+0200.png
Views:	179
Size:	41.6 KB
ID:	150912  
Attached Files
File Type: zip xmahjongg.zip (742.2 KB, 132 views)

Last edited by sguerrini97; 08-13-2016 at 10:56 AM.
sguerrini97 is offline   Reply With Quote
Advert
Old 08-13-2016, 04:20 PM   #36
Sukarn
Enthusiast
Sukarn began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Apr 2015
Device: Kindle PaperWhite 2
Quote:
Originally Posted by sguerrini97 View Post
We can resize the tiles to make them fit the screen. The "gnome2" tileset is fitting well but it may be too small. I will post a working version soon.

Rotating the screen is a good idea, can we do it on the Kindle side?

Edit: here is the working KUAL extension. I made the gnome2_bigger tileset the default. It is the same as the gnome2 tileset, but bigger and with a sign to make blank tiles with black numbers different from the blank tiles with red numbers (it was hard to distinguish them in grayscale).
I can confirm that it is working and playable. I got to the end. I like where this thread is going.
But, it was difficult for me to play; almost headache inducing because I had to strain my eyes to play it. The tiles look too small on my PW2, the contrast looks very different in actual play compared to these screenshots, and I had to keep looking closely at the screen to figure out if there was a layer above another. These are NOT problems caused by your work.

So, I wanted to try a more optimal tile size for a PW2. As I couldn't find any obvious quick way to change the tile set through a config, I tried renaming dorothys.gif to gnome2_bigger.gif for a bigger tile set with good depth visibility. That did work, and the tiles were large as expected. Too large for the screen. Hence, the next step was to try resizing dorothys.gif to a smaller size to find the optimal size for my kindle.

That failed miserably. Images resized using GIMP and imagemagick both caused the game to fail to load.

If I can manage to resize dorothys without making the game crash, then I would be set. All game features are working fine. I don't even need to edit dorothys and make it dark on selection like the gnome2 tile sets as personally I prefer the way selected tiles are looking in dorothys compared to the tiles in gnome2 tile sets. Dorothys has good contrast, good depth perception, and is just slightly too big for my screen. One tile is getting partially cut off on each side.

The only thing I could wish for, would be a way to change screen backlight while playing the game, because leaving the game to change backlight and then coming back results in a new game. This might be beyond the scope of this port, though, so it's okay if this remains wishful thinking.
Attached Thumbnails
Click image for larger version

Name:	screenshot_2016_08_14T01_20_21+0531.png
Views:	167
Size:	30.0 KB
ID:	150922   Click image for larger version

Name:	screenshot_2016_08_14T01_21_01+0531.png
Views:	200
Size:	51.6 KB
ID:	150923   Click image for larger version

Name:	screenshot_2016_08_14T01_50_48+0531.png
Views:	182
Size:	63.7 KB
ID:	150924  

Last edited by Sukarn; 08-13-2016 at 04:37 PM.
Sukarn is offline   Reply With Quote
Old 08-13-2016, 04:39 PM   #37
sguerrini97
Enthusiast
sguerrini97 began at the beginning.
 
Posts: 27
Karma: 12
Join Date: Jan 2016
Device: KT2
The only tileset I successfuly resized using GIMP was the gnome2 one, just make sure the width can be divided by 21 and the height by 4 ( w%21=0, h%4=0 ).
We could add different tilesets for every kindle and then choose the one to use from the start.sh script (just add "-t <tileset>" at the end of the command). I can test only on my KT2 which is 600x800.

For the other thing you asked, it would be possible to add a "save" function when Quit is clicked and a "load" funcion when the game is started, but I need to understand the game code better

Last edited by sguerrini97; 08-13-2016 at 04:41 PM.
sguerrini97 is offline   Reply With Quote
Old 08-13-2016, 05:42 PM   #38
Hanspeter
Connoisseur
Hanspeter doesn't litterHanspeter doesn't litter
 
Posts: 77
Karma: 150
Join Date: Jul 2014
Device: Kindel PW1, Voyager
You did some more changes as it had problems to set the window title. But the window title is important for the kindle window manager as it tells him to go to landscape mode.
Could you try to compile the original code and only make the changes to fix the color depth.
Code:
[root@kindle bin]# ./xmahjongg --name L:A_N:application_ID:com.xmahjongg_O:R_PC:N -B /mnt/us/extensions/xmahjongg/data/
xmahjongg: Cannot change window name on Kinde build
Hanspeter is offline   Reply With Quote
Old 08-13-2016, 05:47 PM   #39
Hanspeter
Connoisseur
Hanspeter doesn't litterHanspeter doesn't litter
 
Posts: 77
Karma: 150
Join Date: Jul 2014
Device: Kindel PW1, Voyager
or try to change line 699
Code:
  String window_name = (x_name ? x_name : program_name);
to
Code:
  String window_name ="L:A_N:application_ID:com.xmahjongg_O:R_PC:N";
Then it should go to landscape display and the default tile should work.
Hanspeter is offline   Reply With Quote
Old 08-13-2016, 05:53 PM   #40
doctoralvarez
Connoisseur
doctoralvarez began at the beginning.
 
Posts: 72
Karma: 10
Join Date: Jun 2016
Device: PW3
Lightbulb

Quote:
Originally Posted by sguerrini97 View Post
We can resize the tiles to make them fit the screen. The "gnome2" tileset is fitting well but it may be too small. I will post a working version soon.

Rotating the screen is a good idea, can we do it on the Kindle side?

Edit: here is the working KUAL extension. I made the gnome2_bigger tileset the default. It is the same as the gnome2 tileset, but bigger and with a sign to make blank tiles with black numbers different from the blank tiles with red numbers (it was hard to distinguish them in grayscale).
Excellent work you´ve made!!! :thumbs:
I would like to know if you could help develop a Dominoes (Dominó) game to work on Kindles with 300ppp resolution, like PW3??
Willing to donate and also some little experience on programming, so really excited about working on this project!!
doctoralvarez is offline   Reply With Quote
Old 08-14-2016, 08:13 AM   #41
sguerrini97
Enthusiast
sguerrini97 began at the beginning.
 
Posts: 27
Karma: 12
Join Date: Jan 2016
Device: KT2
I removed the possibility to change the window name because on the Kindle it has to be in that strange format. I didn't knew about the landscape thing, so.. I've added a command line true/false switch "--landscape" and also set the landscape mode as the default one.

Then I found a way to check the screen resolution, the game will now use the "gnome2_bigger" tileset if the resolution is equal to 600x800, otherwise the default "thick" tileset will be used. We should collect data from all the different Kindles to choose the best tileset for each one but I need others to create/test and share tilesets since I only own a KT2.

@doctoralvarez please find some open source domino game for Unix that can be ported and start another thread
Attached Thumbnails
Click image for larger version

Name:	screenshot_2016_08_14T14_15_13+0200.png
Views:	173
Size:	40.6 KB
ID:	150945  
Attached Files
File Type: zip xmahjongg.zip (739.1 KB, 128 views)

Last edited by sguerrini97; 08-14-2016 at 08:17 AM.
sguerrini97 is offline   Reply With Quote
Old 08-14-2016, 09:20 AM   #42
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
KT3 is 167 ppi
PW3, KV, and KOA are 300 ppi

Details:
https://www.mobileread.com/forums/sho...d.php?t=237083 FGA #10

Last edited by knc1; 08-14-2016 at 01:02 PM.
knc1 is offline   Reply With Quote
Old 08-14-2016, 12:14 PM   #43
nasser
Evangelist
nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.
 
nasser's Avatar
 
Posts: 475
Karma: 445678
Join Date: Feb 2010
Device: Too many..
Has anybody noticed that there is an existing mahjong implementation in javascript, playable through the skipstone browser?

https://www.mobileread.com/forums/sho...d.php?t=196403

In addition to mahjong there's also: blockline, freecell, klondike, long, and pile.
These were for the Kindle Touch. I don't know if they would work on later models.
nasser is offline   Reply With Quote
Old 08-14-2016, 01:40 PM   #44
sguerrini97
Enthusiast
sguerrini97 began at the beginning.
 
Posts: 27
Karma: 12
Join Date: Jan 2016
Device: KT2
@knc1 thanks I've read the different resolutions in that thread but users still need to test tilesets on their Kindle to see how it looks. I've added a configuration file so anyone can choose what tileset to use without using the command line. Here is an example: https://github.com/sguerrini97/xmahj...re/kindle.conf

@nasser I prefer native apps but thanks for sharing
Attached Files
File Type: zip xmahjongg.zip (739.9 KB, 117 views)

Last edited by sguerrini97; 08-14-2016 at 01:59 PM.
sguerrini97 is offline   Reply With Quote
Old 08-14-2016, 02:11 PM   #45
nasser
Evangelist
nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.nasser ought to be getting tired of karma fortunes by now.
 
nasser's Avatar
 
Posts: 475
Karma: 445678
Join Date: Feb 2010
Device: Too many..
I've attached screen shots of both this and the older implementation. Taken from my KT3 (600x800 resolution). The tiles seem to look clearer in the older one?
Attached Thumbnails
Click image for larger version

Name:	XMahjong.png
Views:	191
Size:	34.6 KB
ID:	150964   Click image for larger version

Name:	Mahjongg.png
Views:	158
Size:	84.1 KB
ID:	150965  
nasser is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CPU Governor Menu (KUAL extension) knc1 Kindle Developer's Corner 41 09-16-2021 02:54 PM
kual extension to open a book shoelesshunter Kindle Developer's Corner 14 08-16-2016 12:30 PM
Is there a Kual Extension/add-on for cloud eduardomb Kindle Developer's Corner 19 07-08-2016 05:43 PM
is there any KUAL extension development guide? fangzi Kindle Developer's Corner 2 01-02-2014 10:11 AM


All times are GMT -4. The time now is 10:19 AM.


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