Bottle Toss


Bottle Toss:

A Book ++ Assignment


Sadiq Malik

Omar Qureshi

Julianne Uptegrove 


Bottle Knock-Down is an interactive work using pubnub, the p5 web editor, and the matter.js library (available here Using the chosen book, Ontario Soda Water Bottles by M. Carter and J. Hostetler, as a prompt, the original idea was to create a bottle flipping simulation, inspired by the bottle flipping trend that involves throwing a bottle and having it land upright. However, after testing out the idea it was decided to simplify and instead replicate the carnival game in which bottles are knocked over using a ball. The project uses four buttons (titled; Ball 1, Ball 2, Ball 3, and Reset Balls) which each either relate to a ball in the sketch, or reset the original position of the balls. Participants are able to press these buttons to launch the balls in an attempt to knock over glass bottles on the opposite side of the screen.  


Project Development 

fig1  fig2
Fig. 1 First testing of the project.  Fig. 2 Splitting the screen into sections. Getting the objects on screen and applying matter.js to them
fig3  fig4
Fig. 3. Applying images to the game Fig. 4. Second web application to control what is displayed on the main screen

Logic/Connection of the Network 


logc1 logic2


Final Work


 final-1  final-2


Video of full demonstration: 


Working Code


Working Files 

Load this link on a T.V or laptop:

Load this link on your cell phone:

Leave a Reply