Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Sony Reader > Sony Reader Dev Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 03-24-2011, 09:27 AM   #226
BenChen
EPUB Metadata ******
BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.
 
Posts: 525
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
Hi everyone,

After fixing the status bar of Sudoku, I decided that I could use the same status bar graphic in my games. While this is a very minor update, the end result looks good! So Chess, Draughts, FiveRow and FreeCell have been updated. See post #193 for zip files.

Sincerely,
Ben.
BenChen is offline   Reply With Quote
Old 03-24-2011, 09:33 AM   #227
BenChen
EPUB Metadata ******
BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.
 
Posts: 525
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
Quote:
Originally Posted by Mark Nord View Post
Thanks for notification!
I will check for this, but have you noticed surquizus awesome new icons in the PRS+ thread?
If kartu is accepting them, I will update the Sim with these kBookIcons.png
Hi Mark,

No, I had not seen them. They are brilliant, especially the 3-d ones! Is there a plan to incorporate both sets into PRS+ officially?

Sincerely,
Ben.
BenChen is offline   Reply With Quote
Advert
Old 03-24-2011, 10:12 AM   #228
kartu
PRS+ author
kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.
 
Posts: 1,637
Karma: 2446233
Join Date: Dec 2007
Device: Sony PRS-300, 505, 600, 650, 950
Ben,

if possible, move common stuff to the ../../common (or something) please, so that addons could reuse common background. (most *main images) The copyright text could be put there as a label.

Big part of chessLabels, draughtLabels etc is again mostly the same images with a lot of white space.

Texts in the image background make game hard to localize, on top of consuming more memory. Would be nice if you found time to change that as well.
kartu is offline   Reply With Quote
Old 03-24-2011, 10:28 AM   #229
BenChen
EPUB Metadata ******
BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.
 
Posts: 525
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
Quote:
Originally Posted by kartu View Post
Ben,

if possible, move common stuff to the ../../common (or something) please, so that addons could reuse common background. (most *main images) The copyright text could be put there as a label.

Big part of chessLabels, draughtLabels etc is again mostly the same images with a lot of white space.

Texts in the image background make game hard to localize, on top of consuming more memory. Would be nice if you found time to change that as well.
Hi kartu,

Certainly, I will start with the main images. It might take a lot longer to do the labels images.

Sincerely,
Ben.
BenChen is offline   Reply With Quote
Old 03-24-2011, 10:38 AM   #230
TJ27
Enthusiast
TJ27 doesn't litterTJ27 doesn't litter
 
Posts: 44
Karma: 198
Join Date: Mar 2011
Location: Russia, Saratov
Device: Sony PRS-350
I can not normally run freecell last
version (with the text help) in the prs + 2.10 kartu. In fsk
simulator everything is fine. I do not understand what to edit
in js, or xml files. Runs as a version for the 505 (although
I have 350) and the help page blank.
TJ27 is offline   Reply With Quote
Advert
Old 03-24-2011, 11:13 AM   #231
Mark Nord
2B || !2B
Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.
 
Posts: 854
Karma: 327896
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
Quote:
Originally Posted by BenChen View Post
Hi kartu,

Certainly, I will start with the main images. It might take a lot longer to do the labels images.

Sincerely,
Ben.
If you can wait till this evening, I will post my attempts for calc and mahjong.

Most of the main-images could be resized dramaticaly. Especially if we put the copyright-sign into a lable (not sure if it can be orientated verticaly).
It's also possible to reduce the freecellMain further, if we use sprites for foundations, instead of background-grafic.

Regards
Mark
Mark Nord is offline   Reply With Quote
Old 03-24-2011, 11:31 AM   #232
BenChen
EPUB Metadata ******
BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.
 
Posts: 525
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
Quote:
Originally Posted by Mark Nord View Post
If you can wait till this evening, I will post my attempts for calc and mahjong.

Most of the main-images could be resized dramaticaly. Especially if we put the copyright-sign into a lable (not sure if it can be orientated verticaly).
It's also possible to reduce the freecellMain further, if we use sprites for foundations, instead of background-grafic.

Regards
Mark
Hi Mark,

I will wait to see what you have done. (I was a little uncertain where to place the common items and then how to refer to them in the xml files!)

Copyright messages don't have to be vertical. I will simply locate them horizontally elsewhere (perhaps where they appear in Chess and Draughts.)

And yes, we can use sprites for the foundations, meaning that freecellMain can be replaced by a standard main. By the way, I did one already, so I've attached it.

