Spring 2013»CITA 210 Homework 4

CITA 210 Homework 4

Assigned Date: Mon, Apr. 1, 2013
Due Date: Wed, Apr. 17, 2013
Due Time: 2:00pm

Last modified on April 12, 2013, at 02:50 PM (see updates)

Purpose

This assignment focuses on:

  • developing computer games in Jython (using the gui.py library)
  • using effective skills and strategies for working collaboratively
  • user interface development
  • using appropriate critical thinking skills and problem-solving techniques

You may work solo or with one partner. You may discuss the assignment only within your partner (if any) or the instructor.

Assignment

Read and understand bouncingBalls.py. It is a sample of how to organize game code in Jython (e.g., GameEngine class, and various game element classes) using the gui.py library.

Take an existing Python or Java game (see below for some possibilities) and convert it to this game-programming model.

Your final code should be structured as the bouncingBalls.py sample, and should be easier to read than the original (given the power of the gui.py library, and the conceptual efficiency of the provided game-programming model).

Details

Feel free to use one of the games below:

This assignment involves three things: the gui library, your Python knowledge, and the game code design (figuring out how to build a new game using the bouncing balls example).

This assignment is not something that can be done mainly infront of a coding editor. Some design is necessary. Thankfully, we have had lots of experience doing that throughout the semester. Now, all these things we have done are coming together.

So, start with figuring out:

  1. What are the game objects? (Each will become a separate class.)
  2. What sounds do you need?
  3. What graphics (images) do you need?
  4. What is the closest gui.py class that you can extend to implement each of your game objects? For example, in bouncingBalls.py, the Ball class is an extension of Circle. It could easily had been an extension of Icon, so that an actual image (i.e., "costume" in MIT Scratch parlance) could be used to "present" this object at the game interface.
  5. What are the interaction/game rules?
  6. How to encapsulate/separate these into the different classes?

This should get you a long way to finishing your game.

Submission

Your code should be carefully/thoughtfully commented (see bouncingBalls.py).

You will submit three things: the game code you created (see above), the original source code, and an one/two-page description of your work.

  1. Your game code and any images or sounds it requires. Use meaningful filenames for everything. I should be able to download your files in my own JythonMusic directory and run your game without having to do any modifications (such as having to manually store images in a subdirectory, having to edit your code in any way, etc.). My experience should be "turn-key" (i.e., download and run).
  2. The original code and any images or sounds it requires. Attach the prefix "original-" to all filenames corresponding to the original game (this is how I will be able to tell apart your own code (and its files) from the original code (and its files)). Be extra careful. You should submit all the original game files (as found on the Internet).
  3. Submit an one/two-page paper (PDF). This paper should have the following section titles (and in the order provided). Aim for simplicity, completeness, and elegance.
    • Your name(s), course, assignment no., date
    • Name, author, source of the game (i.e., incude URL(s) of original game, so I can retrace your steps, if desired)
    • Idea/objective of the game
    • Game object(s) - these should correspond to the different class(es) in your code. Your descriptions should be identical to those in the class comments.
    • Screen snapshot (from your implementation) that best demonstrates the game (explain, in the photo caption/description)
    • Coding Experience - your comments on the experience of converting the code (e.g., any difficulties you ran into, or things you particularly enjoyed).

Details

  1. You will submit your assignment on OAKS, by the due date.
  2. Also, bring a printout of your game description at the beginning of class, on the due date, and your converted project (all files) on a flash drive.

Grading

Your grade will be based on how well you followed the above instructions, and the depth/quality of your work.