Initial attempt
Attempted in commit 90321a3 ("Block drag into out-of-bounds or occupied cells") which added a rubber-band check in GameSwipeDetector._on_GSD_drag_event: candidate cell under finger is computed via Helpers.pixels_to_slot, and the piece's pixel position only updates if the cell is in-bounds and Helpers.board[cell] == null.
However,
Dragging from left to right past a wall, the dragged piece stops correctly for a while and then "teleports" through the wall once the finger reaches the other side. The piece should remain stuck, or slide up and down with a bit of friction. (maybe we need real 2D physics)
Dragging from right to left past a wall, the dragged piece stops only once it has reached the left edge of the nailed piece but should have blocked on the nailed piece's right side edge. It then "teleports" once the drag has gone beyond the wall. (maybe we need real 2D physics)
Known/expected gaps in current implementation:
- Only the final candidate cell is checked. A fast drag could in theory teleport across a 1-cell-tall obstacle in a single input event since the path between old and new finger pos isn't walked.
(maybe we need real 2D physics)
Future enhancement (the longer-term reason this matters): a slowly-descending barrier ("wall coming down") that the dragged piece must also respect. Conceptually a moving nailed-tile boundary — pieces can be dragged below it, not above.
Discussed 2026-05-05 as a v2 mechanic to layer on top of the basic collision once core gameplay is solid. Generalization of #25.
Initial attempt
Attempted in commit
90321a3("Block drag into out-of-bounds or occupied cells") which added a rubber-band check inGameSwipeDetector._on_GSD_drag_event: candidate cell under finger is computed viaHelpers.pixels_to_slot, and the piece's pixel position only updates if the cell is in-bounds andHelpers.board[cell] == null.However,
Dragging from left to right past a wall, the dragged piece stops correctly for a while and then "teleports" through the wall once the finger reaches the other side. The piece should remain stuck, or slide up and down with a bit of friction. (maybe we need real 2D physics)
Dragging from right to left past a wall, the dragged piece stops only once it has reached the left edge of the nailed piece but should have blocked on the nailed piece's right side edge. It then "teleports" once the drag has gone beyond the wall. (maybe we need real 2D physics)
Known/expected gaps in current implementation:
(maybe we need real 2D physics)
Future enhancement (the longer-term reason this matters): a slowly-descending barrier ("wall coming down") that the dragged piece must also respect. Conceptually a moving nailed-tile boundary — pieces can be dragged below it, not above.
Discussed 2026-05-05 as a v2 mechanic to layer on top of the basic collision once core gameplay is solid. Generalization of #25.