[Plugin]Board, Layout2Board [Behavior] Grid Move

From the Asset Store
Snap to visible grid - perfect solution for any game genre
  • Could someone help me pls?

    I made this but I have a bug with the upper en left Arrow key. I installed in the event: Key on Up Arrow pressed. Action: tile gridmove up. I did the same with the other 4. For some reason the down and right button works normally. But the Up Arrow does nothing and the left Arrow goes up while i installed it to go left. Help me pls.

  • Rex

    thanks for the great plugins and the demo.

    I'm using the demo project to implement one 3match for one test game.

    But when i try change the position of SquareTx on axis Y. The game logic dont work fine (just some matches work...).

    This happen for some reason? the match code depend of initial position of squaretx?


  • thanks for your plugins they are awesome for the game that i was thinking!!!!!

    your samples are very useful for beginers like me. I have a question..

    It is posible to create diferent ID for diferent spawns of the same chess??

  • Can someone help me with placing a new tile/chess on mouse click?

    I have...

    Create tile Sprite [Board.PXY2LX(Mouse.X,Mouse.Y) , Board.PXY2LY(Mouse.X,Mouse.Y) This is described in the wiki as the method to get logic X and Y by physical X,Y co-ordinate. Is this correct or have I got it completely wrong? Because although kind of working its not very accurate and often times the Sprite is created in the adjacent square.

  • Yes that's what i meant. You made it work for simple board games like chess, but if you want a bigger playing field you have alot of tiles that you may not always need. A virtual board grid would be pretty useful. With a virtual board you can have a single background image and still use the grid.

    But i understand this is probably hard to do.

    Your plugins are very helpful!


    first of all, thank you very much for all your incredible work. Thanks to your extensions too, I'm managing to publish a puzzle game on the market, and that was quite hard, but so easier than how it would have been without your efforts.

    I write here just to stress how important it is the question asked by sami1337

    Some mobiles are not yet supporting webgl. From a 'cosmetic' point of view, you can make a tile transparent. My grid is just a bit larger than the chess game (8x10), but since transparent sprites are as heavy as the opaque ones in rendering, they have already shown some significant detrimental effect on performance (80 tiles are 'drawn' on the screen, above a background and below the chess-behaving sprites) on Windows Phone 8 and other canvas2d devices. It is to say I've already made a lot of performance improvements such as deleting unnecessary sprites and drawings, removing text objects, disabling all collisions checks and so on... but I can't go further.

    It would be great if chesses could be set as moving within logical grid but ignoring tiles below (or whatever is not at the same logical 'z' level), or tiles could be something less renderer-demanding than sprites. Thank you again, however.

  • rexrainbow

    I am using Gridmove (on a Board).

    How can I do to prevent diagonal movement? if you press both up and left, it will go diagonal if you understand what I mean.

    I am impressed by your work, by the way. I wish there were more tutorials in the tutorials using your plugins/behavior.


    Another question. How do I check the neighbor tile's content? (which tile of the tilemap)

  • helena

    About prevent diagonal moving, using if... else if ... else ...

    + is up key down
    	[li]do something[/li]
    + else
    + is left key down
    	[li]do something[/li]
    + else
    + is right key down
    	[li]do something[/li]
    + else
    	[li]do something[/code:3amd340v][/li]
    About get neighbor tiles, using Expression:DIR2UID(uid, dir)
    	[li]UID ( number ) : The UID of chess.[/li]
    	[li]Direction ( any ) : The direction.[/li]
    Then use condition: pick by UID.
    It might be better to have a condition to pick neighbor chess I guess, when I have time.
  • rexrainbow

    Thank you, the conditioning of else worked for not walking diagonally. I am more used to it in Basic programming...

    About get neighbor tiles, using Expression:DIR2UID(uid, dir)

    - UID ( number ) : The UID of chess.

    - Direction ( any ) : The direction.

    Then use condition: pick by UID.

    I am trying to understand this.

    the dir, is it in string like "up", "down", etc.. or in numbers - which numbers? 0, 180, 270, 360? Figured out this one, it is 0, 1, 2, 3.

    I have tried to apply it like this:

    board.dir2uid(player.uid, 0) it just response of -1 and then I tried to put (player.uid, "down") then it responds with Player's uid, which is not what I wanted.

    (player is a sprite, only for the player guy to walk around. the tiles are from a sprite with animation frames used together with tmximporter and board)

  • helena

    Yes, the direction is 0,1,2,3....

    In squareTx





    In hexTx







    It's the same as selected items in grid move behavior.

  • Try Construct 3

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

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

    Add "Condition:Pick neighbor chess" in board plugin.

    Add some expressions in squareTx, and hexTx to get direction code. It could be used at "Condition:Pick neighbor chess".


  • rexrainbow

    YAY! Thanks.

  • rexrainbow

    Is it this one: Are neighbor (UID) new?

    Then it might not be what I want as it ask for UID for both "chess".

    My scenario:

    Pick all objects (chess) of name BOX

    Check the tile below BOX: Is it empty, no chess there? Then move box down. (do so for all BOX)

    Is Player (chess) below BOX? Then kill player.

    Is Player side to side (not overlapping here) to ENEMY, then kill player.

    No specific uid, just going through all the objects of one type.

  • rexrainbow

    Please ignore my last comment. I have now solved my problems using other methods. Thanks.

  • I re-wrote these plugins' documents. Here is a link.


    Now layout2board plugin could support orthogonal or isometric, or hexagonal board.

    Please updating related plugins.

  • Update:

    rex_board plugin - add conditions and expressions to get an empty cell. See the section "Get empty cell" in this page.

    Get empty cell

    Sample capx

    "Condition:Has any empty cell" is used to check if there has any empty cell on the board, user could get the logical (x,y) of an empty cell by "Expression:EmptyLX", and "Expression:EmptyLY".

    "Condition:Pick an empty cell" is used to get an empty cell randomly, the logical (x,y) of picking result is got by "Expression:EmptyLX", and "Expression:EmptyLY", too.

    If all cells are occupied, these two conditions will return false.

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