An augmented reality tic-tac-toe game where you play by throwing a yellow smiley ball into grid cells.
-
Install dependencies:
pip install opencv-python numpy
-
Test ball detection:
python quick_test.py
-
Calibrate your yellow ball (if needed):
python calibrate_ball.py
-
Run the game:
python ar_tictactoe.py
- Select 'B' for ball detection mode
- Throw your yellow smiley ball into any empty grid cell
- Game alternates between Player 1 (Red X) and Player 2 (Blue O)
- First to get 3 in a row wins the round
- Best of 3 rounds wins the match
ar_tictactoe.py- Main gamecalibrate_ball.py- Ball calibration toolquick_test.py- Test if ball detection workscamera_selector.py- Camera setup utilitysetup.py- Initial setup script
Ball not detected?
- Run
python quick_test.pyto check basic detection - Run
python calibrate_ball.pyto fine-tune settings - Ensure good lighting and clear background
Camera issues?
- Run
python camera_selector.pyto find your camera - Make sure no other apps are using the camera
- 'q': Quit
- 'r': Restart match
- 'c': Calibrate ball (from main menu)