[Plugin] Matcher

  • Document

    ====

    This plugin try to find matched pattern on board object.

    This is a sample of using this plugin --

    Match 3 in hex board.

    Capx

    It needs 3 parts to get matched pattern.

    • action:Get matching tiles
    • condition:On get symbol , expression:TileUID , action:Set symbol
    • condition:On matching pattern

    Each tiles at board could have one symbol in one character.

    When call "action:Get matching tiles"(action at event 6), plugin will

    1. get all symbols on the board by "condition:On get symbol"(event 7) and "action:Set symbol". Each tile will call this event one time.

    2. then it will check each target pattern by "condition:On matching pattern"(event 8). Put matched tiles into instance group. So that user could get matched tile instances of one pattern under these conditions. Each matched tiles group will call this event one time.

    Remember setup board and instance group for matcher plugin by "action:Setup" before using it.

    This plugin could find pattern at square grid board (board plugin + SquareTx plugin) or hex grid board (board plugin + HexTx plugin).

    Advance:

    2d matched pattern

    This plugin not only could find 1d pattern, it could also find 2d pattern.

    Capx

    The 2d pattern is shown by csv format. For example,

    ",1
    1,1
    ,1"[/code:3n7ffequ]
    means 
    [code:3n7ffequ]_o
    oo
    _o[/code:3n7ffequ] -- it is a "T" shape.rexrainbow2013-07-30 15:57:08
  • Nice, it looks it's designed for puzzle games!

  • Update:

    Add "condition:On matching N symbols". User could use this condition to assign "On matching 3 continuous symbols" directly without list all possible patterns.

  • Good job Rex :) very usefull :)

  • soybean

    Yes, the "expression:TileUID" only index to tile (z=0 on board object). But user could use the tile uid to pick the chess standing on this tile. (Actually, there two expression -- "expression:TileX", "expression:TileY" which might help user to get chess more easily. For example, get chess uid by "expression:XYZ2UID(TileX, TileY, 1)" )

    Or user could save the symbol at instance variable of tile instance when moving chess.

    "Tile" (z=0) is just a base line -- each chess need to stand on a tile (z=0).

  • Unfortunately, example .capx is not accessible anymore.

  • xoros

    Oh no~~~ the server had been blocked, sorry.

    Do you have suggestion about free server? I used 1freehosting currently. It might be broken sometimes.

  • The only thing which comes to my mind is dropbox.

    Or something like this:

    disk.yandex.com

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • xoros

    Thanks, I will take a look to yandex. I had dropbox, but it almost full. <img src="smileys/smiley11.gif" border="0" align="middle" />

  • xoros

    The server is back! You could download capx now.

  • Great!

  • I think server is dead again :(

    Shame, I think this is really similar to what I'm trying to do in my own project. Can you get an alternate link up?

  • blah626

    Thanks for notification, I had changed the link. Please try it again.

  • Thanks, that worked :)

  • Update:

    Break changing - Properties table now has 3 fields to set comparing axis "Horizontal", or "Vertical", or "Isometric" independently.

    <img src="http://i1081.photobucket.com/albums/j352/rexrainbow1/matcher.png" border="0">

    Remember to setup properties table again if using matcher with square board.

    Application: Tic-Tac-Toe

    Demo

    Capx

    Edit: I change the download link, please download this plugin again.

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