ICS 32 Fall 2018 |??|??|??|??|??|?
ICS 32 Fall 2018
Project #5:?The Fall of the World’s Own Optimist (Part 2)
Due date and time:?Friday, December 7, 11:59pm
This project is to be done individually
In the?, you implemented a Columns game with a fairly primitive user interface that ran within the Python shell, in the spirit of the user interfaces we’ve been building all quarter. This didn’t make for a particularly fun game, but it did let us focus our energies on the precise rules of our game, so we could get all of the various mechanics right, before turning our attention to making a playable game out of it. In this project, we’ll switch over to making the game playable.
In recent lectures, we’ve been learning more about?PyGame, a third-party library — not one built into Python, but nonetheless one that is easily downloaded and installed for your use. This project asks you to take the program you wrote for the??and replace its user interface with a graphical one. You’ll build your game using the?PyGame?library, as we’ve been doing in lecture. Rather than simulating the passage of time by pressing the?Enter?key, the game will move on its own; this will add the key elements of challenge and fun to it.
This project asks you to build a graphical, playable version of Columns, based on the game mechanics from the?. However, we’ll need to make a couple of minor changes to it:
- The field will always consist of 13 rows and 6 columns, and will always start out empty.
- The seven colors of jewels were represented as uppercase letters previously. Instead, choose seven colors — you can choose any colors you’d like, though they should be different enough that you can easily tell the difference between them at a glance. (You might want your game mechanics to still refer to them using uppercase letters, and that’s fine; but when you display them, what differentiates the jewels should be their colors.)
- There needs to be some kind of visual cue when fallers land. Additionally, if you support matching, you would ideally want a visual cue when jewels match before they disappear, as well. You have your choice about these visual cues — you can use colors or other visual effects.
- Rather than the user adding fallers manually, they appear randomly. Whenever there isn’t a faller in the field, a new one appears in a randomly-chosen column and consisting of random colors.
- Rather than the user pressing the?Enter?key to simulate the passage of time, you’ll instead “tick” the game mechanics once per second automatically.
- Rather than the user typing commands like?R,?<, and?>?in the Python shell to rotate and move the faller, the user instead should move them by pressing keys on the keyboard; every keypress rotates or moves the faller once. So that we’ll know how to grade your project, we’ll all use the same keys:?left arrow?and?right arrow?should move the faller to the left and right, respectively, while the spacebar should rotate the faller.
Which rules must be implemented?
The only game mechanics that are absolutely necessary — for full credit on this project — are the mechanics of creating fallers, moving and rotating them, and having them land and freeze. All of the other mechanics — matching, particularly — are optional. If you already completed?, you’ll want to include them here. But we do want those of you who have only partial implementations (within bounds of reason) to be able to proceed with this project without penalty.
What should it look like?
You have a fair amount of leeway about how the game looks. The basic feel should be similar to the?, in the sense that you would display the jewels in a grid, and you would see them move one grid cell at a time. Jewels should be displayed with different colors, and you can opt to use different shapes, though that is not required.
You are certainly welcome to add new features to your game, though they are not required (and extra credit is not offered in this course). Some ideas of what you might add include:
- Displaying the contents of the “next” faller that will appear, before it appears.
- A mechanism for keeping score and displaying it.
- Representing the jewels using small images, instead of drawing them programmatically. (There are limitations on the size of those images; see below.)
- Adding sound effects and/or music. (There are limitations on the size of the files needed for this, as well.)