[Plugin]Board, Layout2Board [Behavior] Grid Move

Post your completed addons to share with the community

Post » Wed Jan 01, 2014 1:01 am

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.
B
9
S
1
G
1
Posts: 2
Reputation: 458

Post » Mon Jan 13, 2014 5:58 pm

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
B
2
Posts: 9
Reputation: 393

Post » Thu Jan 30, 2014 2:15 am

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??
B
3
Posts: 1
Reputation: 177

Post » Sun Feb 09, 2014 1:50 am

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.cherbert2014-02-09 01:53:00
B
10
S
2
Posts: 26
Reputation: 922

Post » Thu Feb 27, 2014 10:46 am

sami1337 wrote: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!


@rexrainbow,
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. ;)
B
8
S
3
G
1
Posts: 19
Reputation: 835

Post » Tue Mar 25, 2014 6:10 am

@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. :)

EDIT:

Another question. How do I check the neighbor tile's content? (which tile of the tilemap)
B
48
S
13
G
4
Posts: 349
Reputation: 5,494

Post » Tue Mar 25, 2014 6:52 am

@helena

About prevent diagonal moving, using if... else if ... else ...
Code: Select all
+ is up key down
- do something

+ else
+ is left key down
- do something

+ else
+ is right key down
- do something

+ else
- do something



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.


It might be better to have a condition to pick neighbor chess I guess, when I have time.
B
97
S
22
G
178
Posts: 4,121
Reputation: 104,049

Post » Wed Mar 26, 2014 4:02 am

@rexrainbow

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

rexrainbow wrote: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)
Last edited by helena on Wed Mar 26, 2014 5:38 am, edited 1 time in total.
B
48
S
13
G
4
Posts: 349
Reputation: 5,494

Post » Wed Mar 26, 2014 8:40 am

@helena

Yes, the direction is 0,1,2,3....
In squareTx
0=Right
1=Down
2=Left
3=Up

In hexTx
0=Right
1=Down-right
2=Down-left
3=Left
4=Up-left
5=Up-right

It's the same as selected items in grid move behavior.
B
97
S
22
G
178
Posts: 4,121
Reputation: 104,049

Post » Sat Mar 29, 2014 4:09 pm

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

@helena
B
97
S
22
G
178
Posts: 4,121
Reputation: 104,049

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 4 guests