maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Games (https://talk.maemo.org/forumdisplay.php?f=12)
-   -   [Maemo 5] Freecell in devel and testing (https://talk.maemo.org/showthread.php?t=41208)

jkq 2010-01-18 17:23

[Maemo 5] Freecell in devel and testing
 
I haven't seen any freecell games for Fremantle yet, so I've added the N8x0 freecell4maemo (http://code.google.com/p/freecell4maemo/) game to extras-devel, and promoted it to extras-testing just now the extras repository. It is opt-ified.

All changes are listed below.

Enjoy!

-jkq

Changelog:

1.0.0-fremantle6:
* Fixed directory permissions for ~/.freecell4maemo
* WARNING: If a saved game created by a version before 1.0.0-fremantle5 exists, it will be deleted on installation!

1.0.0-fremantle5:
* Added version number to "About" menu item (bug #8680)
* Added (missing) dependency on python-osso package
* Added "Auto Move to Stacks" menu item
* Disallow undo after current game is won
* Tweaked graphics for aces and twos to show suit when underneath other cards (bug #9119)

1.0.0-fremantle4 (in extras):
* Added bugtracker field to debian control file

1.0.0-fremantle3:
* Actually implement the fix listed in the previous changelog entry. Argh.

1.0.0-fremantle2:
* Don't save state if the game is won

1.0.0-fremantle1:
* Fixed bug where you could move any card to the ace pile initially
* New feature: save state on exit and resume on startup

1.0.0-fremantle0:
* Initial release of port

robbie 2010-01-18 19:22

Re: [Maemo 5] Freecell in devel and testing
 
Thanks for optifying it. It works but it's basic. Is there any way to save the state on exit so that you can continue the game later?

jkq 2010-01-18 19:30

Re: [Maemo 5] Freecell in devel and testing
 
Quote:

Originally Posted by robbie (Post 480530)
Thanks for optifying it. It works but it's basic. Is there any way to save the state on exit so that you can continue the game later?

I don't know -- it's not my code. :confused:

So far I've not yet had to figure out how he coded up the game logic. I'll poke around a bit, but no promises.

-jkq

Kajko 2010-01-19 00:36

Re: [Maemo 5] Freecell in devel and testing
 
There's a bug I think...only aces are supposed to be placed in the four home cells in the upper right. Right now I can place any card.

jkq 2010-01-19 00:49

Re: [Maemo 5] Freecell in devel and testing
 
Quote:

Originally Posted by Kajko (Post 481095)
There's a bug I think...only aces are supposed to be placed in the four home cells in the upper right. Right now I can place any card.

Heh, you found it. :D

I actually (ab)used it a few times when my N800 touchscreen acted up, before I realized that it was possible to undo moves.

-jkq

jkq 2010-01-19 03:57

Re: [Maemo 5] Freecell in devel and testing
 
Quote:

Originally Posted by Kajko (Post 481095)
There's a bug I think...only aces are supposed to be placed in the four home cells in the upper right. Right now I can place any card.

Okay, I'm pretty sure I've fixed this bug. I want to see if I can add the save game feature before making another package.

If you want to fix it locally, here's how:

1. Become root
2. Open "/usr/bin/freecell4maemo.py" in your favorite editor
3. On line 1098 change
Code:

if (srcSuit == dstSuit and (dstNumCards <= 0 or srcCardVal == dstCardVal + 1)):
to
Code:

if (srcSuit == dstSuit and (srcCardVal == dstCardVal + 1)):
Basically you're just removing the part that says "dstNumCards <= 0 or".

-jkq

jkq 2010-01-20 06:11

Re: [Maemo 5] Freecell in devel and testing
 
Okay, there is a new version in extras-devel. I'll bump it to -testing in a few days, after I've had a chance to play a few more games myself.

Quote:

Originally Posted by robbie (Post 480530)
Is there any way to save the state on exit so that you can continue the game later?

I've added the save/restore state ability, but due to the way it is currently coded it actually moves the cards one-by-one (so you get a fast-forward reminder of what you were doing in the last session! :p), but it unfortunately doesn't refresh the screen very well while it is doing that (parts are black until "drawn over" by moving cards). You'll see what I mean if/when you try it.

Quote:

Originally Posted by Kajko (Post 481095)
There's a bug I think...only aces are supposed to be placed in the four home cells in the upper right. Right now I can place any card.

I also fixed this bug.

-jkq

robbie 2010-01-20 06:48

Re: [Maemo 5] Freecell in devel and testing
 
Quote:

Originally Posted by jkq (Post 483619)
I've added the save/restore state ability

Great! Thanks.

fpp 2010-01-20 12:08

Re: [Maemo 5] Freecell in devel and testing
 
Thanks for "porting" this to Fremantle, and also for making it known... I had managed not to notice it had been available all that time for Maemo4 :-)

Since it's in Python, I will also look into it and see if it can be made a little better (remove the ponderous card animation, move cards automatically, error messages etc.).

ndi 2010-01-20 18:24

Re: [Maemo 5] Freecell in devel and testing
 
Great stuff, I've loved the game since forever.

I know other stuff probably has higher priority, but could I please have autoplay or at least double-click on a card to send it to free cell or to its place on top?

Once the puzzle has been solved I spend a minute putting all the cards up.

Otherwise a great implementation. Maybe an animation speed tweak? (couldn't resist)

jkq 2010-01-20 19:36

Re: [Maemo 5] Freecell in devel and testing
 
Quote:

Originally Posted by ndi (Post 484770)
Great stuff, I've loved the game since forever.

I know other stuff probably has higher priority, but could I please have autoplay or at least double-click on a card to send it to free cell or to its place on top?

Once the puzzle has been solved I spend a minute putting all the cards up.

Otherwise a great implementation. Maybe an animation speed tweak? (couldn't resist)

Heh, you (like I, originally) didn't read the "About" page (it's in the menu)! Because of that, I didn't even realize that you could undo moves until I started looking in the code. :D

Pop open the keyboard and hit either the enter or space keys and that'll auto-play everything it can.

There are a few other keys that enable stuff hidden in the code (hint: try the arrow keys) -- the original author didn't document them in the about page, and I didn't add them either. :p

-jkq

Kajko 2010-01-21 13:45

Re: [Maemo 5] Freecell in devel and testing
 
Quote:

Originally Posted by jkq (Post 483619)
Okay, there is a new version in extras-devel. I'll bump it to -testing in a few days, after I've had a chance to play a few more games myself.



I've added the save/restore state ability, but due to the way it is currently coded it actually moves the cards one-by-one (so you get a fast-forward reminder of what you were doing in the last session! :p), but it unfortunately doesn't refresh the screen very well while it is doing that (parts are black until "drawn over" by moving cards). You'll see what I mean if/when you try it.



I also fixed this bug.

-jkq

Thanks for the work... and for fixing the bug. I am a bit of a solitaire nut (wish there were more of a variety of solitaire on N900) and I'm enjoying this game a lot. I downloaded the latest version last night.

ndi 2010-01-21 15:26

Re: [Maemo 5] Freecell in devel and testing
 
Quote:

Originally Posted by jkq (Post 484902)
Heh, you (like I, originally) didn't read the "About" page (it's in the menu)! Because of that, I didn't even realize that you could undo moves until I started looking in the code. :D

It has a menu for that?

Quote:

Originally Posted by jkq (Post 484902)
Pop open the keyboard and hit either the enter or space keys and that'll auto-play everything it can.

It doesn't have a menu for that!

Thaaaank yooou!

jkq 2010-01-21 16:07

Re: [Maemo 5] Freecell in devel and testing
 
Quote:

Originally Posted by ndi (Post 486787)
It has a menu for that? (jkq: undo)

Yep, as well as a keyboard binding. I'll let you find the binding (hint; look in the About screen :)).

Quote:

Originally Posted by ndi (Post 486787)
It doesn't have a menu for that! (jkq: auto-play)

Unfortunately, when I tried to put an auto-play button in the menu, it didn't turn out well. It would look like it had locked up with the menu open until it finished auto-playing.

Quote:

Originally Posted by ndi (Post 486787)
Thaaaank yooou!

You're welcome!

-jkq

azz 2010-01-22 01:24

Re: [Maemo 5] Freecell in devel and testing
 
MUCH thanks, guys....I really enjoy solitaire and especially freecell....it's usually the first game I install into any phone I have (hence I only own smartphone). My jaw dropped when I realize there isn't one for maemo5...I have settled for Aisleriot (n800) for a while but will give this one a try...Much thanks....:D Keep it up....

jkq 2010-01-23 23:47

Re: [Maemo 5] Freecell in devel and testing
 
Okay, I bumped it to testing. Vote here.

robbie 2010-01-24 11:56

Re: [Maemo 5] Freecell in devel and testing
 
Quote:

Originally Posted by jkq (Post 491204)
Okay, I bumped it to testing. Vote here.

Voted. Nice to have this on my N900.

jkq 2010-01-29 05:31

Re: [Maemo 5] Freecell in devel and testing
 
Quote:

Originally Posted by jkq (Post 491204)
Okay, I bumped it to testing. Vote here.

I've uploaded a new version to testing which means i consider it ready for end users. Now, it's up to testers to verify that. If you are willing to be a tester, please read about the Extras-Testing repo and make sure the package meets the criteria in the QA Checklist. You can find the testing report page for it here! :) The only addition to this version is the bugtracker field to allow it to pass through the QA process and into extras.

-jkq

Kajko 2010-01-29 17:25

Re: [Maemo 5] Freecell in devel and testing
 
Thanks. I've downloaded the newest version this morning.

Strutten 2010-01-29 17:44

Re: [Maemo 5] Freecell in devel and testing
 
I love it! Bot I have two buts (or rather ifs).

Is it possible to make the program calculate with the free spaces aswell as the free slots (it's often possible to move more than five cards, but now you have to do it manually in two or more steps).

I would LOVE to see a highscore-function. Maybe on time, but definately a track record for won - lost games. I like to get a graphic view of my obsession from time to time...

jkq 2010-01-29 18:00

Re: [Maemo 5] Freecell in devel and testing
 
Quote:

Originally Posted by Strutten (Post 501308)
Is it possible to make the program calculate with the free spaces aswell as the free slots (it's often possible to move more than five cards, but now you have to do it manually in two or more steps).

Please add this as an enhancement in its bug tracker. I make no promises about being able to implement it, though. :)

Quote:

Originally Posted by Strutten (Post 501308)
I would LOVE to see a highscore-function. Maybe on time, but definately a track record for won - lost games. I like to get a graphic view of my obsession from time to time...

What do you consider a lost game?

-jkq

Strutten 2010-01-30 00:30

Re: [Maemo 5] Freecell in devel and testing
 
Quote:

Originally Posted by jkq (Post 501325)

What do you consider a lost game?

-jkq

One that you don't manage to finish, why you simply start a new one. Or - if this version will close in to the windows one that used to come along with windows, and it's not possible to undo - when it's locked, and you can't finish.

Edit: Bug added!

jkq 2010-02-17 05:02

Re: [Maemo 5] Freecell in devel and testing
 
Quote:

Originally Posted by Strutten (Post 501866)
Edit: Bug added!

Sorry, I just started poking at the code again. I wanted to get a version into extras before working on a new version. :)

I don't see your bug in the list, can you provide the bug number?

-jkq

jkq 2010-02-17 05:04

Re: [Maemo 5] Freecell in devel and testing
 
Freecell4maemo has received enough votes to make it into the extras repository! :):):)

