How do I create poker game?

  • DjPoke

    Wow, thanks. That's a really playable example.

    But i still don't understand how should it works, if i want to add 2-3 players for example.

    How to compare they're cards? There should be 5 cards as there are now, and 2 additional for each player.

    And after that compare who has better combination?

    Maby, that's noob's questions for you, but for me it's seems very complicated right now

  • When i've time, i will create an example with two players.

    For now, i explain to you.

    You just have to add 5 cards for each player first.

    In each card, there is an instance variable called "CardNumber" (1,2,3,4 & 5 for the first player).

    Create for example 5 more cards, and change the "CardNumber" vars for these to 6,7,8,9,10.

    Duplicate some parts of the block of events and paste it after.

    (You'll have to create an A.I for the other players)

    Change the reference to the 1,2,3,4,5 cards to access the 6,7,8,9,10 cards.

    Duplicate vars and arrays you need for each player and edit the events.

    Once you've done that, you have to replace the events that show what you have in your hand by a comparison, as explained before.

    There is a variable, at the end, which contain the value of what you have. (TWO PAIRS, THREE OF A KIND, etc...)

    Juste compare this var to the same var duplicated for each player, and you'll know who win.

    In case of equality, you'll have to compare the sorted hands arrays.

    I don't understand why you talk about 2 additional cards for each players.

    Do you mean that only two cards can be replaced ?

    Because i don't know a poker game with 7 cards in a hand.

    Can you explain further.

  • Not 7 in hand

    5 on table, and 2 in each player hand.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's Done. I hope there is no bugs...

    http://www.retro-bruno.com/downloads/Poker2.capx

    Ok, i understand what kind of poker you talk about.

    I will see tomorrow what i can do.

  • kelney, i'm sorry, i think i don't help you by this way.

    This is some rules you need to know :

    1) To progress, you must practice. The more you practice, the more you progress.

    2) To progress quickly, you must be methodic, with your logic.

    3) To progress well, you must know your subject.

    Example:

    1) You want to program an existing type of game ? Learn perfectly the rules. As this, you know your subject.

    2) Use your logic to plan how to program the game.

    • At first, create prototypes with only the medias you need to see if your ideas are functional.
    • When you see it works, you can create your game.
    • Don't forget to make clean programs, ordered, and with a lot of useful comments.

    3) If you miss, never forget you can retry, and by retrying you give yourself more chances to win.

    I hope i'm useful.

    If you have any questions about the game, you can post it here, i'm here.

    But i prefer you to try first to do your best, and then i can help you.

    Ah, i forget something important, we will have to be patients.

    This is the quality all people must have to succeed in life.

  • kelney, i'm sorry, i think i don't help you by this way.

    This is some rules you need to know :

    1) To progress, you must practice. The more you practice, the more you progress.

    2) To progress quickly, you must be methodic, with your logic.

    3) To progress well, you must know your subject.

    Example:

    1) You want to program an existing type of game ? Learn perfectly the rules. As this, you know your subject.

    2) Use your logic to plan how to program the game.

    - At first, create prototypes with only the medias you need to see if your ideas are functional.

    - When you see it works, you can create your game.

    - Don't forget to make clean programs, ordered, and with a lot of useful comments.

    3) If you miss, never forget you can retry, and by retrying you give yourself more chances to win.

    I hope i'm useful.

    If you have any questions about the game, you can post it here, i'm here.

    But i prefer you to try first to do your best, and then i can help you.

    Ah, i forget something important, we will have to be patients.

    This is the quality all people must have to succeed in life.

    Indeed, Helping someone to program does not consist of creating the program for them.

    That being said, your examples in this thread are a great way to learn for some.

    With these base-mechanics and some knowledge about how to create games with construct it's very possible to create a good-looking and working Poker-game.

    Thanks!

  • This should get me started, wanting to create a poker prototype myself.

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