Sincerely,
Ben.
Attached Thumbnails
Click image for larger version

Name:	appMain.png
Views:	225
Size:	4.2 KB
ID:	68904  
BenChen is offline   Reply With Quote
Old 03-24-2011, 11:36 AM   #233
Mark Nord
2B || !2B
Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.
 
Posts: 854
Karma: 327896
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
Quote:
Originally Posted by TJ27 View Post
I can not normally run freecell last
version (with the text help) in the prs + 2.10 kartu. In fsk
simulator everything is fine. I do not understand what to edit
in js, or xml files. Runs as a version for the 505 (although
I have 350) and the help page blank.
This might be a problem with the starter-file FreeCell.js in the addons-folder.
(Note: if the error occurs before
Code:
kbook.autoRunRoot.sandbox.hasNumericButtons = Core.config.compat.hasNumericButtons;
is set, the flag to decide which model is used, will not be set.
Furthermore getFileContent - function isn't handed over, and so the help-text isn't loaded.)

The starter-files like "FreeCell.js" in the addons-folder aren't used by the Sim, and can contain erroneous code.
JS-execution is stopped immediately at the first error, if not trapped by a try/catch statement.

Try to use this simplified starter-code:
Spoiler:
Code:
tmp = function() {
	var FreeCell = {
		name: "FreeCell",
		title: "FreeCell",		
		icon: "GAME",			
		activate: function () {
			kbook.autoRunRoot.sandbox._icon = Core.config.compat.NodeKinds.getIcon("GAME",0);
			kbook.autoRunRoot.sandbox._title = FreeCell.title;
			kbook.autoRunRoot.sandbox.getSoValue = Core.system.getSoValue;
			kbook.autoRunRoot.sandbox.hasNumericButtons = Core.config.compat.hasNumericButtons;
			kbook.autoRunRoot.sandbox.getFileContent = Core.io.getFileContent;
			kbook.autoRunRoot.path = Core.config.addonsPath + "FreeCell/freecell.xml";
			kbook.autoRunRoot.enterIf(kbook.model);
		},
		actions: [{
			name: "FreeCell",
			group: "Games",
			icon: "CARDS",
			action: function () {
				FreeCell.activate();
			}
		}]
	};
	
	Core.addAddon(FreeCell);
};
try {
	tmp();
} catch (e) {
	// Core's log
	log.error("in FreeCell.js", e);
}

HTH
Mark
Mark Nord is offline   Reply With Quote
Old 03-24-2011, 03:10 PM   #234
Mark Nord
2B || !2B
Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.
 
Posts: 854
Karma: 327896
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
First preview of common AppAssets

As advised, here is a first preview of common AppAssets.
Done quick 'n dirty, but it should illustrate the idea for Calc and FreeCell.

I've decided to use "freecellLabels.png" as base for AppLabels.png,
[EDIT] and added the chess and fiverow grafics. [/EDIT]
Common assets are defined in AppAssets.xml.
[EDIT] Chess and FiveRow cutouts need to be defined in AppAssets.xml [/EDIT]
Both files are located in AppAssets-folder under addons.

Common AppAssets are imported this way into the app-main.xml:
Code:
<assets>
 <import href="../AppAssets/AppAssets.xml"/>
 ...
This way my calculater needs no separate recource-file, and for FreeCell only freecellCards.png is needed. Which should be moved to AppAssets/, too. If anyone decides to implement another cardgame.

Feel free to ask for further informations if this is not clear enough.
Regards
Mark

PS: of course should "AppLabels.png" be reworked, with labels packed closer.
Texture-names should be reviewed (gCursor -> pointingHand, a.s.o) and some more, and better named standard-text styles should be defined in "AppAssets.xml"
Attached Files
File Type: rar AppAssets_how_to.rar (88.8 KB, 157 views)

Last edited by Mark Nord; 03-24-2011 at 03:39 PM. Reason: more complete AppLabels.png added
Mark Nord is offline   Reply With Quote
Old 03-25-2011, 03:14 AM   #235
TJ27
Enthusiast
TJ27 doesn't litterTJ27 doesn't litter
 
Posts: 44
Karma: 198
Join Date: Mar 2011
Location: Russia, Saratov
Device: Sony PRS-350
Mark Nord
Thank you? i insert in addons.js (prs+ 2.10a) to section "activate" freecell game
kbook.autoRunRoot.sandbox._icon = a.icon;
kbook.autoRunRoot.sandbox._title = a.title;
kbook.autoRunRoot.sandbox.getFileContent = Core.io.getFileContent;

