Skip to content

Pong game in Python with local multiplayer and network multiplayer modes

License

Notifications You must be signed in to change notification settings

diogodanielsoaresferreira/pong

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pong Game

Welcome to Pong Game, a modern take on the classic arcade game. This project features multiplayer gameplay, a server-client architecture, and smooth paddle controls, supporting both mouse and keyboard inputs.

Gameplay Screenshot


Features

  • Single Player Mode: Play against an AI opponent.
  • Local Multiplayer: 1v1 gameplay on a single machine.
  • Online Multiplayer: Connect to a server and compete with players remotely.
  • Intuitive Controls:
    • Keyboard (Arrow keys or W/S).
    • Mouse for precise paddle movement.
  • Server-Client Architecture: Ensures seamless communication between players.

Controls

  • Keyboard:
    • Arrow Up / W: Move paddle up.
    • Arrow Down / S: Move paddle down.
  • Mouse:
    • Move the mouse vertically to control the paddle.

How It Works

Architecture

  • Server:

    • Manages the game state and synchronizes paddle and ball positions.
    • Broadcasts game state updates to all connected clients.
  • Client:

    • Sends user input (keyboard/mouse) to the server.
    • Receives game state updates from the server and renders the game.

Communication

  • Built using WebSockets for real-time, low-latency communication.
  • Messages between client and server are sent as JSON objects.

Example Gameplay

Single Player

  • Compete against an AI that dynamically adjusts to your playstyle.

Multiplayer

  • Compete against your friend in the same computer.

Online Multiplayer

  • Connect to the server, create a game, and invite your friends.
  • Responsive paddle movements with minimal latency.

About

Pong game in Python with local multiplayer and network multiplayer modes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages