pooltool is an open source sandbox game for pool/billiards developed for gamers and researchers alike
gamers can play different styles of pool (8-ball, 9-ball, etc.) in a 3D-rendered environment that emphasizes physical realism
researchers interested in pool physics, game theory, camera-projector systems, AI, robotics, and other billiards-related research topics can efficiently simulate shots using pooltool’s API, experiment with different physics models and shot evolution algorithms, and visualize programmatically-defined shots
Shots are evolved analytically, without the need for discrete time stepping (Leckie & Greenspan, 2005). This means that instead of collisions being detected, they are instead predicted, allowing the system to be advanced directly to the next collision/event. I discuss the algorithm extensively in this blog post
All physical interactions (ball-cloth, ball-ball interactions, ball-cloth, etc) are described in this blog post
Nice work, and impressive dedication to showing the math behind the body interactions. I also appreciate the YouTube video, it’s nice to see the original dev play around with a Panda3D game.
It’s been almost 2 years since my last update on pooltool. Usually that’s an indication that the project is dead, but I’m here doing CPR. In fact, despite the radio silence, I’ve been working on pooltool alongside what has been an eventful 2 years with finishing my PhD, starting a new job, moving countries, yada, yada, yada. During that time I could never find the energy to give a formal update on the project, but that’s coming to an end right now!
Since it’s been so long, there’s really no hope of giving any satisfyingly detailed report with commit hashes, correlating features with code snippets, etc. Instead I’m keep things relaxed with a devlog update. Please enjoy:
Congrats on finishing your PhD, and related personal achievements!
The usage of Numba looks to have significantly improved performance, to perhaps a fully playable degree!
For fun, I took your pool room and table models and made a quick implementation using Bullet. It’s quite bad! I can see now how your first-principles approach to the pool ball physics is key to supporting such a convincing billiards simulation. The main issue I’m having with Bullet is that the pool balls want to follow the slices of the tristrips as they roll over them, despite the surface ostensibly being perfectly planar.
Hey, that’s really cool! I wonder it would still be bad if the table had more sensible vertices? I learned Blender specifically for this project, so it’s a bit of a “vertex hell”.
In fact, when the project was nascent I didn’t even think it would ever be rendered in 3D or support user interaction–it was just some python code and matplotlib plots. Then I found Panda3D and the rest is history. But as a result of this, the code for simulation (the python API) and the code for visualization/game have remained uncoupled, so that one can simulate pool without ever opening a Panda3D scene or relying on the vertex data of objects.
But your investigation does have me wondering what kind of simulation could be achievable using Bullet…
First of all, congratulations and well done on completing your PhD!
And second, this is a pretty solid update: the game looks distinctly more pleasing to the eye, and it seems like the physics have been significantly improved!
From a combination of the JOSS publication, great documentation, and a little bit of love from the GitHub trending algorithm, pooltool is receiving a lot of positive attention
The engagement has been seen at the level of contributors as well. Last week someone contributed a new physics model for the ball-ball collision that provides a significant improvement in realism.
It is so cool to see a community begin forming around this project, and I certainly hope more people consider contributing in the future.
In particular, I think it would be awesome to see some contributors from the Panda3D community. Currently, pooltool offers some primitive game-like features but I’m not sure how strong the foundation I’ve laid is. I really think pooltool could become something wonderful with the help some skilled Panda3D programmers who could expand out the interaction/animation/game side of pooltool.