Run the "Oracle Billiards" shortcut.


Controls:

SPACEBAR to shoot the cue ball.

W, S control the power of the shot (see the meter to the right of the play field).
A, D rotate the play field (you always shoot the cue ball straight up).

Z, C rotate the play field more slowly so that you can see the ball interactions better.

1, 2, 3 restart the game with different rack setups.

There's no way to win (or even sink balls into pockets, or anything like that).


Questions to Jonathan Blow, jon@number-none.com.

Much of Oracle Billiards is written in the programming language Lerp (http://lerp.org).  
Though this is a pretty old version of Lerp (from 2004) so if you want to know what
the language is like, this isn't the greatest example.




Here's an explanation of what this is all about (excerpted from an interview Arthouse Games
and not particularly edited):




The idea for Oracle Billiards came about one day when I saw the film Matrix Reloaded.  The
film was terrible, for sure, but there were some very specific things about it that 
triggered me.  One of the things I liked about the first Matrix movie was the character 
of the Oracle; the first movie seemed to have set up some interesting questions about 
her, but Reloaded dropped the ball completely, and I was really pissed off.

It seemed to me that the ability to see the future was fundamentally way, way more 
interesting than those guys were making it out to be.  So I thought about how to explore 
that in a game, and pretty quickly I came up with the design behind Oracle Billiards.  
It's a standard pool game -- you knock the cue ball and it hits some other balls, and 
they roll for a while and stop.  In all games like that there is a physics simulator 
that controls what the balls do -- how they slow down, how they bounce off walls and 
each other.  All that stuff is modelable by some basic math that you learn in high 
school or college.

The interesting thing, though, is that this math is deterministic -- given a certain 
starting state of the balls (positions, velocities, sizes, coefficients of friction, 
and what have you), there is exactly one answer for any future point in time about 
where the balls will be, unless you decide to explicitly introduce a random element.  
Some pool games do add such a random element, but I decided to keep it out of the 
design here.

So for a particular shot direction and force, there's exactly one future about how 
the balls will come to rest.  The premise behind Oracle Billiards is that you can 
see that future before you make the shot.  (Nobody had really done this before, 
not only because it's a different idea but because it requires a lot of CPU power.  
In order to show you where the balls end up, every frame the game has to crank through 
all of the physics computations for the 30 seconds or so that it would take the balls 
to come to rest... in 1/60 of a second or so.  But computers are fast now, so I figured, 
why not?)

This ability to see the results of the shot before you shoot, fundamentally changes the 
nature of the game.  It changes things from an aiming game into a strategy game; the 
aiming isn't a problem, you just need to decide strategically where you want the balls 
to end up, so that you sink a lot of yours, few of your opponents, and give him a poor 
position to make his own shot.  I'm not an expert billiards player, but it seems that 
this is a lot more like the way the game is for expert players -- they are pretty good 
at making the shots, so they are really planning ahead and making choices about which 
shots to take.  So in addition to the basic mind-expanding nature of the game, it also 
gives you something like a glimpse into what the game is like for a small percentage of 
elite players, and that is interesting.

This was a little prototype and never reached a stage of serious development.  I never 
got to the point of even adding pockets so that you can sink balls and win.  The reason 
is that, whereas the game accomplished what I set out to do, the way it felt to play was 
not what I envisioned.  I had hoped it could be an interesting strategy game, but it's 
not, really.  The reason is that the physical interactions of the balls are far too 
chaotic for the visualization to help you make a plan.  Small differences in angle are 
magnified hugely with each collision, so that slight changes in your aiming direction 
result in very fast changes to where the balls end up, so that it's very difficult to 
inspect the space and really make any kind of informed decision from the available choices.

My first attempt to deal with this problem was to add in the keys so that you can turn 
your shot very slowly and precisely.  But it didn't help enough, so I decided that the 
billiard-balls-physics phenomenon was inherently too chaotic for this kind of game.  
(And this chaos also illustrates that the game in't that close to what it's like for 
an expert to play, either -- trying to capture that, to discover how those players 
really see the play field and separate some possibilities from all the others, would 
be a really interesting exploration in cognitive science). 



[Despite the fact that the strategy part didn't work out, there were some interesting 
side-effects from the game that I wouldn't expect.  For example: watching balls rolling, 
you see two of them heading toward each other; normally you wouldn't be sure yet whether 
they are going to collide, but you see that the endpoints for the balls are off to the 
sides, not directly in their paths -- so they must collide, and you can visualize the 
collision in your head, but what you envision doesn't necessarily put the balls where 
it says they will go.  But then the collision happens, and they go right there.  It 
feels pretty surreal.] 