|
#1
|
|||
|
|||
|
Solitaire
Complete implementation of this classic card game. The game will tell you if / when it becomes impossible to win. Version 1.2 Fixed a bug in the save/load statistics that meant the bestTime was not saved properly Added save/load game capability Tweaked the graphics for the Diamonds Notes: When playing, press the Home Button to go to new menu that enables you to either Return (to the game), Save + Quit, start a New Game or Quit the application. If you have a game in progress, pressing 'New Game' or 'Quit' will count as a lose. The save Game is automatically deleted after you load it. Version 1.1 Improved graphics featuring some insect images for the J,Q,K cards taken from iconshock.com Statistics are recorded to file (wins, loses, and best time) Launching the application takes you to the menu Version 1.0 No known issues. Using some kind of stylus makes it easier to move the cards around - but a finger will work if you are precise! DanTheLegoMan Last edited by DanTheLegoMan; 02-26-2010 at 10:33 AM. Reason: New version |
|
|
|||
|
|
|
#2
|
||||
|
||||
|
I have never been good at this game, now I might get some practice =P
Wonder which is best, yours or the one made in the China competition ![]() The icon is a bit boring, initial reaction, games look nice though ^^ Being rotated like this it might even be playable with mostly one hand, nice call. In the future a game stats feature would be fun. Also, maybe do something about the cards, I know it's hard to fit in all markings on them, but even the clothed cards look like 2s. EDIT: Got to the no moves left screen. Might be good with an indication of the number of moves remaining, if having a limited amount. Also, why not have the start screen when you start the app also? Also I'm not sure if it really does tell you when it is impossible to win, I've been staring at this thing for quite a while and can't find a possible move. But don't take my word for it, as I said, I'm not the best at this game.
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it! Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it. Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^ Last edited by Habhome; 02-22-2010 at 12:11 PM. |
|
#3
|
||||
|
||||
|
I love that game! Thanks a lot: D
|
|
#4
|
|||
|
|||
|
same as habhome i think i got to the point of no more possible moves but didn't get the notification in the game, but im not the best either.
The game works really nice though, maybe some sounds could be added in? thanks for taking the time to program =)) |
|
#5
|
|||
|
|||
|
great
|
|
#6
|
||||
|
||||
|
This is fantastic
But we'll have to wait and see whether this compares to Creatives effort...
|
|
#7
|
||||
|
||||
|
Quote:
Quote:
Perhaps should phrase it differently?
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it! Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it. Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^ Last edited by Habhome; 02-22-2010 at 01:46 PM. |
|
#8
|
|||
|
|||
|
Thanks for all the comments.
I agree that the cards and the icon could have nicer graphics. I'll see if I can tweak them a bit - but I'm hopeless at graphics so don't expect too much! Regarding the issue about not seeing an available move ... there could be a bug in my logic ... but in my testing I did always find a move eventually when there was one. Normally the turn would involve moving a part pile of cards from one stack to another in order to free a card that can move to one of the home piles. It doesn't always help - but just occasionally it does. A stats feature would be a good addition - I need to look at how to save a file on the Zen to do that. |
|
#9
|
||||
|
||||
|
Quote:
As for saving, check out Notee-fi, Simon, Pong, and a few others which have saving functionality for either stat or even text. And I noticed you count the time it takes, could be implemented into the kitchen timer app RA have suggested. As for graphics, I might be able to help. In my blackjack game I've made (for PC) I have some card images, but I don't know how they'll look resized, but I could give it a shot if you'd like? Lastly, nice of you to make it "play in" all cards once you have them out on the table, so you won't have to tediously just drag every card into its correct place. And one more thing, this is definitely my fav app out there atm. It's nice and "simple", but very entertaining. And it works awesome with only my right hand, no stylus needed really. It's very user friendly!
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it! Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it. Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^ |
|
#10
|
|||||
|
|||||
|
Quote:
Quote:
Quote:
startTime = os.time() --some time later endTime = os.time() timeTaken = endTime - startTime It's not guaranteed to work according to the Lua specification as the values returned by os.time() may not be a integer, but it works on the Zen. Quote:
If you have time and the inclination to provide new graphics that would be awesome. Quote:
|
|
#11
|
|||
|
|||
|
I've tried to improve some of the graphics. I started with the Spades - and the results are in the attached zip file. The number cards now display the appropriate number of suit symbols, and the J,Q,K cards have some insect pictures on them (taken from iconshock.com).
What do you think? |
|
#12
|
|||
|
|||
|
wow, this app is absolutely awesome
|
|
#13
|
|||
|
|||
|
Hey Dan, I would like to ask u some code explanation
1)my player hangs when i set os.sleep(1) instead of os.sleep(10) and above. do u know y this happens ? 2)how do u prevent the images from forming a trail of images when it is drag across the screen? thank you |
|
#14
|
|||
|
|||
|
Quote:
Also, do you have the latest firmware installed (I think it is 1.11.01)? I saw in a different thread that re-installing the firmware can help with issues like this. Quote:
FYI, I found that input messages are generated faster than a screen update period. This means if you simply do ... while (game loop) --process button presses, touch etc ... --draw screen including a call to screen.update() end If you are dragging an image using touch move messages the result is that you can slide your finger across the screen and then wait for a second before the image catches up with your finger. Instead I put my input message processing in a loop of 6 iterations, e.g. while (game loop) do for i = 1, 6 do --check for input and buttons and do something with them end --draw the screen end That means that the dragged image stays where your finger is dragging it. |
|
#15
|
||||
|
||||
|
Nice with the new spades. I think that design is usable. though some other image for JQK would be appreciated by me, these just look odd.
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it! Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it. Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^ |
|
#16
|
|||
|
|||
|
thanks Dan, my player is always up to date
![]() here is part of my affected code: Quote:
as for the os.sleep(), i see that some applications does not even need that command. if i omit that, my player hangs too if i include the masking and remove the os.sleep(), the creative sdk runs my program very smoothly, otherwise in the player will crash Last edited by JJLoke; 02-23-2010 at 08:20 AM. |
|
#17
|
|||
|
|||
|
Thank you very mach !
Good game P.S. i'm not programmaker. But i can help do design (ikon, vizualisation). Sorry, i'm speak in english bad.
|
|
#18
|
|||
|
|||
|
So, would you be able to create some new images for the J,Q,K cards, if I work on updating the rest of the cards using the new style?
|
|
#19
|
|||
|
|||
|
Thanks Dan, i solved the problem. found my errors and rectified them. now image scrollig is smooth
|
|
#20
|
|||
|
|||
|
Quote:
You seem to be calling screen.update() twice for each touch.move message. I would remove the screen.update() call from convsel(). I would also move the other screen.update() call so it will be called every iteration of the while loop - i.e so it is not dependant on getting any input message. Then add a for loop around the input checks to make sure you read all waiting message before you draw the screen. Here is a complete application that allows you to touch on and move a playing card around the screen using those ideas ... Code:
--replace 1s.png with your own image
dragImage=image.load("1s.png")
black = color.new(0,0,0)
cardX = 184;
cardY = 95;
dragX = 0;
dragY = 0;
dragXOffset = 0;
dragYOffset = 0;
dragging = 0
sheight = screen.height()
swidth= screen.width()
function drawScreen()
screen.fillrect(0,0,swidth,sheight,black);
if (dragging > 0) then
dragImage:draw(dragX-dragXOffset,dragY-dragYOffset);
else
dragImage:draw(cardX,cardY)
end
screen.update()
end
function checkDrag(x,y)
if (x >= cardX) and (x <= (cardX + 50)) and (y >= cardY) and (y <= (cardY + 32)) then
dragging = 1;
dragXOffset = x - cardX
dragYOffset = y - cardY
end
end
while (1) do
for i = 1, 6 do
if control.read()==1 then
if control.isTouch()==1 then
x,y = touch.pos()
if (touch.move() == 1) then
if (dragging == 0) then
-- not dragging at the moment, check if we are starting a drag operation
checkDrag(dragX,dragY);
else
-- currently dragging, so update dragX and dragY coordinates
dragX = x;
dragY = y;
end
elseif (touch.down() == 1) then
-- record the position where the user starts a potential drag operation
dragX = x;
dragY = y;
elseif (touch.up() == 1) then
if (dragging > 0) then
-- update cardX, cardY values
cardX = dragX-dragXOffset;
cardY = dragY-dragYOffset;
dragging = 0;
end
end
elseif control.isButton()==1 then
if button.click() == 1 then
quit = true
break
end
end
end
end
if (quit == true) then
break;
end
drawScreen();
screen.backlight(100)
os.sleep(1)
end
--clean up
dragImage:close();
|
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
All times are GMT -5. The time now is 08:28 PM.












But we'll have to wait and see whether this compares to Creatives effort...


Linear Mode
