Pong Ball Game by TechMaster

The pong ball game uses ProcessingJS and Javascript. Use your browser to view the source code of this page.

Essentially, the processing.min.js is included locally on our server. It is referenced in our html document displaying the game.

The processingJS code is then analyzed and properly references from its library (processing.min.js).

The script is then displayed on a canvas on the page. This allows the game to be seen.

The game uses a simple collision detection algorithm. It gets the height and width of the destructible blocks;

It then subtracts the blocks from the total frame height and is left with only the area of collision between the ellipse

and the destructible blocks. Once it detects this, it sets d_obj to true and the object disappears.

You can create your own game here. There you will find an extensive guide and online code test bed.

Please reference the source code of this page if you wish to figure out how to embed ProcessingJS onto your own website.