timbanon's Recent Forum Activity

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have a Card Deck. Cards are drawn from in-deck to in-hand, and in-hand to in-play. I was using an Array for the deck, but was thinking maybe I should make each card an individual Sprite so maybe they can each have their own animations in the future when played on the field.

  • How do I make the amount of cards in the Array(Deck) go down every time a player clicks the deck?

    I have a bug. Everytime a Player clicks the Deck. The same card is always drawn. I have frames for all the cards in the Sprite, but it doesnt change when a card is drawn.

    Want me to post the .capx?

  • How do I?

  • The array route probably ends up with less work, if your smart enough to organize the card states (in-deck, in-hand, in-play)

    The family route seems more simple to understand, grouping each card/sprite into families (FamilyA=PlayerA's Deck; FamilyB=PlayerB's Deck). Each card/sprite would also have their own private variable that changes from 'in-deck' to 'in-hand' to 'in-play', and back to 'in-hand' sometimes, which can be controlled with the FSM, correct?

  • Basically a finite state machine.

    A bunch of conditions like this:

    + GameState == "StartStep PlayerA"

    > do stuff required for this step

    > if done then GameState = PlayStep PlayerA

    + GameState == "PlayStep PlayerA"

    > do stuff required for this step

    > if done then GameState = AttackStep PlayerA

    Would GameStates be Groups with conditions and actions in them?

  • 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.

  • 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.

timbanon's avatar

timbanon

Member since 17 May, 2012

None one is following timbanon yet!

Connect with timbanon

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies