Pong13 Aug 2015
Here’s a little experiment. We tried to port Pong to Processing! Processing simulates the game mechanics of the game while sending OSC messages to PureData that is involved in real-time sound synthesis.
How to make it works
First of all you have to:
- download and install PureData Extended version;
- download and install Processing;
- download and install Andreas Schlegel’s oscP5 Processing library. You can use the Add Library… utility directly from Processing or you can visit this web page.
Then you have to:
- download and unzip our Pong.zip archive: you can download it from the download section below;
- double-click on Pong.pde file to open Processing;
- double-click on Pong_sounds.pd file to open PureData;
Setup and Test the Pong sound application:
- Enable the Audio Output clicking on Audio_ON button;
- Click on keyb_TEST button to test the Application. Use your keyboard. Press any number key from to or . You can adjust the volume using the Volume slider;
- If everything is ok, click on OSC button to enable OSC messages receving;
Start the GAME !!!
- To start the game press RUN button from the Processing IDE;
- PLAYER 1 (Right) : ARROW keys, and ;
- PLAYER 2 (Left) : and keys;
Here you can download the Processing and PureData Pong Code.
This game needs a lot of improvements! For example:
- The game needs an intro screen where the player can select the difficulty level;
- What do you think about the gameplay? How about collision detection mechanisms?
- Does it sounds good to you? Maybe it’s better to change Square Wave to a Sawtooth Wave, or something like that :)
- And what if I want yo play alone against the PC? We have to implement a simple Artificial Intelligence algorithm for the opponent;
- Now it looks unnatural, what about adding a graphical effect to resemble playing it throug a CRT or Phosphor monitor? Maybe using GPU acceleration and one specific shader to do the job…
- What about an HTML5 version?
- Do you see more? try yourself and let us know!
If you find this article useful and you like it, please leave a comment below: let us know what do you think about it, we'd really appreciate it. Thank you very much and, as always, stay tuned for more to come!