Intro CS Assignments
Assignments by week:
Fall Term:
Winter Term:
Spring Term:
Monday, December 10
Description
Time-based Animation
Homework
  • Read the following pages about key events in processing:

  • Create a program that uses println() or text() to display the keyCode of whatever key has been pressed. E-mail me the codes produced by pressing the following letters: A, Z, 5, up arrow, and spacebar.
Tuesday, December 11
Description
Keyboard Interaction
Homework
  • Read the API documentation for the Processing SoundFile class.
  • By the start of class on Thursday, create the following simple "game":

    Your browser does not support the canvas tag.

    Your program doesn't have to look exactly like mine (in terms of colors, size of boxes, wording of text, and so on). However, it must have the following features:

    • An instruction screen, where the game begins.
    • A "playing" screen (or screens) where the game is played.
    • A "win" screen
    • A "lose" screen
    • The game must move from the "instructions" to the "playing" screen when the mouse is pressed (or a key is pressed, but change the instructions if you do that).
    • The game must allow the user to "win" or "lose" the game.
    • The game must reset to the "instructions" screen after a win or loss.
    • No other state changes should be possible. For example, you shouldn't be able to go from the "lose" screen straight back to the "playing" screen. They must follow the sequence of the demo.
Thursday, December 13
Description
Homework
  • Finish the simple "game" (see above). Due at the start of next class.
  • Give some thought to a game you might like to code for your winter project. You'll be writing a formal proposal and plan later, but for now you need to narrow it down to a few ideas. Some things to consider:

    • Choose a game that has a fairly simple "core", but that can be enhanced if you have time (adding better graphics, sounds, levels, etc).
    • Make a short list of all the things you'll need to keep track of in your game: score, x and y positions of different objects on the screen, lives, projectiles, etc. This will help you determine if things are too complex.

    Here's a short list of things that previous students have found difficult to implement in their games. Unless you're very confident in your abilities, you'll likely want to avoid these items:

    • Physics-based games with collisions are very difficult to model correctly (think pool table balls, basketballs, bowling pins, and even Mario-like games where you can jump on top of things and have them be solid). Basic physics like velocity, trajectory, and gravity are absolutely fine and will likely be a part of many games.
    • Avoid screen-scrolling games (where the level appears and disappears as the character moves around). Simpler levels like the arcade games from the 70s and 80s are good (see the list below).
    • Beware complicated menus, which can take a long time to program properly. A few buttons can be helpful, but if you game requires complicated menus to choose things throughout the game you should be cautious.
    • Artificial Intelligence (where the computer plays against you) can be tricky to get right. An example of this is Pac-Man, where the ghosts actually have a very specific set of rules that they follow.
    • 3D games (using the Processing 3D API) generally don't work well as web-based games due to the lack of 3D support in most web browsers. This won't affect your grade, but be aware that many people won't be able to play your game online if it uses 3D.

    If you're looking for inspiration, check out the following pages:

    You don't have to do an existing game (you can create your own). Additionally, it doesn't have to be an action game; you can make a puzzle game, role-playing, or other type of game that you want!