Match-3 mechanics

This forum is currently in read-only mode.
  • Pseudo code:

    +For each block

    - Are any of its four neighbors of the same color?

    - Check that block's adjacent block, that is in the same direction

    > Mark these blocks for demolition

    >When done checking all blocks, DEMOLISH! Then re-check all blocks until NONE are marked for demolition and wait for player's move.

    Mipey's theory would absolutely work. But you probably wouldn't want to check all blocks. Just those that have been moved or rather the rows and columns of those blocks.

    That's the stuff I added to mattdubs cap in the mentioned thread. It's just not destroying there, but changing opacity for testing.

    It's not a whole lot different from what I'm doing anyway. I just happen to involve an array to a certain extent.

  • Yeah, I suppose only checking "moved" or "freshly spawned" blocks would work, though it doesn't really matter on a 8x8 or even 12x12 board.

  • Pseudo code:

    +For each block

    - Are any of its four neighbors of the same color?

    - Check that block's adjacent block, that is in the same direction

    > Mark these blocks for demolition

    >When done checking all blocks, DEMOLISH! Then re-check all blocks until NONE are marked for demolition and wait for player's move.

    I don't know how to make it. I don't know what conditions and actions must be. Could you make an example?

    That's the stuff I added to mattdubs cap in the mentioned thread. It's just not destroying there, but changing opacity for testing.

    Where can I download this ''cap'' file?

  • Where can I download this ''cap'' file?

    It's hidden inside that thread.

    Here you go: Download

  • It's hidden inside that thread.

    Here you go: Download

    Thank you for the example, but I could not understand it.

    Maybe is there another simpler way?

  • Yes! I've made it. <img src="http://i987.photobucket.com/albums/ae352/constructgame/db.gif"><img src="http://i987.photobucket.com/albums/ae352/constructgame/ec.gif">

    Download "exe" 2,86 ?? (+ Sound and Music!!!)

    Download "cap" 0,9 ?? (no sounds)

    <img src="http://i26.tinypic.com/2s64mti.jpg">

  • Oh, that certainly sets the Christmas mood!

    A few comments...

    • don't forget to thank the person who helped you with game mechanics
    • at the start, I got chain reactions. Maybe make sure there are no chains of 3 at the start? I believe it was covered in the tutorial, but there are other ways, too (like silently removing chains until there are no more)
    • when 3 blocks of the same color spawn at the top row, they are destroyed without the animation.
    • I noticed that sometimes a block suddenly turns into another color

    Keep it up

  • Groovy!

    Besides what Mipey mentioned, sometimes a match just doesn't register until you do some other failed move first.

    Also, I managed to keep the swap interfase open somehow while a chain was going on.

    Nice work though!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • <img src="http://img.photobucket.com/albums/v396/Shadow_Kirby/Match-3.png">

    Off-topic: Hey I matched 3!

    On-topic: Downloading it, be right back.

    Edit On-topic: Yeah, glitchy but coding isn't polished yet.

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