-= FreeCell Solitaire Playing Card Starter Kit =-

FreeCell is one of the worlds most popular video games! This starter kit plays FreeCell out of the box but can easily be used for Poker, Klondike, Spider, Pyramid, TriPeaks, Hearts, Rummy or anything else you can imagine that uses a traditional deck of cards.

Asset Store Page
Web Demo
Online Manual

This starter kit features:
A full set of high quality traditional card faces
Uses the new built-in 2D system in Unity 4.3 for optimal efficient performance
Full undo/redo system
An awesome win animation that plays back the entire game sequence back and forth
Fancy shruiken particle trails when card is scored
Double click to move a card to a free cell or goal cell for a smooth user experience
Auto placement of cards to goal cells
Card faces are size compatible with “Solitaire card pack” on the asset store at Unity Asset Store - The Best Assets for Game Making
Can use either the NGUI tweens or the included copy of iTween to move the cards smoothly. When Unity 4.6 comes out with integrated NGUI we’ll switch to their tween system.
All C# source files are included and strictly follow the .Net Framework Design Guideline naming conventions.




Does this support for mobile(android and ios)?

+1 for the mobile question. Has this been tested on Mobile? iphone 4?

I’ve not tested it personally on mobile. I have used the web plugin version on a touch screen and it works okay. Only thing missing is the right click. Dragging and dropping of the cards works great.

I’ve tried it at iphone resolutions and it should work well for iphone 3 or later.

I’ll be doing an android test build sometime this week.

I own the solitaire card pack and would like to use it in place of the stock cards. How do I go about doing this?
Thanks!

Go to the Board game object and set the card sprites on the GameBehavior component.

I have a game based on your kit. The play columns get much taller than normal freecell, and if more than 13 cards are placed in the column, those extra cards vanish and, if drag logic can’t get them, become unplayable.

Where is it determined how many cards are shown? I’ve been up and down DeckBehavior and fiddled with spacer logic (and was able to disable the squeezing) but can’t seem to find the problem.

Any help would be appreciated. Thanks!

Hi Seraya,

You want to look at the FreeCellBehavior.NewGame method where it sets up the decks.

Here’s the property you want to change:
deck.MaxCardsSpace = 13;

Bryan

Sorry. I miss-read the problem with the cards disappearing. I remember that bug but forgot how I fixed it. I think it was because the z position of the cards were winding up behind the camera. To fix it I changed the card z positions to use a multiple of 0.001f instead of 1.

Like this:
var targetLocalPosition = new Vector3(0, 0, (-i - 1) * 0.001f); // z needs to be set for mouse hit detection

I’ll be getting a new build of the starter kit out soon.

Bryan

That fixed it, thanks!

Hey quick question: how easy would be to create Klondike Solitaire from this kit?

It’d be pretty easy. The code base was once built just for Klondike.

Thanks for quick reply :slight_smile:

Can you give me some directions how to do it?

Btw I found little bug in this kit, when you have lots of cards in one colum, maybe 12+ last cards disappear until you pick them up

I just submitted a new 2.0 version of the asset that should have that fixed as well as many other changes.

Here’s the change log:

  • Removed separate data model classes in favor or more simple integration into the MonoBehavior classes. This is a major breaking change but leads to much simpler and cleaner code.
  • Dynamic difficulty where low cards are buried or brought to the top of the stack.
  • Dynamic number of free cells to adjust difficulty.
  • Dynamic number of suits of cards to adjust difficulty.
  • Dynamic number of stacks of cards to adjust difficulty
  • New sparkle sound when a card is sent to a goal cell.
  • Improvements to the game logic in being able to double click any card or stack to move it to a correct position.
  • Proper auto moving of all safe to move cards to their goal cells for smooth gameplay.
  • New & improved undo system that’s capable of more game move types.
  • Fully tested, deployed and supported on iPhone, iPad, Android Phones, Android Tablets, Amazon Tablets, Windows Store (Tablets and PC), Windows Phone and Web.
  • Moved example gui code to it’s own component.
  • Many other bug fixes and improvements.

For creating a Klondike game I’d copy the FreeCellBehavior script and edit it to behave like Klondike.

You’d need to edit the new game code to setup the decks for Klondike.

Most of the rules of solitare games are in the restrictions of where cards can be dragged to. Those are all in the CardDrag method of FreeCellBehavior. Just rewrite that to implement the Klondike rules and you’ll be most of the way there.

Bryan

Maybe next week I’ll convert the code over to Klondike and put up another package. If I did so could I count on you as a first buyer?

Maybe if the price will not be to high and could work no problem side by side with freecell version. Right now I’m busssy with lots of other things but will see if get some spare time to play with it.

btw you should add link to assetstore in first post and maybe in signature :slight_smile: just saying :slight_smile:

Hi Bryan-

I was wondering if you had converted the freecell project over to klondike?

Cheers,
Luke

How easy is to create three cards game using your kit ?

Shouldn’t be hard. It’d be a very good start.