
carrom is a board game played a lot across south asia. you flick a heavier piece called the striker to knock smaller pieces into the four corner pockets. this is my version of it on the computer.
you move the striker along your line, aim it with the mouse or keyboard, and pick how hard to hit. a line shows where it's going to go. the pieces bounce off each other and the edges, and slow down like they would on a real board.
it follows the normal rules. each piece is 1 point. the red queen is worth more, but you have to pocket another piece straight after or it goes back on the board, and fouls like pocketing the striker cost you. two players take turns and the score updates as you go.
getting the pieces to move realistically was the hardest part. next i'd like to add online play and better graphics.
carrom is a board game played a lot across South Asia. you flick a heavier piece called the striker to knock smaller pieces into the four corner pockets. this is my version of it on the computer, built in Python with Pygame.
you move the striker along your line, aim it with the mouse or keyboard, and pick how hard to hit. a line shows where it's going to go. the pieces bounce off each other and the edges, and slow down like they would on a real board.
the board has four corner pockets, eighteen carrom men (nine black and nine white) arranged in the usual circle in the middle, and the red queen sat in the centre. each player gets a striker they can slide along their baseline before the shot.
it follows the normal rules. each piece is 1 point. the red queen is worth more, but you have to pocket another piece straight after or it goes back on the board, and fouls like pocketing the striker cost you. two players take turns and the score updates as you go.
getting the pieces to move realistically was the hardest part. velocity and direction have to carry through after a hit, collisions between pieces have to transfer momentum in a way that doesn't look wrong, and friction has to slow everything down so nothing slides forever. rebound off the edges matters too, cos a shot that kisses the cushion is half the game in real carrom. most of the fiddly time went into those parameters until a shot that looked right also felt right.
aiming is mouse or keyboard, with a trajectory line so you can see the intended path before you commit. power is a separate control, soft for placement shots and harder when you want to scatter. once the pieces stop, the turn flips to the other player.
next I'd like to add online play and better graphics. the physics are the bit I'd keep as-is. the look and a real multiplayer layer are the bits that still feel unfinished.
Sign in to join the conversation