diff --git a/README.md b/README.md new file mode 100644 index 00000000..cc7939d0 --- /dev/null +++ b/README.md @@ -0,0 +1,95 @@ +# ft_transcendence + +This is a project we've created at 42. It is a web app built with Next.js and NextUI. It utilizes blockchain technology for features such as user authentication and user management. The platform also includes visually engaging 3D games like Pong and TicTacToe, developed using R3F to enhance the user experience and more. + +## Modules Implemented + +- ### Web + - **Major module: Store tournament scores on the Blockchain** + > Integrates blockchain technology into the Pong website to securely store tournament scores. Uses Ethereum's testing blockchain and Solidity for smart contracts. + +- ### Gameplay and User Experienc + - **Major module: Remote players** + > Enables two distant players, each located on separate computers, to access the same website and participate in the same Pong game. + + - **Major module: Multiplayers (more than 2 in the same game)** + > Enables more than two players to participate simultaneously in the same game, each with live control. Customizable gameplay mechanics for different numbers of players. + + - **Major module: New Game with History Tracking and Matchmaking** + > Introduces a new game with user history tracking and matchmaking for an enhanced user experience. + + - **Minor module: Game Customization Options** + > Provides customization features for all games on the platform. + +- ### AI-Algo + - **Major module: Introduce AI Opponent** + > Adds AI player with human-like behavior for challenging gameplay. Goals: Strategic decision-making without A* algorithm. Adaptability to various scenarios. + +- ### Devops + - **Major module: Infrastructure Setup for Log Management** + > Establishes robust log management using ELK stack (Elasticsearch, Logstash, Kibana), deploying Elasticsearch for storage, configuring Logstash for data processing, setting up Kibana for visualization, defining retention policies, and implementing security measures. + + - **Major module: Designing the Backend as Microservices** + > Architect backend using microservices. Divide into smaller, loosely-coupled microservices. Define clear boundaries and interfaces. Implement communication mechanisms. Ensure each handles a single, well-defined task. + +- ### Graphics + - **Major module: Use of advanced 3D techniques** + > Introduces advanced 3D techniques using ThreeJS/WebGL for immersive visuals in Pong game. Enhances gameplay experience and revolutionizes visual elements. + +- ### Accessibility + - **Minor module: Expanding Browser Compatibility** + > Expands browser compatibility by adding support for an additional web browser. Ensures seamless access and usage for users. Thorough testing and optimization for consistent user experience. + + - **Minor module: Multiple language support** + > Implements support for multiple languages on the website to cater to a diverse audience. Includes a language switcher for easy language selection. Translates essential content into supported languages for seamless navigation and interaction. + +- ### Server-Side Pong + - **Major module: Enabling Pong Gameplay via CLI against Web Users with API Integration** + > Develops a Command-Line Interface (CLI) to play Pong against web users, integrating with the web application via API. Enables CLI users to join and interact with web players, with features including user authentication and real-time synchronization. + +### Total: 10.5 / 9.5 Modules ✅ + +## Installation + +Use the package manager [pip](https://pip.pypa.io/en/stable/) to install the requirements for the cli-client. + +```bash +cd cli-client +pip install -r requirements.txt +``` + +## Usage + +**Main Project:** +1. Navigate to the project's main directory. +2. Run `make` in your terminal to set things up. +3. Connect to localhost + +--- +**CLI-tool:** + +```bash +cd cli-client +python3 main.py -host [hostname] +``` +For help, you can use: +```bash +python3 main.py -h +``` + +## Showcase +![login](media/login.gif) + +### TicTacToe ❌ + +![TicTacToe](media/tictactoe.png) +![TTT_gameplay](media/ttt_gameplay.gif) + +### Pong 🏓 + +![Pong](media/pong.png) +![Pong_gameplay](media/pong_gameplay.gif) + +## Credits 🔑 + +The 3D model used in this project, titled "wallet.fbx," was created by [vijay verma](https://sketchfab.com/realvjy) and is licensed under [CC-BY-4.0](http://creativecommons.org/licenses/by/4.0/). You can find the original model [here](https://sketchfab.com/3d-models/walletfbx-4d63cef3d4c3430dae23c964cc3f1608). diff --git a/cli-client/requirements.txt b/cli-client/requirements.txt index 5261a7e8..c58896fc 100644 --- a/cli-client/requirements.txt +++ b/cli-client/requirements.txt @@ -1,2 +1,3 @@ requests==2.31.0 -python-socketio==5.11.1 \ No newline at end of file +python-socketio==5.11.1 +aiohttp==3.9.3 \ No newline at end of file diff --git a/media/login.gif b/media/login.gif new file mode 100644 index 00000000..468a6790 Binary files /dev/null and b/media/login.gif differ diff --git a/media/pong.png b/media/pong.png new file mode 100644 index 00000000..4dc43439 Binary files /dev/null and b/media/pong.png differ diff --git a/media/pong_gameplay.gif b/media/pong_gameplay.gif new file mode 100644 index 00000000..dfacb1f7 Binary files /dev/null and b/media/pong_gameplay.gif differ diff --git a/media/tictactoe.png b/media/tictactoe.png new file mode 100644 index 00000000..5b598445 Binary files /dev/null and b/media/tictactoe.png differ diff --git a/media/ttt_gameplay.gif b/media/ttt_gameplay.gif new file mode 100644 index 00000000..04b8ba14 Binary files /dev/null and b/media/ttt_gameplay.gif differ