CS314 Project 4 Carmen (Jia Min) Liang, Eason (Yu Shun) Hu SNOWBALL GAME Advanced Functionality: * Particle system o Exploding bubbles * Procedural modeling (Bonus feature) o Sphere cloud at game over stage * Collision Detection o Penguin boundary collision detection o Snowballs hitting penguins o Disappearing of snowballs * Animation o Swinging penguins o Spinning penguins o Penguins flying off while been shot o Rolling snowballs Algorithms: * Collision detection: use radius to detect collision o Snowball collision with Penguins * Find the center of snowball and the center of Penguin * Calculate the distance in between * If the distance is small than the sum of the radius of snowball and the radius of Penguin * Penguins flying off o Snowball boundary collision * Snowballs will disappear while out of the icy floor o Penguin boundary collision * Penguins cannot go out of icy floor; they will get new direction * Penguin**s new direction is calculated like light reflection (similar to light reflection) * Picking: o Use the mouse to determine the coordinates o Go in to Render-Select mode o Pick matrix() o Set up the camera o Assign ID and draw objects o Get number of hits o Analysis number hits and select-buffer o Find the smallest depth value for the meaningful ID * Camera movements: o Rotate clock wise or counter clockwise with respect to the game floor center o Roll and translate around the game floor along the center**s x-axis * Texturing: o Load image to GPU o Initialize the textures o Map the texture on the object * On screen control panel: o Go into ortho graphic matrix o Raster position and print text o Get out or ortho graphic matrix * Particle system: o Generate a big collection of half-transparent balloons with different color (particles) o Balloons are going out in all directions with different speed, different color * Gameplay: o Idea: Throw snowballs to kill the penguins o To Win: kill all penguins within the time limit o The maximum number of available snowballs is 4 o If one snowball is gone, one donut on floor increases o Right click to get a donut can increases the number of available snowballs by 1 Data structures: o Snowball o Penguin o Floor items o Particle o Particle collection Game instructions: * Keyboard keys o "a" : move the camera clockwise around the center**s y-axis o "d" : move the camera counter-clockwise around the center**s y-axis o "w" : rolling around center**s x-axis in counter-clockwise o "s" : rolling around center**s x-axis in clockwise * Mouse o **left click**: shooting snowballs o **right click**: picking up donuts to increase number of snowballs available Sources: http://www.gamedev.net/community/forums/topic.asp*topic_id=82893 http://www.opengl.org/sdk/docs/man/xhtml/glSelectBuffer.xml http://nehe.gamedev.net/data/lessons/lesson.asp*lesson=32 http://nehe.gamedev.net/data/articles/article.asp*article=06 http://www.opengl.org/sdk/docs/man/xhtml/glSelectBuffer.xml http://www.opengl.org/resources/faq/technical/selection.htm#sele0020 http://jerome.jouvie.free.fr/OpenGl/Lessons/Lesson5.php