Carl M. Math 198 Section: &G1 Professor George K. Francis illiPong Final Report The culmination to my semester-long journey into computer graphics programming is illiPong, a real-time interactive computer animation (RTICA) written in C and implemented using OpenGL/GLUT in the illiskel. My goal was simple: to create an n-dimensional version of the classic video game "Pong" that would eventually become a CAVE application. The physics behind illiPong is relatively simple; a basic working knowledge of linear kinematics is all that is necessary to understand the interaction of the game balls and the surrounding cube and paddle. The main challenge in creating illiPong was in its implementation, especially when dealing with dimemsions higher than 3. The design process began with me first implementing the game in 3D and then attempting to find the (hopefully) obvious extension to higher dimensions. The 3D design began in the program bounce, which essentially was a cube (with available extension to hypercube) that had GLUT wirespheres bouncing around in it. Much of the collision detection code that was in the original bounce program was eventually altered to fit the needs of illiPong. I created a paddle object that would lie in one plane of the cube and would serve as my paddle for the game in the tradtional sense of Pong. The paddle was easily implemented using a GLUT line-strip, and the motional of the paddle was at first computer controlled. I then began the imp1ementation of the game, starting with a "reverse" version of Pong, where ball-paddle interactions resulted in the ball dissapearing rather than bouncing back into the playing area (cube). Once this was completed, I could then reverse the process, making interactions between the paddle and ball a "bounce" while all other intereactions between the ball and the plane in which the paddle lies results in a "loss." Once a loss occurs, the program no longer continues to draw that particular GLUT wiresphere, thus making it invisible. Finally, I added much user control to the program. The paddle is controled by the arrow keys on the "special keyboard" portion of the keyboard. The speed of the ball and the paddle are also user controled via the keyboard, and functions to pause motion of the balls and cube are available as well. When it came time to implement the game in higher dimensions, we ran into difficulty. Unfortunately, my novice approach to programming the game makes higher dimension extensions very difficult to do without re-doing much of what has already been done. For example, when deciding where the paddle would lie (that is, which plane of the cube), I made many assumptions about the specific coordinates of the paddle, and much of my code is designed around these somewhat arbitrary selections. If I were to have illiPong in 4D, my paddle essentially becomes a cube that now moves in 3 dimensions of the hypercube playing field (one level surface of the hypercube). All of the velocity and position arrays for the balls would now have to incorporate 4 dimensions of movement (this, however, is a readily available feature of the arrays). We also ran into difficulty in implementing the game in the CAVE. The RTICA is heavily dependent upon user control (seeing as how it is a game) and thus moving illiPong from the simulator where the user controls the game via the keyboard and mouse to the CAVE where the user must control the game via the wand is a difficult task. If we were to put a 4D version of illPong into the CAVE, the game would essentially be a user holding a cube (which is now the paddle) with the balls flying at the user, and the user must deflect the balls. To demonstrate movement of the ball towards and away from the user, the balls would have to vary in color (where, for example, the ball turns more red as it comes closer to the user). Another way of thinking about 4D illiPong in the CAVE is to imagine yourself watching yourself playing the game (essentially, you are looking at an avatar depicting the motions that you are making while trying to deflect the game balls). Thus, it is evident that illiPong is only the beginning of what will hopefully be an interesting and exciting new CAVE application (and perhaps CUBE application, in the future). My overall goal in creating illiPong was to learn new computer programming methods while exploring some new and interesting geometry, all the while creating an RTICA that users will hopefully find fun and entertaining. Though I accomplished much of this in illiPong 3D, the RTICA leaves me (and perhaps future Math 198 students) with many more interesting challenges. How to Play illiPong: illiPong is fairy easy to learn but difficult to master. When the game first comes up, it will be in pause mode. By pressing 'y' on the keyboard, one can pause (and unpause) the game during any point of gameplay. The object of illiPong is to not allow any of the balls to pass the plane in which the paddle is in. If a ball does pass the paddle and intersect with the plane of the cube in question, that ball will be lost. To deflect the balls using the paddle, simply manuver the paddle with the directional arrow keys on the keyboard. Paddle speed can be increased (decreased) by pressing 'x' ('shift+x'), while ball speed can be increased (decreased) by pressing 'c' ('shift+c'), as stated on the screen. To remove text on the screen, press 'w' (removing text often improves game performance on the SGI machines). To rotate the playing field (cube), first unfreeze the rotation by pressing 'f', and then use the mouse to control rotation. To refreeze rotation at any point in the game, simply press 'f' again. All standard movement features of illiSkel exist in illiPong as well. Enjoy!