On this page:
5.1 Networked pong
5.92

5 2/7: A Universe of Pong

Due: 2/7 at 11:59pm.

5.1 Networked pong

Remember your pong game from two weeks ago? Remember how crowded it was at the keyboard when you challenged your roomate to a late-night match? This week, we’re going to fix that.

The solution to fixing this is to support playing pong between different computers. We’ll use the the universe system.

You should adapt your current pong design to the new setting. You’ll need to write both a client program and a server program. The server program should enforce that clients play by the rules—no moving too fast, or putting the ball in the wrong place, or other such trickery is allowed.

When you submit the assignment, make sure that you test all of your code, even the parts that deal with communication. Also, provide an easy way to run a multi-player version of your game.

Of course, if there were any aspects of your Pong game for last week that you weren’t happy with, you can take advantage of this week to improve those as well.