Breakout was my 10th grade year long project from Programming II.  The year after, they removed the course from the school, and started teaching 'concepts in computer science' instead.  I have to say, I preferred the programming course.  I can't really remember all of the folks that helped out with the project, but I'm certain there was someone named 'Jaime' that did a bunch of the background art.  The class was small enough that we actually split into just two groups.  Somewhat ironically, the class was supposed to be taught in Apple Pascal (Programming 1 was taught in Apple Basic).  Thankfully, the teacher (Ms. Mcormick) was pretty lenient and allowed us to use the super-powerful Borland Turbo Pascal instead =-)



while ((not Keypressed) and (not gameLost)) do
Begin
  if (paddleX >= 0) then
    PutImage(59840 + paddleX, 31, 11, ofs(paddleBackground^), seg(paddleBackground^));
  if (ballX >= 0) then
    PutImage(ballY * 320 + ballX, 15, 14, ofs(ballBackground^), seg(ballBackground^))
  else
    ballX := 160;
  CheckCollision;
  MovePaddle(paddle, paddleBackground);
  MoveBall(ball, ballBackground);
  WaitR;
End;



A lot of the functions that display the graphics are actually written in assembly language.  I was a big fan of writing small routines in asm, and then using them from TP.  Of course, looking back on it, there were much better ways that I could've written the functions, but hey, I was only 14!

The code to the left is the main loop of the program.  Nothing too surprising, except maybe the 'waitr'.  Basically all that does is wait for the vertical retrace of the monitor to complete, in order to reduce flicker.

You can get the source here.

Have fun!