Blindfold Pool: Where are the balls?

My prior post talked about how to aim and shoot in Blindfold Pool, but I didn’t think about how someone would find the balls to shoot at.

circle with intersecting lines

My first attempt was to let you drag your finger around on the screen, and if your finger touched a ball, it tells you which ball it is, such as ball 2, green solid.  If that’s the ball you want, you double tap, and then aim and shoot at one of the pockets.  Sounds good, doesn’t it?

What I didn’t realize was that without seeing the screen, you would have no idea which ball had a clear path to the target pocket.  First I tried solving this through geometry – determining the angles for the ball, and seeing if that path would intersect other balls.  It was about 70% effective.

Then I tried emulating your shot.  The game would remember where all the balls were on the table, take the shot, and look at the results.  If the ball made it into the pocket and didn’t hit any other balls on the way, it would tell you the ball had a clear path.  If it hit another ball, it would tell you there was no clear path.  Then the game would put all the balls back where they were, and let you take your shot.

The problem with that approach was it took several seconds to complete the emulation, and balls didn’t stop moving completely for another 5 to 10 seconds.  That made the game too awkward.

My third attempt was to draw lines on the screen from the ball to the pocket, and then look at the screen to see if the line intersected another ball.  That’s fairly easy to do with the graphics on the iPhone.  You can draw a line on the screen and then have the iPhone software tell you what other shapes on the screen are touching the line.

That kind of worked, but even if the center of your ball doesn’t touch the edge of another ball, the left or right sides of your ball might touch another ball.  In the end, I had to draw about 6 lines, such as the center of the ball to pocket left edge, or the ball left edge to pocket right edge.

I sent out that version to the testers, and while it let them discover which balls to shoot, they said it took way to long to find which of the 15 pool balls had a clear shot.  Next blog – how we solved that.





Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s