Skip to content

pauldahacker/transcendence

Repository files navigation

Transcendence: Pong Platform

Transcendence Home Page

Pong with user management & authentication, tournaments, 3D gameplay, AI opponent, blockchain integration and game customization. Designed as a containerized microservices architecture.

Stack: Node.js • TypeScript • Fastify • Babylon.js • SQLite • Avalanche Blockchain • Docker • Elasticsearch • Tailwind


Completed Modules

Major Modules

  • Use Fastify with Node.js to build the backend

  • Use Avalanche and Solidity to store the score of a tournament in the Blockchain

  • Standard user management, authentication, users across tournaments

  • Introduce an AI opponent

  • Infrastructure setup for log management

  • Designing the backend as microservices

  • Use advanced 3D techniques

Minor Modules

  • Use Tailwind CSS in addition of the TypeScript to build the frontend

  • Use SQLite database for the backend

  • Game customization options

  • Expanding browser compatibility

See full checklist.

Total Score: 9/7 points (exceeded project requirements)


Installation

# Clone repository
git clone <repo-url>
cd transcendence

# Display available commands
make

# First-time setup and launch
make up

This will:

  1. Generate .env file with random secrets
  2. Create SSL certificates
  3. Build all Docker images
  4. Start all services

Then go to

https://localhost

on your browser.

Available Commands

Command Purpose
make up Build and start all services
make down Stop all services
make clean Stop services and remove database
make test Run unit tests for all services
make logs Start ELK Stack (logging dashboard)
make load Load sample data into database

Testing

make test

Tests cover:

  • User registration and authentication
  • Tournament score tracking
  • Game state management
  • API endpoint validation
  • Blockchain contract interactions

Features

Pong Engine

  • 2D rendering with state synchronization
  • Hidden canvas game loop feeding 3D visualization
  • Collision detection and physics simulation

AI Opponent System

AI Gameplay

  • Intelligent paddle control algorithm

User Management

  • Secure JWT-based authentication
  • Password hashing with bcrypt
  • User profiles with statistics
  • Friend request/management system
  • User search and discovery

Game Customization

Game Customization

  • Adjustable paddle speed and ball velocity
  • Multiple map/texture themes
  • Power-up toggle

Tournament System

  • Tournament creation and bracket management
  • Score calculation and leaderboards
  • Historical match tracking
  • Integration with blockchain for permanent record

3D Graphics

3D Gameplay

  • Babylon.js 3D rendering
  • Textured game environments
  • Dynamic camera controls
  • Shader-based visual effects
  • Real-time state synchronization with 2D game loop

Blockchain (Avalanche)

Blockchain Integration

  • Smart contract-based tournament registry
  • Immutable score storage on-chain
  • Solidity contract deployment and interaction
  • Fuji testnet integration

Log Management

ELK Stack Logging

  • Centralized log aggregation with Elasticsearch
  • Structured logging across all services
  • Kibana visualization dashboard
  • Real-time log streaming and analysis

Game State Management

TypeScript-based immutable game state:

interface GameState {
  paddle1Y: number;
  paddle2Y: number;
  ballX: number;
  ballY: number;
  ballSpeedX: number;
  ballSpeedY: number;
  score1: number;
  score2: number;
  gameRunning: boolean;
  ballFlash: number;
  powerUpActive?: boolean;
}

Documentation & References

Project Documentation

Backend Tools & Libraries

Framework & HTTP

Database

  • better-sqlite3 - SQLite database driver with connection pooling
  • SQLite - Lightweight relational database

Security

  • bcrypt - Password hashing library
  • UUID - Unique identifier generation

Blockchain

Logging & Monitoring

Frontend Tools & Libraries

Language & Build Tools

  • TypeScript - JavaScript with static typing
  • Vite - Lightning-fast build tool and dev server
  • Tailwind CSS - Utility-first CSS framework

3D Graphics & Game Engine

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors