← PROJECT ARCHIVE

Head Ball (Python)

A Pygame football game you can play against the computer or with two players on one keyboard.

PythonPygame 12.01.2021 — 15.10.2026

Head Ball (Python)↓ release.zip

A 2D Head Ball game built with Pygame. Originally started 6 years ago and now finished thanks to AI.

Play against the computer, or with a friend on the same keyboard. Matches last 60 seconds; jump, shoot, and head the ball into the other goal.

Head Ball match screen

Installation & Run

You need Python 3 installed.

  1. Download the package with the floppy disk at the top of this page and unzip it.
  2. Install the dependency:

    pip install pygame
  3. Run the game from the kafatopuPython folder:

    python app.py

Controls

PlayerMoveJumpShoot
Player 1 (Left)A / D (or Left / Right)W (or Up)Space / F
Player 2 (Right)Left / RightUpEnter / Down
  • P: Pause / Resume
  • R: Restart match
  • ESC: Back to menu / Exit

Files

FileWhat it does
app.pyEntry point and game loop
player.pyPlayer movement, jumping and shooting
ball.pyBall physics
ai.pyComputer opponent
ui.pyMenu, scoreboard and goal celebrations
sounds.pySound effects
*.png, env.jpgPlayers, ball, goals and the pitch