Sean Bailey CS 248 Assignment #3 December 8, 2000 Name and platform: Kiddyhop, Windows NT/98 Building: The makefile is a Borland C generated makefile: kiddyhop.mak Running: double click kiddyhop.exe in windows This game is intended for very young children (6 months to 2 years). Children of this age like direct interaction and natural motion. Therefore, I chose to use a touchscreen for direct interaction and real-time dynamics for natural motion. Without the presence of a touchscreen, the mouse can be used to interact with the game, though it is harder to use since the cursor is disabled (completely unnecessary and unasthetic with the touchscreen). The real-time dynamics take advantage of windows mutlimedia timer. The decoupled three dimensional dynamic system is integrated in real-time using a Runge-Kutta 4th ored integrator which is much less sensitive than Newton-Euler integration to large time steps. In the vertical direction, there is a mass-spring-damper system, with a foot condition (which is technically non-holonomic, but I don't explicitly deal with this since it only has to "look" good). In addition, in the horizontal plane, there is a mass-damper model integrated in a similar fashion. When the user touches the screen, the touch coordinates are converted to scene coordinates depending on the viewing angle. State-dependant vertical and horizontal forces are then applied such that the hopper moves away from the point of contact. In addition to the natural dynamics, I also implemented motion blur via alpha values and blending. The previous positions of the hopper are stored in an array and then displayed progressively more transparently to acheive the motion blur. I also found that decreasing the size of the transparent trails (ie drawing the transparent hoppers smaller) yielded a much cleaner rendering (no overlapping primitives) and the size change is imperceptible to the viewer because of the transparency. Finally, I also implemented a smooth Matrix-like panning effect. While the pan is occuring, "real_time" stops and then is resumed after the pan ceases. The pan is initiated by touching the left or right margins of the screen and the viewing angle rotates around the scene by +/-270 degrees. The panning rate is a sinusoidal function, a shifted, inverted, and scaled cosine function, which causes the pan to start slowly, increase to a maximum, and then slowly come to a stop which is a much more pleasing effect than a simple linear rate. In addition, the viewpoint smoothly shifts during the pan from the center of the screen to the hopper and then back to the center. This acheived by a parabolic weighting function, again shifted, inverted and scaled. Finally, the motion blur trails are increased in number and the transparency is reduced (trails are made more opaque) for a more striking effect for the duration of the pan. I did borrow some code: PPM loader from Nate Robins ErrorCallback function from "the redbook" I also consulted various pages on the web until I found appropriate real-time (time.h doesn't cut it) functions in mmsystem.h. Specifically, I used the call timeGetTime(), which gives real-time millisecond resolution.