and freecell work fine.
TJ27 is offline   Reply With Quote
Old 03-25-2011, 04:00 AM   #236
BenChen
EPUB Metadata ******
BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.
 
Posts: 525
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
AppAssets (cont.)

Hi Mark,

Nice work!

Now, I made a start on Chess, and I think I have it working fully. However, when I turned to Five in a Row, I ran into a problem. I cannot get it to work in the Sim at all. There is clearly an error in fiverow.xml (since the screen doesn't even appear) but I cannot find it. Could you take a look? Something might leap out at you that I am just not seeing.

I've attached my updated files for AppAssets, FreeCell (I added the copyright text), Chess and FiveRow.

Everyone else, these are works in progress and are not intended for you! (Not yet...)

Sincerely,
Ben.

Last edited by BenChen; 03-26-2011 at 03:27 AM. Reason: Attachment removed
BenChen is offline   Reply With Quote
Old 03-25-2011, 05:08 AM   #237
Mark Nord
2B || !2B
Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.
 
Posts: 854
Karma: 327896
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
Quote:
Originally Posted by TJ27 View Post
Mark Nord
Thank you? i insert in addons.js (prs+ 2.10a) to section "activate" freecell game
kbook.autoRunRoot.sandbox._icon = a.icon;
kbook.autoRunRoot.sandbox._title = a.title;
kbook.autoRunRoot.sandbox.getFileContent = Core.io.getFileContent;

and freecell work fine.
Glad you worked it out!

So you are doing this manually.
Another way should be, to run the modified scripts through the ant-build-script, to generate a new, custom installer.
(See Wiki at the project-page: BuildingPRSPlus)
Mark Nord is offline   Reply With Quote
Old 03-25-2011, 05:32 AM   #238
Mark Nord
2B || !2B
Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.
 
Posts: 854
Karma: 327896
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
Quote:
Originally Posted by BenChen View Post
Hi Mark,

Nice work!
Thanks a lot!

Quote:
...There is clearly an error in fiverow.xml (since the screen doesn't even appear) but I cannot find it. Could you take a look? Something might leap out at you that I am just not seeing.
Code:
    <group id="AUTORUN_GROUP" left="0" right="0" top="0" bottom="0" visible="false">
        <panel skin="AppMainSkin" left="0" right="0" top="0" bottom="0"/>
Simple typo: AppSkinMain instead of AppMainSkin
Mark Nord is offline   Reply With Quote
Old 03-25-2011, 05:39 AM   #239
BenChen
EPUB Metadata ******
BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.
 
Posts: 525
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
Hi Mark,

Brilliant! I was hoping it would be something obvious that I was just looking right passed! Thanks so much.

Sincerely,
Ben.
BenChen is offline   Reply With Quote
Old 03-25-2011, 08:19 AM   #240
BenChen
EPUB Metadata ******
BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.
 
Posts: 525
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
AppAssets (cont.)

Hi Mark,

One last issue remaining with Draughts. I moved the "Keep jumping, or click piece to end your turn." into a label, but I need to place some temporary graphics underneath. So I tried to make a "popup". I added the appropriate graphic to AppAssets.png and then in AppAssests.xml I made a skin called "popup" (using popup-l, popup-c and popup-r cutouts) and then in draughts.xml I call it as a sprite with id='jumpTextBox'.

But it doesn't work. The sprite appears basically as it appears in AppAssests.png, but doesn't expand to the intended size of the sprite. Can you take a look and see what I am doing wrong?

Again, everyone else, please wait until we have this conversion sorted out!

Sincerely,
Ben.

Last edited by BenChen; 03-26-2011 at 03:33 AM. Reason: Attachment removed
BenChen is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fsk error, code = -13 Brian Charles Sony Reader 4 04-23-2010 04:21 PM
Fsk error code= -43 shrktank Sony Reader 1 12-24-2009 09:32 AM
Just a silly tweak: AUTORUN.INF for Windows Rootman Kindle Developer's Corner 3 12-04-2009 10:17 AM
Request for test in Windows XP kovidgoyal Calibre 5 08-26-2009 01:14 PM
Windows Develpment Environment issue itimpi Calibre 20 01-17-2009 07:15 PM


All times are GMT -4. The time now is 04:26 AM.


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