Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

-= FreeCell Solitaire Playing Card Starter Kit =-

Discussion in 'Assets and Asset Store' started by Bryan-Legend, Apr 15, 2014.

  1. Bryan-Legend

    Bryan-Legend

    Joined:
    Sep 8, 2012
    Posts:
    80
    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 https://www.assetstore.unity3d.com/#/content/14334
    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.

    $FreeCell Clean Deal.PNG
    $FreeCell Mid Play.PNG
    $FreeCell Particles.PNG
    $FreeCell Win.PNG
     
    Last edited: Aug 23, 2014
  2. thedreamer

    thedreamer

    Joined:
    May 13, 2013
    Posts:
    226
    Does this support for mobile(android and ios)?
     
  3. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,454
    +1 for the mobile question. Has this been tested on Mobile? iphone 4?
     
  4. Bryan-Legend

    Bryan-Legend

    Joined:
    Sep 8, 2012
    Posts:
    80
    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.
     
  5. rhoward991

    rhoward991

    Joined:
    Oct 9, 2013
    Posts:
    2
    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!
     
  6. Bryan-Legend

    Bryan-Legend

    Joined:
    Sep 8, 2012
    Posts:
    80
    Go to the Board game object and set the card sprites on the GameBehavior component.
     
  7. Seraya

    Seraya

    Joined:
    Nov 6, 2013
    Posts:
    2
    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!
     
  8. Bryan-Legend

    Bryan-Legend

    Joined:
    Sep 8, 2012
    Posts:
    80
    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
     
  9. Bryan-Legend

    Bryan-Legend

    Joined:
    Sep 8, 2012
    Posts:
    80
    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
     
  10. Seraya

    Seraya

    Joined:
    Nov 6, 2013
    Posts:
    2
    That fixed it, thanks!
     
  11. cg_destro

    cg_destro

    Joined:
    Aug 13, 2013
    Posts:
    142
    Hey quick question: how easy would be to create Klondike Solitaire from this kit?
     
  12. Bryan-Legend

    Bryan-Legend

    Joined:
    Sep 8, 2012
    Posts:
    80
    It'd be pretty easy. The code base was once built just for Klondike.
     
  13. cg_destro

    cg_destro

    Joined:
    Aug 13, 2013
    Posts:
    142
    Thanks for quick reply :)

    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
     
  14. Bryan-Legend

    Bryan-Legend

    Joined:
    Sep 8, 2012
    Posts:
    80
    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.
     
  15. Bryan-Legend

    Bryan-Legend

    Joined:
    Sep 8, 2012
    Posts:
    80
    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
     
  16. Bryan-Legend

    Bryan-Legend

    Joined:
    Sep 8, 2012
    Posts:
    80
    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?
     
  17. cg_destro

    cg_destro

    Joined:
    Aug 13, 2013
    Posts:
    142
    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 :)
     
  18. Orbytel

    Orbytel

    Joined:
    Sep 1, 2012
    Posts:
    6
    Hi Bryan-

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

    Cheers,
    Luke
     
  19. vahi2008

    vahi2008

    Joined:
    Oct 1, 2010
    Posts:
    321
    How easy is to create three cards game using your kit ?
     
  20. Bryan-Legend

    Bryan-Legend

    Joined:
    Sep 8, 2012
    Posts:
    80
    Shouldn't be hard. It'd be a very good start.
     
  21. Bryan-Legend

    Bryan-Legend

    Joined:
    Sep 8, 2012
    Posts:
    80
    I actually have started to convert it. It's about 80% done. Message me your email address and you can give it a try.
     
  22. vahi2008

    vahi2008

    Joined:
    Oct 1, 2010
    Posts:
    321
    If i want you to convert it for me at some reasonably decided cost, will you be interested in doing so ? vahi2008@gmail.com is my email
     
  23. Cartoon-Mania

    Cartoon-Mania

    Joined:
    Mar 23, 2015
    Posts:
    320
    Have you plan to support the ugui?
     
  24. ptblk

    ptblk

    Joined:
    Mar 27, 2015
    Posts:
    57
    Hi, looking to make a 4 player UNO game, will this be able to get me there?

    Thanks
     
  25. hasen

    hasen

    Joined:
    Apr 1, 2015
    Posts:
    29
    Was this converted to solitaire and if so does it have 1-3 card modes, undo and card animations? I think I'd be interested to buy both. I take it its all written in C#?
     
  26. gman42

    gman42

    Joined:
    May 3, 2014
    Posts:
    3
    will this work with unity 5?
     
  27. Bryan-Legend

    Bryan-Legend

    Joined:
    Sep 8, 2012
    Posts:
    80
    Yes. It will work just fine on Unity 5.
     
  28. Bryan-Legend

    Bryan-Legend

    Joined:
    Sep 8, 2012
    Posts:
    80
    I started converting it to Solitaire but didn't get it finished. Yes, it's all C#.
     
  29. Bryan-Legend

    Bryan-Legend

    Joined:
    Sep 8, 2012
    Posts:
    80
    Should be a great starting point.
     
  30. Bryan-Legend

    Bryan-Legend

    Joined:
    Sep 8, 2012
    Posts:
    80
    There's very little gui in the kit. The cards are just 2D objects and don't use any GUI system at all. There's only the few test buttons which can easily be redone in whatever gui system you'd like.

    For my FreeCell Quest game the GUI was mostly done in NGUI although I've added some bits of uGUI to it to get around old NGUI bugs.
     
  31. Phatalist

    Phatalist

    Joined:
    Aug 6, 2015
    Posts:
    1
    don't you know why web-demo doesn't work?((
     
  32. Bryan-Legend

    Bryan-Legend

    Joined:
    Sep 8, 2012
    Posts:
    80
    The unity plugin has been disabled by many browsers lately.

    There's a webGL version available now at http://legendstudio.com/Freecell/

    I was worried there'd be some changes needed for Unity 5. But it doesn't look like there is so much as a single compiler warning for the project. Still runs perfectly in latest Unity.
     
  33. sahilshjmu

    sahilshjmu

    Joined:
    Aug 18, 2017
    Posts:
    10
    Hello Lone,

    I am interested to buy this package and learn from this.
    Actually i am trying to learn unity SDK and so looking for some good Completed projects to start my study from there.
    Please tell me how i can buy this and also tell me will this work for latest unity 2017.1 and what will be the best price for this as i have no intentions to launch this, I am just a learner and want to learn things from it.

    I would be really thankful if you can please help me with this and offer me a best price.

    Thanks,
    Sahil
     
  34. AvenBeater

    AvenBeater

    Joined:
    Jan 25, 2014
    Posts:
    2
    From where can I start to build a solitaire spider game with this asset?