Sunday, February 26, 2012

Gettin' Stuff Done

Nope, Solitaire Till Dawn is not done yet. But I have made a lot of progress in the last few weeks. Here's a rundown:

Buttons are now fully implemented and working. These are the buttons that actually appear in the play area. They implement some special functionality that can't be triggered by the usual click-and-drag stuff. Most games don't have or need buttons, but Accordion has a "Deal All" button, Pyramid has a "Discard Pair" button, and Puss in Corner has a "Redeal" button.

Partial decks are implemented, needed by games like The Wish that don't (ahem) play with a full deck.

Tight fans, for games like Thirteens and The Wish. Also "anchored" fans: never mind why I call them that, but these make Fortress and its variations playable.

The deck now shows correct numbers: usually the number of cards remaining in the deck, but for some games it shows the number of deals remaining.

The displays and messages in the status bar are more complete and correct.

Keyboard focus is better-behaved, so you don't have to click in the Games Drawer or in the play area in order to use keyboard shortcuts.

The behavior of the available-card-highlighting feature is much improved (still need some work on the graphics, though). The find-card feature (press '5' to highlight all the visible fives, or '5s' to highlight all the visible fives of Spades) is also working now.

And lots of little things I won't bother to list individually: stuff I've implemented and/or fixed in the solitaire engine itself.

I've completed an initial test of all 100 games now. 87 of them seem to be working, while the other 13 still have some issues to be worked out.

What am I doing now?
This week I'm working on supporting different card sizes. Up till now, I've only been using the "normal" size. The game needs to allow selecting card size from a menu, and changing card size to match the window when you change the window's size. This is perhaps half done.


What's Left?
Lots of stuff, I'm afraid. A partial list:

  • Several important toolbar buttons, including the Autoplay features and Magnetic Mouse.
  • The built-in Help and the game rules display.
  • A number of the preference settings and their implementations.
  • Sound effects.
  • A number of graphics effects.
  • Score and statistics keeping, and display.
  • New artwork.
  • Separate scores and preferences for different players on the same machine.

And there's more; those are just some of the highlights.

I will not be implementing every single feature for the first release. Some of the old version's features will have to wait. I'll get all the really important ones in, and then add the rest over time, in free upgrades.

There you go: that's the status. I'm working hard; I want this out the door as badly as some of you want it in your hands. We'll get there!

Sunday, February 5, 2012

Alive and Well

I got an email recently from a fan who was worried because I hadn't posted anything about Solitaire Till Dawn for a while. I did warn y'all that it would take some time! And that's still true, unfortunately. But I am still working on it.

I haven't posted because I got stalled for a while. Part of that was just the holidays: traveling, visiting family, and doing Christmas stuff. Part of it was the sad loss of our old and well-loved family cat Freddy, and the subsequent addition of a young mom-cat and two kittens to our household. The new kitties are all sweeties, but they kind of turned the place upside-down for a while.

But the biggest delay was that I got stuck on a nasty bug, something I had to fix before I could move on. There was no progress to report: I've spent the last two or three weeks banging my forehead against my monitor, trying to figure out what was causing the bug and how to fix it. I finally nailed it today, or so I hope. Without going into mind-numbing detail, I'll just say that it was a multi-threading concurrency problem triggered by an intermittent race condition.

That sort of thing can be very difficult to track down, for two reasons. First, it's not trivially repeatable: it depends on subtle timing issues, and you might work the program for quite a while before seeing it happen. It's like that funny noise your car makes whenever you drive it, but never when it's in the shop. And that's why I had to say "I hope" above. I played hours of solitaire today after installing my fix and didn't see the bug again. So I think I got it, but it's still possible that it's just being coy and will re-surface later on.

The second reason it's difficult is that this is a class of problem that a friend of mine calls a "Heisenbug", because any attempt to debug it can make it change behavior or vanish altogether (only to reappear when you stop debugging, of course). But I have to admit that in this case, my problem was the opposite: nothing I tried seemed to affect the bug, until today.

But I got it. (I think.) And that means that I've now tested all the games alphabetically up through Manx. So that's progress, right?