ROBBESTAD ARCHIVErecovered 2026-09-01

ARCHIVE FILE

Billiards

written
archived
source
svenardo

I was searching the web for something related to one of my old games when this image turned up from March 8 2014 (imgur)

I remember coding this in Cocos2d-x, but stopped developing on it after getting annoyed with the physics simulation and the general awkwardness of working with the iPhone and that particular framework.

I wanted to revisit the game in a modern environment, so I fired up a new Unity project and did some prototyping. I implemented the balls, the bed and the walls -- most things except the pockets -- and focused on the physics simulation. The video below is just a few hours work, and I think it looks good.

The key to getting the balls move somewhat accurately is a mix of tweaking the physics settings and creating physics materials for the balls, the billiard bed and the side walls. The balls need a high drag and bounciness, friction needs to be low and you need to adjust the sleep threshold so that the balls stop rolling faster than they would do by default.

← index