Updated Card Games basics

This forum is currently in read-only mode.
From the Asset Store
Create your own trading card game with this Fantasy TCG Card Template
  • I had some free time today so I started to play with Znirk card-demo.cap and made some updates to it.

    Right now I am working on the best way to display the next card so it overlaps the last card so you can see both. But I am having a problem with my for each object coding.

    So if anyone has any tips please let me know.

    Also,Thanks to

    stainsor

    for showing were you can get the card graphics

    http://www.jfitz.com/cards/ if you don't want to design your own cards. They provide a couple decks to choose from.

    Znirk

    For the card-demo.cap that that is were most of the base code for this CAP came from.

  • ok , I got the cards to display right now in rows. But I have some looping problem after you click on "New Deck" or "Shuffle all" Buttons. it does not display the first card right. But all the rest are ok.

    If anyone can look at this and see what is the problem that be a big help.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • This is good stuff. I can definitely use this in my card game.

    I managed to fix your bug. When the troublesome buttons are clicked I set it's X position to 297. I guess the old Card2 object that was hanging around still had its old position.

  • Thanks stainsor for helping me out with the CAP

    Now the hard part, making the card hand ranking system.

  • This is a neat example.

    I've given some thought to ranking; I think it's probably easier if it's builtin, and there is a condition such as:

    'Hand is stronger than Other Hand', whereby the two hands can be entered using array parameters, like so:

    { 1, 2 }, { 33, 34} would be two hands, where the numbers were the card number in the deck.

    There would have to be some options, such as 'ace is low', etc, but I think it'd work out pretty well.

  • I've also had thoughts about a poker hand ranking system. Each hand would be assigned a numeric value that signifies how powerful it is. Of course the advantage of this system is that you just compare two decimal numbers to see who wins. It would look something like this:

    Base Hand Value:

    70000 Straight flush

    60000 Four of a kind

    50000 Full house

    40000 Flush

    30000 Straight

    20000 Three of a kind

    10000 Two pair

    100 One pair

    0 High card

    Hand Value Modifier:

    * for most hands (high card, pair, three of a kind, straight, four of a kind, straight flush) the modifier would be equal to the highest card in the hand. ex: pair of 9s = 109

    * For two pair put the highest pair in the first two digits after the 1 and the low pair in the next two digits. ex: Aces and eights = 11408

    * Full house is similar to two pair. ex: Aces full over eights = 51408

    Kicker Value:

    We also have to rank the kicker in case two people have hands of the same value. (for example if both have a pair of threes.) Put this information in the decimal. Don't forget to use two digits for each card.

    ex: the five cards 2 2 3 5 6 rank as 102.060503

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)