Skip to content

Netsurai/billard-adv-vpython

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 

Repository files navigation

billard-adventure

Hello guys,

This is my first attempt to create a game in python via the package vpython. It is a billard game (8-ball pool) where you can play against a friend.

It's not perfect yet, but gives a good insight into mathematical and physical challenges of programming a billard game.

I hope the script can be helpful for others.

Have fun browsing the code and playing.

Installing and running:

  • Install vpython package:

    conda install -c vpython vpython or pip install vpython

    https://vpython.org/presentation2018/install.html

  • clone repository:

    git clone git://github.com/Szuendo/billard-adventure.git

  • run Main.py (in ../billard-adventure/billard_simulation):

    cd billard-adventure/billard_simulation

    python Main.py

Mouse:

  • Clicking 'set kickoffdir' enables aiming by moving the mouse.
  • Clicking 'set kickoffvel' enables increasing/decreasing shot power by moving the mouse.

Keys:

  • 'D': Allows the cueball to be played after a shot power is specified. (after the shot power is specified wait 3 seconds before clicking 'D' to play the cueball)

Credits:

About

Billard Game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%