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.
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.
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 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.
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.
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.
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.
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 just saying