Implementation Details
Sonic is drawn using a 3ds model file that I obtained. Credit goes to
Athbucket Animations for creating the model. I then broke sonic up into
five pieces: Left lower leg, right lower leg, left upper leg, right
upper leg, and the rest of him. I then turned him into a hierarchical
model for animation. There are different "stages" of the running and
jumping animation. The faster you go, the faster sonic progresses
through those stages.
I implemented sound using OpenAL. I stole sounds and the
background image from the original Sonic 2 game on the Genesis.
The sounds include the background music for
the Emerald Hill Zone, the jumping sound, the ring-getting sound, and
the special stage sound (used when you get all the rings).
There is collision detecting with the rings and the boundries of the
track. Currently you are not allowed to leave the track. The way this
is done is as follows: The track is made up of pieces the same size
as the actual polygons used to draw it. Those polygons are set up as
"boundries" such that it has a number of sides. Each side can either
be a boundry (you can't go past it) or a pointer to another polygon.
As Sonic moves around, there is always a current piece of track that he
is currently on.
There is also a blur effect on the whole screen when Sonic is running at
his top speed. This is done by lowering the R, G, B, and alpha
values of OpenGL's accumulation buffer. This ends up mixing colors of
different frames together, to create a blur effect.
|