timbanon's Forum Posts

  • Got It. This leads right into this question though and then i can get things rollin. How should I have Card Objects?

  • Right now, I have 2Sprites (in-hand + in-play) with 54Slides each for all the cards.

    Should I do this or make each card an object? At the beginning, the deck is shuffled and PlayerA and PlayerB take turns making moves. Cards get played from in-hand to in-play and can also go in-play to in-hand. How should things get handled?

    timbanon.com/games/Dreamers.capx

  • Cool.

    So in my Event Sheet, currently I have Groups for each action that players will be doing: Restore, Retreat, DrawCard, Pass, PlayCard, RevealCard, and so on...

    In your explained 'State', that become true, I would activate the Groups according to what Actions can be done at the time during that State.

    Aka a basic FSM Model for turn-based sequences?

    How would I make it PlayerB's turn?

  • Thanks Mipey, smart. I was testing with like all 54.

  • Hey Scirra Forum,

    I am not really a developer but a designer, with some dev knowledge. Thanks Maxum for your contributions. Your randomized array helped me a lot with some of my work. Currently, I am building a card game with a TCG concept. The rules can be found here Dreamers Rule Book

    I am needing help in getting to at least a beta mode where i can go from start to finish of the game. I can fill in the blanks in Construct 2 if the Events are layed out or explained properly.

    Dreamers.capx

    To summarize the game logic, there are 54 cards. Of the 54 cards, there are red, blue, and green suits. Of the 3 suits there are 5 values, 2, 4, 6, 8, 10. The game has rock, paper, scissors logic implemented, as in, red>blue>green>red. For example Red 8 VS Blue 6 = Red 8/2 VS Blue 6 = Blue 6 destroys Red 8.

    The game is turn-based, so I wrote down all possible actions and created a flow chart. So, when a players turn starts the Event system would dialog buttons of all current possible actions. Players make their moves with these buttons until the turn is ended with the last event of the flow chart ending their turn. Sequence is PlayerA > PlayerB > PlayerA and so on. After research, I have discovered this is called a Finite State Machine (FSM).

    Basically, the game would consist of an FSM turn-based sequence system for gameflow, and a battle-system logic that calculates card attributes to declare round winners.. Like YGO.

    I am wondering how I should go about this the best way in Construct 2, as I would launch Beta once Tutorial mode is complete; An Alpha, once Offline (VS Computer) is complete; an RC once Offline (VS Human); and then go live once Online (FB Connect) is complete. Right now I'm just looking for the game logic to work on Offline mode VS A.I. or Human. Whichever comes first.

    Tell me.. any solutions, ideas, contributors .. Hey if you help me out u may just ride with the team. I really just wanna be able to see it live, because I'm primarily a designer, so I can make all the artwork no biggie, but when it comes to development Im like a pre-beginner that just copies paste other code and modify til i break something and revert back to saved lol.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • How would I create a turn which loops between Player A & B.

    I was thinkin around the lines of this pseudocode

    ---LOOP---

    1 StartStep PlayerA

    2 PlayStep PlayerA

    3 AttackStep PlayerA

    4 EndStep PlayerA

    5 StartStep PlayerB

    6 PlayStep PlayerB

    7 AttackStep PlayerB

    8 EndStep PlayerB

    ---LOOP---

    Loop these events until winner.

    I wouldnt know how to go about this in Construct 2.

  • I'm tryin to implement an FSM engine for turn sequences in my TCG-game timbanon.com/games/Dreamers.capx

    1 [Retreat]a [Restore]b [Draw]c [Pass]d

    2 [Play]a [Reveal]b [->]c

    2a Select a card in hand and drag it to the Combat Region

    2a [Face-Up] [Face-Down]

    2 [Play]a [Reveal]b [->]c

    2b Select card in Combat Region to Reveal.

    3 [Target] [->]

    3a Select Attacker

    3a Select Target

    Round Loser card destroyed

    4 [Play]a [End]       

    4a Select a card in hand and drag it to the Combat Region *Only if you didnt play a card in Step2.

    4a [Face-Up] [Face-Down]

    4 [End]

    So, turn sequences would follow the FSM model. The options would appear on the players Options menu at the bottom of the screen. It would control what Players do. Once I have this FSM running, I'd be able to do the rest on my own most likely being that the only stuff remaining would mostly be graphics, my specialty.

  • Hey Scirra Forum,

    I am not really a developer but a designer, with some dev knowledge. Thanks Maxum for your contributions. Your randomized array helped me a lot with some of my work. Currently, I am building a card game with a TCG concept. The rules can be found here Dreamers Rule Book

    I am needing help in getting to at least a beta mode where i can go from start to finish of the game. I can fill in the blanks in Construct 2 if the Events are layed out or explained properly.

    Dreamers.capx

    To summarize the game logic, there are 54 cards. Of the 54 cards, there are red, blue, and green suits. Of the 3 suits there are 5 values, 2, 4, 6, 8, 10. The game has rock, paper, scissors logic implemented, as in, red>blue>green>red. For example Red 8 VS Blue 6 = Red 8/2 VS Blue 6 = Blue 6 destroys Red 8.

    The game is turn-based, so I wrote down all possible actions and created a flow chart. So, when a players turn starts the Event system would dialog buttons of all current possible actions. Players make their moves with these buttons until the turn is ended with the last event of the flow chart ending their turn. Sequence is PlayerA > PlayerB > PlayerA and so on. After research, I have discovered this is called a Finite State Machine (FSM).

    Basically, the game would consist of an FSM turn-based sequence system for gameflow, and a battle-system logic that calculates card attributes to declare round winners.. Like YGO.

    I am wondering how I should go about this the best way in Construct 2, as I would launch Beta once Tutorial mode is complete; An Alpha, once Offline (VS Computer) is complete; an RC once Offline (VS Human); and then go live once Online (FB Connect) is complete. Right now I'm just looking for the game logic to work on Offline mode VS A.I. or Human. Whichever comes first.

    Tell me.. any solutions, ideas, contributors .. Hey if you help me out u may just ride with the team. I really just wanna be able to see it live, because I'm primarily a designer, so I can make all the artwork no biggie, but when it comes to development Im like a pre-beginner that just copies paste other code and modify til i break something and revert back to saved lol.