Connect with us


Snooker 3D – Simple snooker in Python

Snooker is a simple game that was programmed in Python using the HARFANG 3D framework.

This project implements the simplest possible gameplay loop, relying on the Bullet physics engine for the most complex part of the simulation. This project can be used as a basis for the development of a more complex gameplay, or for AI training by plugging directly into the code that manages the game interactions.

How to run the Snooker ?

The easy way

  1. Download the Windows release (
  2. Unzip it in a local folder
  3. Double click on 2-start_game.bat if you run the game on a low-end machine
  4. Double click on 2bis-start_game - AAA quality.bat if you run the game on a high-end machine with a discrete GPU (GeForce GTX850 or above)

Using your own Python interpreter

  1. Get Python 3
  2. Get HARFANG 3D
    1. Either download it from the HARFANG website and follow the install instructions
    2. Or, using PIP in the command line, type ‘pip install -Iv harfang==3.2.0
  3. Clone/download this repository
  4. run python to launch the game
  5. run python –aaa to launch the game with AAA quality

How to play ?

  1. Click on one of the 3 balls with the left mouse button.
  2. Aim by moving the mouse on the horizontal axis.
  3. Shoot with the left mouse button.
  4. To reset the game, press the right mouse button.
  5. Press ESC to quit.
Snooker 3D on GitHub:
Platform: Python
⭐️: 4