kfchess icon indicating copy to clipboard operation
kfchess copied to clipboard

Control improvement - allied pieces unfairly blocking each other during movement

Open chess123mate opened this issue 1 year ago • 0 comments

Say you have two rooks at a1 and a2. If you start the a2 rook moving to a8, you aren't allowed to move the a1 rook to a7 until the first rook has started travelling off of a7 (to a8).

I suspect that this rule is why the controls sometimes feel bad - it's not intuitive (nor even fair) that pieces will block each other in this way, and the UI doesn't communicate this hidden rule.

I thereby propose one of these adjustments (in order of approximately decreasing freedom of movement):

  1. Moving pieces are not considered for calculations (outside of not being able to tell two pieces to travel to the same square). Thus, you could move a queen from a1 to e5 and still put pieces on/through b2, c3, and d4, and even put pieces through e5 up until the queen arrives at e5 (either defined as "the queen fully stops moving" or "the queen starts entering the destination square").
  2. Collisions are calculated as if pieces moved instantly to their destinations. Moving a queen from a1 to h8 can be followed by a pawn move from c2 to c3 (at any time, even if a collision will occur), but you cannot reverse the order of the moves. On the other hand, if you start moving a queen from a1 to d4, you cannot move a rook from d3 to d8, even if the rook would clear d4 before the queen gets there.
  3. Piece movement is blocked if a collision will occur when one of the pieces will have stopped moving (but collisions where both pieces are still moving are ignored). If moving a pawn from c2 to c3, you cannot then move a queen from a1 to h8 -- but you can move the queen from a1 to h8, and once the queen is fully in c3, you can then initiate the pawn from c2 to c3, since the queen will be fully out of the square by the time the pawn finishes moving. Note: with the queen moving from a1 to h8, you could also move a pawn from c2 to c4 at any time, since if they collide they'd both be moving.
  4. Pieces are not allowed to collide, but time is considered, enabling the rook movement described originally (a2a8 followed immediately by a1a7 would be allowed). You could also move a queen from a1 to h8 and then move a piece through c3, d4, etc so long as the piece will be travelling out of the square before the queen starts entering it.
  5. Change nothing.

(In all cases, if a collision between friendly pieces occurs, they simply pass through each other.)

I think the second option might be what the original Kung Fu Chess used? I think that options 1, 2, or 4 might be the most intuitive, though I suspect the 4th will result in more unexpected control failures, such as moving a queen from a1 to a8 and a bishop from f2 to a7, where there is a period of time in which the bishop move would fail due to the pieces colliding on d4. Options 1-3 would all allow the bishop move at any time

If options 3-5 are chosen, then ideally the UI should reflect this. When attempting to move a piece (by hovering/clicking/dragging over an invalid target square), show what's wrong, perhaps by highlighting in red both the collision square and the piece that would be collided with.

chess123mate avatar Jul 04 '23 02:07 chess123mate