Individual Assignment 3
Deadline: by 9:00AM on
March 6th, 2014March 7th, 2014
In this assignment you will build a cross-platform 2D game (Breakout) for Android based on OpenGL ES (by using the cocos2d-x library).
You will submit three things:
- your source code and resources
- your executable (Make sure your executable has all resources that it needs to run.)
- a brief description about major challenges you addressed or lessons learned from this assignment.
- The game should have at least three scenes, i.e. the home scene, the actual game scene, and the options scene.
- The home scene should display at least the name of the game (could be an image loaded from CCSpirite ), the author name (could be implemented as a CCLabel), and two menu items (i.e. start a new game, options). The menu items can be implemented by using the CCMenu class along with CCMenuItemImage (if you prefer image based menu items) or CCMenuItemLabel (if you perfer text based menu items).
- In the game scene, you should display at least two rows of bricks, and there should be at least five bricks in each row. You should provide two types of sound effects during the game play (i.e. when the ball hits the brick; when the ball hits the paddle). You should at least show the current player's points in a certain region of the game play screen (the upper-middle region might be a good choice). You should provide a mechanism for the player to restart the game from the game play screen if the player loses. You do not need to implement multiple levels, but the game should end when all of the bricks have been cleared. The user should be able to restart the game when he/she clears all of the bricks.
- In the game scene, You may allow players to move the paddle by dragging the paddle left/right via direct finger touches. You may also implement two soft buttons or touch control regions to move the paddle left/right. You may get extra credit by enabling a second input channel and making it available in the option scene (e.g. allowing a player to move the paddle by tilting the smart phone).
- In the options scene, you need to implement at least one on/off option for the player to toggle (e.g. an option to enable/disable sound effects in the game, or an option to switch to accelerometer based input).
- Your game needs to behave properly when running on devices with different resolutions (you only need to support the landscape mode though).
- For those of you who are not familiar with the game playing mechanism of Breakout, please refer to the original Atari video in 1970s and the Wikipedia page.
Extra credit: Up to 5 extra points will be given in total if you implement additional features(e.g. a persistent leader-board screen for high scores (up to 2 points), enabling accelerometer based input (up to 2 points)), and streamlined/more engaging game playing experiences (up to 4 points).
- Please first follow the installation instructions to set up the cocos2d-x environment for Android. Please compile and run some of the sample applications before working on this assignment.
- It's a good idea to go through the cocos2d-x tutorials and my lecture slides before working on this assignment.
- Please take a look at the source code of some sample games, e.g. Twitjump and Asteroids, then compile and run them in your Android emulator. Such activities will help you become familiar with many of the commonly used programming idioms of cocos2d-x.
- Hint: Instead of relying on OpenGL function calls to draw on-screen objects from scratch, it's better to create all of the on-screen objects (e.g. the brick, the ball and the paddle) in a separate program (e.g. PowerPoint, Photoshop, Paint) and import them into your game as bitmap images (please think about why this approach is better). You can resize the images to appropriate resolutions before importing them. You may also resize the images at run-time if the size of the imported images is not ideal.
- Hint: Instead of using File IO functions provided by Android SDK/NDK to save/retrieve customized parameters for your game, you may use the CCUserDefault class included in cocos2d-x to implement it in a cross-platform way.
- Hint: You may find free sound effect files from here.
Up to 20 points will be given if your application compiles, runs, contains the functionality as detailed in the instructions.
Up to 5 extra points will be given in total if you implement additional features(e.g. a persistent leader-board screen for high scores (up to 2 points), enabling accelerometer based input (up to 2 points)), and streamlined/enjoyable game playing experiences (up to 4 points).
Create a Wiki Page for this assignment
Begin by creating a new wiki page for this assignment. Go to your user page that you created when you made your account. You can get to it by typing the following URL into your browser:
Replace FirstName and LastName with your real first and last names. This will take you to the page you created for yourself when you created your wiki account. If you have trouble accessing this page, please check that you created your wiki account properly.
Edit your user page to add a link to a new wiki page for this assignment. The wiki syntax should look like this:
[[IndividualAssignment3-FirstName_LastName|Individual Assignment 3]]
Again replace FirstName and LastName with your name. Look at my user page for an example. Then click on the link and enter the information about your assignment. You should upload two files (described below) and in the wiki page, describe any extra credit functionality you implemented and want us to review.
- Your submitted project must include the full source code as well as the executable of the working application and the one page challenges and lessons learned.
- Create a zip file of your project tree (the top-level folder that includes the Eclipse project. Rename the zip file to apk3-firstname-lastname.zip (e.g., apk3-jingtao-wang.zip)
- Upload the zip file to the IndividualAssignment3-FirstNameLastName page you just created:
- Create a new file link like this: [[File:apk3-firstname-lastname.zip]]
- Save the page, then click on the File link you just created to upload the zip file.
Add Link to Your Finished Assignment
One you are finished editing the page, add a link to it at the bottom of the page with your full name as the link text. The wiki syntax will look like this: *[[IndividualAssignment3-FirstName_LastName|FirstName LastName]]. Hit the edit button for the last section to see how I created the link for my name.
Links to Finished Assignments
Add your submission below this line:
- Hao Zhang
- MJ McLaughlin
- Charlie Koch
- Cody Giardinello
- David Grayson
- Steven Bauer
- Zach Liss
- Guoyang Huang
- Ryan Ulanowicz
- Mary Letera
- Derrick Ward
- Max Campolo
- Michael Mai
- Robert McDermot
- Brett Lilley
- Ariana Farshchi
- Sara Provost
- James Devine
- Longhao Li
- Buck Young
- Chris Solis
- Zhanjie Zhang
- Brian Kacin
- Xiaoxuan Chen
- Matt Landram
- Cory Savit
- Brian Kelly
- Melissa Thompson
- Megan Ziegler
- Bret Gourdie
- Matt OHanlon
- Pedro Alvillar
- Aamir Nayeem