Individual Assignment 3
Deadline: by 9:00AM on March 15th, 2016
In this assignment you will build a two-player, cross-platform game (Pong) for Android based on OpenGL ES (by using the cocos2d-x library).
You will submit three things:
- your source code and resources
- your executable (i.e. the .apk file)
- 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 Sprite ), the author name (could be implemented as a Label), and two menu items (i.e. start a new game, options). The menu items can be implemented by using the Menu class along with MenuImage (if you prefer image based menu items) or MenuLabel (if you prefer text based menu items).
- In the game scene, you should divide the screen into left and right region, each region can be controlled by one player. Please refer to this video for the actual game play mechanism. Please note that the ball should bounce when it hits the upper or lower border. The opponent will get one point if the ball crosses the border of the home side (i.e. the left border for the player on the left hand side, the right border for the player on the right hand side). Please refer to the figure below for a reference design.
- In the game scene, You may allow players to move the paddle by tapping with direct finger touches. You may 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 change the default speed of the ball).
- Your game needs to behave properly when running on devices with different resolutions (you only need to support the landscape mode though).
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)), playing with AI, 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. We will use Cocos2d-X 3.10 for this assignment. Please compile and run some of the sample applications before working on this assignment.
- It's a good idea to go through the tutorials and my lecture slides before working on this assignment.
- Please take a look at the source code of some sample games, e.g. Akaflow, 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 wall, , 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: You may find free sound effect files from here.
- Hint: The TA will host a Cocos2d-x orientation and clinic session on 2/22/2016. Please try to set up the environment ahead of the time. Please feel free to bring your laptop to the clinic session if you get stuck at a specific step.
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 Android Studio 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:
- Tiffany Martrano
- Robert Webb
- Nate Patton
- Jonathan Blinn
- John Phillips
- Joshua Fisher
- Michael Oles
- Andrew Lucas
- Sam Kopansky
- Alex LaFroscia
- Alexandra Krongel
- Chris Finestone
- Matthew Reinhold
- Xinhai Xu
- Daniel Hui
- Charlotte Chen
- John Riesenberger
- Nicholas Carone
- Clark Nicolas
- Yijia Cui
- Mengqi Wu
- Adhyaksa Pribadi
- Dustin Chlystek
- Luke Kljucaric
- Bogdan Kotzev
- Jason Naughton
- Ishvaraus Davis
- Casey Nispel
- Arjun Mukherjee
- Sarah Dubnik
- George Claghorn