Skip to content

FreddyMSchubert/42_transcendence

ย 
ย 

Repository files navigation

๐Ÿ“ 42 Transcendence - Overengineered Pong

A modern, full-stack implementation of the classic Pong game built as the final project for 42 School. This project demonstrates advanced web development concepts including real-time multiplayer gaming, AI opponents, tournament systems, and comprehensive user management.

๐ŸŒŸ Features

๐ŸŽฎ Game Modes

  • Local Multiplayer: Play with friends on the same device
  • Remote Multiplayer: Challenge players from anywhere in the world
  • AI Opponents: Battle against intelligent AI with adaptive difficulty
  • Tournament System: Organize and participate in structured tournaments
  • Multiple Players: Support for more than 2 players simultaneously

๐ŸŽจ Game Customization

  • Power-ups and special attacks
  • Multiple game maps and environments
  • Customizable paddle speeds and game physics
  • User-friendly settings interface
  • Default classic mode for purists

๐Ÿ‘ค User Management

  • Secure Authentication: Registration, login, and session management
  • OAuth Integration: Login with Google
  • Two-Factor Authentication (2FA): Enhanced security with JWT tokens
  • User Profiles: Avatars, display names, bios, and statistics
  • Friends System: Add friends and see online status
  • Match History: Detailed game statistics and performance tracking

๐Ÿ’ฌ Social Features

  • Live Chat: Real-time messaging between users
  • Direct Messages: Private conversations
  • Profile Access: View other players' profiles through chat
  • Tournament Notifications: Stay updated on upcoming matches

๐Ÿ“Š Statistics & Analytics

  • User Dashboard: Personal gaming statistics and achievements
  • Game Analytics: Detailed match outcomes and historical data
  • Visual Charts: Data visualization for performance tracking
  • Match History: Complete record of all games played

๐Ÿ”’ Security

  • HTTPS/WSS: Secure connections for all communications
  • Password Hashing: Strong encryption for user credentials
  • SQL Injection Protection: Secure database queries
  • XSS Prevention: Protected against cross-site scripting
  • Route Protection: Authenticated access to sensitive areas
  • Environment Security: Secure configuration management

๐Ÿ› ๏ธ Tech Stack

Backend

  • Runtime: Node.js
  • Framework: Fastify
  • Database: SQLite
  • Authentication: JWT with 2FA support
  • Real-time: WebSocket (WSS)

Frontend

  • Language: TypeScript
  • Styling: Tailwind CSS
  • Architecture: Single Page Application (SPA)
  • Browser Support: Latest stable Firefox and modern browsers

DevOps

  • Containerization: Docker & Docker Compose
  • Web Server: Nginx
  • Development: Hot reload and development containers

๐Ÿ“‹ Available Commands

Use make to see all available commands:

  • make start - Start the application
  • make stop - Stop all services
  • make build - Build Docker images
  • make logs - View application logs
  • make clean - Clean up containers and images

๐ŸŽฏ Project Goals

This project implements all major modules required for the 42 Transcendence project:

  1. Backend Framework โœ… - Fastify with Node.js
  2. User Management โœ… - Complete authentication system
  3. Remote Authentication โœ… - Google OAuth integration
  4. Remote Players โœ… - Real-time multiplayer gaming
  5. Multiple Players โœ… - Support for 2+ players
  6. Live Chat โœ… - Real-time communication
  7. AI Opponent โœ… - Intelligent game AI
  8. Two-Factor Authentication โœ… - Enhanced security
  9. Game Customization โœ… - Power-ups and custom maps

Score: 10/9 Major Modules ๐ŸŽ‰

๐Ÿ† Tournament System

  • Bracket Management: Automatic tournament bracket generation
  • Match Scheduling: Turn-based player progression
  • Live Updates: Real-time tournament status
  • Player Notifications: Alerts for upcoming matches
  • Results Tracking: Complete tournament history

๐Ÿค– AI Implementation

The AI opponent features:

  • Human-like Behavior: Simulates keyboard input with realistic timing
  • Adaptive Difficulty: Adjusts to player skill level
  • Strategic Decision Making: Intelligent positioning and movement
  • Power-up Utilization: Uses game modifications effectively
  • Performance Optimization: Efficient game state analysis

๐Ÿ“ Project Structure

42_transcendence/
โ”œโ”€โ”€ app/                    # Main application code
โ”œโ”€โ”€ nginx/                  # Nginx configuration
โ”œโ”€โ”€ .devcontainer/         # Development container setup
โ”œโ”€โ”€ docker-compose.yml     # Multi-container setup
โ”œโ”€โ”€ Dockerfile            # Application container
โ”œโ”€โ”€ Makefile             # Build and run commands
โ”œโ”€โ”€ package.json         # Node.js dependencies
โ””โ”€โ”€ README.md           # This file

๐Ÿ“„ License

This project is part of the 42 School curriculum. Please respect the academic integrity policies of 42 School.

๐ŸŽ“ 42 School Project

Project: ft_transcendence
School: 42 Heilbronn
Topics: 42 42heilbronn 42transcendence transcendence


"The last project of the common core - where we overengineer Pong to perfection!" ๐Ÿš€

๐Ÿ”— Links

About

๐Ÿ‘พ Custom Mini Web Framework to build a social pong an overengineered competition website.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 84.0%
  • EJS 11.9%
  • CSS 3.5%
  • Other 0.6%