Skip to content

Latest commit

 

History

48 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pong AI Network Game

Overview This repository contains a network-based Pong game where two computers (Server and Player) compete against each other with AI-controlled paddles. The game increases in difficulty as the players progress through levels, with paddle and ball speeds dynamically adjusting based on the game state. The server and player communicate over a network, enabling a head-to-head AI competition.

Features Dynamic Difficulty: As the game progresses, both the ball and paddles increase in speed, making the game more challenging. AI-Controlled Paddles: Both the server and player paddles are controlled by AI, with the AI's reaction time and behavior becoming more challenging at higher levels. Level Progression: The game moves up a level every time one of the players reaches 25 points, with the difficulty scaling accordingly. Winner Announcement: After each level, the game displays the winner and resets the scores for the next round. Files

  1. Server-Pong.py This script runs the server side of the Pong game. The server:

Initializes the game and waits for the player to connect. Handles all game logic, including ball movement, collision detection, and AI paddle movement. Sends the game state (ball position, server paddle position, and scores) to the player. Receives the player's paddle position and updates the game state accordingly. Increases the difficulty as the game progresses and displays the winner after each level. 2. Player-Pong.py This script runs the client side of the Pong game. The player:

Connects to the server via a specified IP address and port. Receives the game state from the server and updates its paddle position using AI. Sends the updated paddle position back to the server. Displays the game screen, showing both paddles, the ball, and the current score.

About

Two PCs play each other in Pong

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages