A modern, arcade-style Tic Tac Toe game built using C++ and SFML 3. This project evolved from a simple console game into a fully interactive GUI application with game states, animations, and polished UI design.
- Interactive GUI built with SFML
- Main menu (start screen)
- Player vs Player gameplay
- Turn-based logic (X and O)
- Win detection (rows, columns, diagonals)
- Draw detection system
- Restart functionality (press R)
- Mouse-based input system
- Hover highlight effect on grid cells
- Winning line highlight (arcade neon style)
- Clean UI with centered layout
- Subtle developer signature on screen
The game follows a structured state system:
| State | Description |
|---|---|
MENU |
Start screen |
PLAYING |
Active gameplay |
GAMEOVER |
Win / draw screen |
MENU → PLAYING → GAMEOVER
- C++
- SFML 3 (Graphics, Window, System)
- MinGW-w64 (GCC 14.2.0)
TicTacToe Game Project/
├── TicTacToe.cpp # Main source code
├── arial.ttf # UI font
├── orbitron.ttf # Accent/UI font
└── SFML libraries # Linked via system path
g++ TicTacToe.cpp -IC:\SFML\include -LC:\SFML\lib -lsfml-graphics -lsfml-window -lsfml-system -o TicTacToe.\TicTacToe.exeThat's it!
| Action | Input |
|---|---|
| Place X / O | Left mouse click |
| Restart game | R key |
| Start game | Mouse click on menu |
- Neon-style winning line effect
- Clean grid layout
- Centered menu design
- Soft hover highlight on cells
- Minimal but readable typography
- Subtle developer watermark
Built by Muhammad Ali (@ali4xk) Software Engineering Student | Game & Software Development Enthusiast
- AI opponent (Minimax algorithm)
- Sound effects (click / win / draw)
- Animated transitions between states
- Main menu buttons (Play / Exit)
- Mobile or web version (future port)
This project was built as a learning experience to understand:
- Game loops
- Event handling
- UI rendering with SFML
- State-based architecture
- Basic game design principles