Skip to content

LezardSC/ft_transcendence

 
 

Repository files navigation

ft_transcendence is the final project of the Common Core of 42 school.

Screenshot 2024-08-05 at 15 10 31

What is Transcendence ?

This project consists in creating a website to take part in a competition of the famous game Pong!

The aim of the project is to immerse students in a project they have no experience of. They have to learn Web development from scratch in order to successfully complete the project.

They are a mandatory part to this project, and a bunch of modules to choose from to complete it.

You can see read the whole subject here. There are the modules we chose :

image image image image image image

Getting Started

  • go at the root of the repository.
  • type make in the terminal.
  • Go to https://127.0.0.1:8000 in you browser, or https://YOUR_IP_ADDRESS:8000
  • You will need the .env for the project to work correctly.

Features

  • User authentification with e-mail confirmation
  • Translations support for English, French and Spanish
  • Pong video game
  • Online tournaments
  • 3d modeling
  • Blockchain Implementation
  • AI

Frontend

This using the following stack:

Modules

We implemented a module system, you can read more about it here

This makes our code :

  • more reusable
  • more refactorable
  • more categorized
  • less prone to errors

Translations

We implemented a library-free translation system, which you can learn about here

It is :

  • fast
  • easy to update
  • not very feature rich
  • moderately scalable

Backend

This using the following stack:

42 Authentification

You can create an account and login using a password-free authentification with your 42 account. I will retrieve your school's profile picture, username and email.

image

Game

The Game is a modern twist on the classic Pong, built with JavaScript and Three.js. this game offers both Quick Play and Tournament modes. Choose from 4 characters and compete to become the Pong champion!

Features

  • Quick Play: Instantly find and play against another player online.
  • 8-Player Tournament: Compete tournament with 8 participants max.
Screenshot 2024-08-05 at 15 13 50 Screenshot 2024-08-05 at 15 19 55 Screenshot 2024-08-05 at 15 20 32 Screenshot 2024-08-05 at 15 29 30

This using the following stack:

Blockchain

Each time a tournament is completed, the result of each match in the tournament is sent to the blockchain. When the transaction is complete, the "see on blockchain" button appears, allowing you to view the transaction directly and check the information (click on 'show more' then 'View input as UTF-8').

The display is difficult to read, but the order is always: "tournament name, tournament winner's name, then each match in the following order: 'player 1, player 1's score, player 2, player 2's score, match winner's name'". Screenshot 2024-08-05 at 15 24 52

This using the following stack:

Address of the Smart Contract: 0xD7CFDC73171139dbd48f80c23974712D4c5952AB

AI

An AI agent is implemented in the game using a deep neural network. The AI is trained during games between two human players so it can reach competitive levels of play.

Core Features:

  • AI plays Pong using supervised learning.
  • Trained using TensorFlow and a deep neural network.
  • Adjustable difficulty levels or training parameters.

Technologies used :

made with @gclement42, @maujogue, @LezardSC, @boulatrousse, @MarcelCerdan

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 46.2%
  • JavaScript 37.8%
  • HTML 9.5%
  • CSS 5.9%
  • Makefile 0.3%
  • Dockerfile 0.2%
  • Shell 0.1%