A modern, feature-rich Tic-Tac-Toe game client built with JavaFX. Play locally with friends, challenge AI opponents, or compete online in multiplayer matches. XtremeO offers game recording, replay functionality, chat features, and an immersive gaming experience with audio and video effects.
- With Friend - Local two-player game on the same machine
- With CPU - Challenge AI opponents with three difficulty levels:
- Easy - Random move strategy
- Medium - Heuristic-based strategy
- Hard - Minimax algorithm with alpha-beta pruning
- Online Player - Multiplayer games via server connection
- Game Recording & Replay - Record your games and watch replays with auto-play functionality
- Game History - View and manage your past games with detailed statistics
- In-Game Chat - Communicate with opponents during matches (online mode)
- Lobby System - Join online lobbies, see active players, and invite others to play
- Player Profiles - Customize your profile with avatars and view your statistics
- Score Tracking - Track wins, losses, and draws with leaderboards
- Audio System - Background music and sound effects for game events
- Video Animations - Win/lose video animations for enhanced gameplay experience
Before running the application, ensure you have the following installed:
-
Java Development Kit (JDK) 21 or higher
- Download from Oracle JDK or OpenJDK
- Verify installation:
java -version
-
Apache Maven 3.6+
- Download from Maven Downloads
- Verify installation:
mvn -version
-
XtremeO Server (Required for online features)
- The server must be running and accessible
- Default configuration:
localhost:6666 - See Configuration section to change server settings
-
Clone the repository
git clone <repository-url> cd XtremeO-Client
-
Build the project
mvn clean install
This will download all dependencies and compile the project.
Run the application directly with Maven:
mvn clean javafx:run- Open the project in your IDE (IntelliJ IDEA, Eclipse, NetBeans, etc.)
- Ensure your IDE recognizes it as a Maven project
- Navigate to the main class:
com.mycompany.xtremeo.client.app.App - Run the
mainmethod
Note: For online multiplayer features, ensure the XtremeO Server is running and accessible at the configured address (default: 127.0.0.1:6666).
When you launch the application, you'll see the main menu with the following options:
- Play with CPU - Start a single-player game against an AI opponent
- Select difficulty level (Easy, Medium, or Hard)
- Optionally enable game recording
- Play with Friend - Start a local two-player game
- Optionally enable game recording
- Multiplayer - Access online multiplayer features
- Requires login/registration
- Connect to the game server
- History - View your game history and replay past games
- Sound Toggle - Enable/disable background music and sound effects
-
Local Games (With Friend or CPU)
- Select your game mode from the main menu
- For CPU games, choose your difficulty level
- Click on an empty cell to make your move
- The game will automatically detect wins, draws, and game over states
- Use the Reset button to start a new game
- Use the Back button to return to the main menu
-
Online Multiplayer
- Click "Multiplayer" from the main menu
- Login with your credentials (or register if you're new)
- Once logged in, you'll enter the lobby
- In the lobby, you can:
- See active players online
- View top players and leaderboards
- Send and receive game invitations
- Chat with other players
- Accept an invitation or send one to start a game
- During the game, you can chat with your opponent
- Games are automatically recorded
- Click "History" from the main menu
- Browse through your recorded games
- Select a game to view details
- Click "Replay" to watch the game
- In replay mode:
- Click the Play/Pause button to auto-play the replay
- The replay will automatically advance through moves
- Click again to pause
- When the replay finishes, click Play to restart from the beginning
- Games can be recorded when starting a new game (except online games, which are always recorded)
- Recorded games are saved to the
recorded_games/directory - Online games are saved per user in subdirectories
- Recorded games include all moves, player information, and game results
The project follows a well-organized package structure:
src/main/java/com/mycompany/xtremeo/client/
├── app/ # Application entry point and navigation
├── controller/ # FXML controllers for UI components
│ ├── lobby/ # Lobby-specific controllers
│ └── ...
├── model/ # Data models and view models
│ ├── auth/ # Authentication models
│ ├── common/ # Shared models
│ ├── game/ # Game-related models
│ ├── lobby/ # Lobby models
│ ├── recording/ # Game recording/replay models
│ └── viewmodel/ # View models for UI
├── service/ # Business logic and services
│ ├── audio/ # Audio management
│ ├── auth/ # Authentication services
│ ├── game/ # Game services
│ ├── lobby/ # Lobby services
│ ├── recording/ # Game recording services
│ └── video/ # Video playback services
├── network/ # Network communication
├── protocol/ # Protocol handlers and dispatchers
│ ├── dispatcher/ # Response dispatching
│ ├── envelope/ # Request/response envelopes
│ └── handler/ # Response handlers
├── ai/ # AI opponent implementation
│ ├── strategies/ # AI strategies (Random, Heuristic, Minimax)
│ └── evaluator/ # Board evaluation logic
├── game/ # Game engine and opponents
├── ui/ # UI components and factories
│ └── dialog/ # Dialog components
├── util/ # Utility classes
└── enums/ # Enumeration types
src/main/resources/
├── com/mycompany/xtremeo/client/
│ ├── audio/ # Audio files
│ ├── videos/ # Video files
│ ├── images/ # Images and avatars
│ └── view/ # FXML files and CSS styles
The server connection settings are configured in src/main/java/com/mycompany/xtremeo/client/network/NetworkConfig.java:
public static final String SERVER_HOST = "127.0.0.1";
public static final int SERVER_PORT = 6666;
public static final String PROTOCOL = "JSON";To change the server address:
- Open
src/main/java/com/mycompany/xtremeo/client/network/NetworkConfig.java - Modify
SERVER_HOSTandSERVER_PORTconstants - Rebuild the project:
mvn clean install - Restart the application
Recorded games are saved in the recorded_games/ directory at the project root. This directory is excluded from version control (see .gitignore).
- Local games:
recorded_games/game_<timestamp>.json - Online games:
recorded_games/<username>/game_<timestamp>.json
- Java 21 - Programming language
- JavaFX 23 - UI framework
- Apache Maven - Build and dependency management
- Gson 2.10.1 - JSON serialization/deserialization
- Ikonli 12.3.1 - Icon library (Material Design 2)
# Clean and compile
mvn clean compile
# Clean, compile, and package
mvn clean package
# Clean, compile, test, and package
mvn clean install# Run the application
mvn clean javafx:run
# Run with debugging (attach debugger to localhost:8000)
mvn clean javafx:run@debug
# Run with jar file
java -jar <jar-name>The pom.xml includes additional Maven execution configurations for IDE integration:
ide-debug- For automatic IDE debuggingide-profile- For profiling support
This project was developed by:
- Abdelrahman Waheed
- Wahid Qandil
- Mona Hamid
- Abdullah Elsobky
- Ali Abdulkareem
This project is part of an educational assignment.
This is a team project. For contributions, please coordinate with the team members listed above.








