Pong with Feedback!

Photo_022306_001.jpg

Our Pong game now has feedback on the network controllers. The little colored lights respond to the progress of the game locally, so that theoretically, the screen could be in Paris, with one player in Detroit and the other in Jakarta. Cool.

The updated code for the controllers and the game isn’t thoroughly commented yet, but it does work nicely.

We explored the PIC’s DEBUG features, and Java’s Sockets, including DataInputStream and DataOutputStream for a system that runs very smoothly using primitives to communicate both the paddle states and the game progress (via LEDs for now). The Processing program contacts each controller at their fixed IP address, and opens a socket, then data streams to and from each. I’ve created a diagram of this connection. An upgraded version should probably use a mirroring server to avoid issues with dynamic IP addresses and firewalls, but the underlying code would be very similar.

Scroll to Top