Solitaire game with Construct 2

  • There's also the Creating a memory match game that contains some answers to most your questions.

    And indeed, power bumping is not a good way to go when requiring help.

    "Threatening" of switching to a competitor isn't either.

  • thank you for the help everyone and sorry for being such a jerk.I just get so angry at myself sometimes and that's when i usually turn into a complete jerk/idiot.I know i should not power bump so please forgive my moronic behaviour.Now to get some sleep .Maybe things will work better if i get some rest.

  • It shouldn't be too difficult. I'd agree that you'd want to start with a random order. Other than that from what I'd know you'd have to make some simple array operations. The staggering of the cards will be interesting to figure out but it is certainly not impossible. Just a bit brain bending ;)

    sqiddster how is possible to use drag an drop over the cards which are pinned to other cards?

  • DravenX

    I actually made a solitarie game with Construct2 that I will TRY to finish when I release my current project.

    The real answer is that Construct2 is not the best tool for card games.

    Solitaire logis would be better handled with "real" code, writing array tables with c2 is a real pain.

    I suggest to write a custom plugin if you are serious about this that will handle your particular situation, I know I was doing one and no I will never release it because each solitaire game requires its own logic.

    Ideally you should "feed" all the card position to a class that will keep track of them and calculate the value and return true/false if the card you moving can be placed in a particular column.

  • 0plus1 This may be true, but not everyone has the time to learn a 'real' programming language, and doing this brings up other issues that the beginner may not be equipped to deal with.

    I agree that this will be on the more difficult side in C2, but it can nonetheless be done.

    That being said, now that I realize some of the finer complexities, I might suggest starting with a simpler card game.

    (Regarding possible jerkiness - don't worry, we all have our grumpy days ;) )

  • Actually since we now have containers, arrays should be much easier to deal with.

    Pretty sure it works with creation, haven't tested with destroying etc, not much time to spare lately.

    But the fact that you can pair them up in an oop fashion should be sending shivers down everyone's spine.

  • newt why exactly should I be shivering? I'm curious now...

  • Each object can now have its own array, that is automatically picked when the object is.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Wow, never thought about doing that... So many possibilities!

    I never even knew arrays could have instances.

  • sqiddster I never said it's not possible, simply that most people think that solitaire are easy games to do while in reality there is a good level of complexity, especially in some variations (like the mobile hit fairway solitaire for example). The reality is that c2 doesn't handle well those kind of games, and by that I mean that it doesn't have "automatic" behaviours like for platform games, so you'll have to delve a little into the code. That was my point.

    newt mind blown!

  • Anyone could make a solitaire game as open source .capx and we improve it?

  • I got a solitaire capx working here:

    https://www.dropbox.com/s/nircnve4n9uyy ... .capx?dl=1

    /examples16/solitare.capx

    You are just as likely to win as if you were playing with a real deck of cards.

    I opted to not use arrays and now that it's done I wonder if it may have been simpler to use them.

    EDIT:

    I'm positive this could be done much simpler. As a first full attempt at such a game I added a bunch of events to try stuff out.R0J0hound2012-12-17 07:32:43

  • Once again it's Rojohound to the rescue .Thank you for the capx . I will study it and see what i can come up with.

  • I got a solitaire capx working here:

    http://dl.dropbox.com/u/5426011/examples16/solitare.capx

    You are just as likely to win as if you were playing with a real deck of cards.

    I opted to not use arrays and now that it's done I wonder if it may have been simpler to use them.

    EDIT:

    I'm positive this could be done much simpler. As a first full attempt at such a game I added a bunch of events to try stuff out.

    Wow, you're faster!

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