-jkq

PS. Could a mod change the thread title to say "in extras" instead of "in devel and testing"? Thanks!

jkq 2010-02-20 23:46

Re: [Maemo 5] Freecell in devel and testing
 
1.0.0-fremantle5 1.0.0-fremantle6 is now in -devel (the usual warnings apply). The changelog is in the first post.

If you installed 1.0.0-fremantle5, type the following (very carefully!) in a terminal (make sure you have the rootsh package installed):

Code:

rootsh chown user:users /home/user/.freecell4maemo
-jkq

jkq 2010-02-26 04:28

Re: [Maemo 5] Freecell in devel and testing
 
Quote:

Originally Posted by jkq (Post 539075)
1.0.0-fremantle6 is now in -devel (the usual warnings apply).

1.0.0-fremantle6 is now in -testing (the usual -but less severe- warnings apply). The changelog is in the first post.

-jkq

Texrat 2010-02-26 04:50

Re: [Maemo 5] Freecell in devel and testing
 
jkq use Report Post to send your request to the mods (I don't moderate this forum and not every post gets read by them)

jkq 2010-02-26 17:44

Re: [Maemo 5] Freecell in devel and testing
 
Quote:

Originally Posted by Texrat (Post 546974)
jkq use Report Post to send your request to the mods (I don't moderate this forum and not every post gets read by them)

My first attempt must have gotten lost in the mail. :) I'll do it again.

-jkq

ndi 2010-02-26 18:42

Re: [Maemo 5] Freecell in devel and testing
 
"* Disallow undo after current game is won"

Undo does nothing, but you can still move king back and forth and get high on "You won" message. Works both in high-speed and normal moving (harder in normal move).

jkq 2010-02-26 18:52

Re: [Maemo 5] Freecell in devel and testing
 
Quote:

Originally Posted by ndi (Post 547983)
"* Disallow undo after current game is won"

Undo does nothing, but you can still move king back and forth and get high on "You won" message. Works both in high-speed and normal moving (harder in normal move).

Hmm, I'll have to remember to try that one later. :) Can you file a bug?

-jkq

ndi 2010-02-26 19:21

Re: [Maemo 5] Freecell in devel and testing
 
It is done.

Tiptronic 2010-05-29 16:42

Re: [Maemo 5] Freecell in devel and testing
 
The size it requires in rootfs is a disaster

ndi 2010-05-30 13:58

Re: [Maemo 5] Freecell in devel and testing
 
I see 39.8K in one .py

Care to elaborate on the said disaster?

niqbal 2010-07-27 12:10

Re: [Maemo 5] Freecell in devel and testing
 
love this game, well done. Game engine implementation is spot on. Graphics need to be better.


All times are GMT. The time now is 09:03.

vBulletin® Version 3.8.8