How do I use the Chess & Board plugins properly?

0 favourites
  • 6 posts
From the Asset Store
Beautiful Black & White Chess Pieces for Chess Game.
  • I have spent a number of hours putting together a chess board... and although it looks like nothing - it really was a lengthy process just getting this far.

    Rex Rainbow has produced so many plugins for this community, I am in awe He is obviously extremely talented. The problem is - I can't seem to find any documentation on his plugins that explains how to use them properly.

    For instance, whats the difference between creating logical or physical chess pieces? Should you do both?

    Anyway, I have attached what I have done so far, my current hurdle is getting a piece to move.

    Once I have that nailed, I can then spend some more hours figuring things out for myself before asking for more assistance

  • Just to clarify, how do I construct the piece movement events?

  • I have made progress on my own, but thought i'd share my results and ask questions in this thread as I go. Somebody might suggest something that'll save me hours of work.... if not i'll just carry on

    So... you can now click on any of the pieces and click on another square to move them.

    I haven't set limits on the movements yet. That'll be one of my next challenges.

    I'm thinking I should build an array that contains all the legal moves for each type of piece. I have 6 types, determined by their animation frame number. Black pieces are frame 0 through 5, the White pieces are frames 6 through 11.

    I was thinking of an array something like:


    frame (type) maximum moves directions

    0 (pawn) 1 y-

    1 (castle) 7 x,y,x-,y-

    2 (knight) 3 x,y,x-,y-

    3 (bishop) 7 x+y,-x+y,x+-y,-x+-y

    4 (queen) 7 x,y,x-,y-,x+y,-x+y,x+-y,-x+-y

    5 (king) 1 x,y,x-,y-,x+y,-x+y,x+-y,-x+-y

    6 (pawn) 1 y

    7 (castle) 7 x,y,x-,y-

    8 (knight) 3 x,y,x-,y-

    9 (bishop) 7 x+y,-x+y,x+-y,-x+-y

    10 (queen) 7 x,y,x-,y-,x+y,-x+y,x+-y,-x+-y

    11 (king) 1 x,y,x-,y-,x+y,-x+y,x+-y,-x+-y

    Of course this doesnt take into account en passant, castling, knights move 1+2 etc. but I was going to build those individually... unless somebody has a better suggestion?

    I'd also like to build an array whilst I build my board following standard a-h, 1-8 grid so that i can eventually import/export PGN files. I've tried building an array, but when searching it - all the values are 0, so suggestions on how to quickly populate a grid a-h/1-8 with the UIDs of the tiles as I build the board would be very helpful.

    Any offers of help to build these arrays, or even improve the events I have already made would be greatly appreciated.

    Latest version of the capx included.

    Thanks guys

  • Hey revvin!

    You should really look into Rex's behavior plugin "GridMove". It is definitely what you are looking for, as it works very well with his Board/Chess plugins. Just add the behavior to your chess piece and call it in your events instead of using "MoveTo".

    Hope this helps

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello! I'm using some of these plugins as well, and when you figure your way around them they can be really useful.

    You should take a look at this thread, with a collection of his plugins that work really well together to do what you need: viewtopic.php?t=69647&start=0

    As well as his demonstrations here: ... fA3BYVEKYk

    As for how far each chess can move and what types they are, it is also possible to use private variables for that. Just give each chess piece a different variable number for amount of moves it can make, and names for its type.

  • Brilliant - thanks for the info guys!

    I have figured out how to do an array, and i'll be assigning correct tile notation to each tile, for future support of PGN files.

    Vati-nyan: thanks for the tip re: private variables. I'll be making use of instance variables to identify the pieces, cross referencing with another array that'll store the legal moves for each type.

    Bonesy: I'll look at grid movement again. I think when I looked before, it didn't animate/move sprites from one grid location to the next - which is something I definitely need... as eventually i'll have the pieces walking around the board...

    I have just been looking at the SLG_Movement examples that make use of Grid Movement too... and I think its definitely the way to go. I'll have to create some templates for the filters so that certain tiles will never be available to certain tiles ie, Pawns will not be able to move +-X, only +-Y (unless there is another piece at X+-1/Y+-1 for En Passant). I should be able to figure that out myself.

    Thanks again for your input.

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