ahandrewh teaches IAT-165game design and development

P2: A Tiny Game (due February 11)

This is old content

Andrew is not currently teaching IAT-165. This material is left online for reference only.

Introduction

Working from a pitch developed in the prior project, this project has you building out a tiny game — a minimum, playable prototype of a core mechanic to allow for testing and iteration.

This project is completed in groups of 2 students.

P2: A Tiny Game is worth 20% of your final grade.

Constraints

To prevent the scope from growing too large there is a set of constraints you must follow for building out the game:

Weekly instructions

This project spans multiple weeks. Please read the weekly instructions carefully.

From January 21 to January 28

This week we plan out the game loop and begin structuring it in code. Please complete the following:

  1. Write down your final concept for the main game loop. This can draw on feedback from project 1 and/or move in a new direction if preferred. For example:
    1. Obstacle arrives
    2. Jump and avoid
  2. Generate a sketch of of the components of the game. This should help us quickly see and discuss the core game loop as well as what elements we may need to define.
    A sketch of the various game components and the things that may need to be defined programmatically

    An overview of the components of the jumping game.

  3. Define what each component will need to keep track of in code. To help with starting building the elements themselves in code, generate a list of things that will need to be set, changed and/or tracked.

    Using the example of the player element from the sketch we will need to:

    • Set the height, width, horizontal position and what is 'ground level' for the player. These do not need to change while playing the game.
    • Set the vertical position and have it change when the user has pressed a key on the keyboard.
    • Track when the player and the block are in the same space.
  4. Draw the components of your game in code. Using p5js draw the components of the game you have defined in earlier steps:
    • Focus on setting up the components and variables for the game.
    • Make sure you use variables to have one common place to make changes/adjustments to how the game works.
    • Do not worry yet about things changing or being tracked yet.

Bring to your January 28 class

Please remember to follow the constraints provided.

  • Your main game loop defined.
  • The game components drawn out in p5js.

From January 28 to February 4

This week you will check-in on how the core game loop and building of components has progressed.

Please complete the following:

  1. Define how components will be updated in the main game loop. To help with further planning out your code, think about in what sequence things will need to be drawn or updated in the code to make the game work. Consider what only needs to be set once when the game is started (setup()), and what will have to be updated or done regularly during gameplay (draw()).

    Using the example of the obstacle jumping game:

    • Set the starting positions for the player, the obstacle, what button to listen to when starting the game (setup()).
    • Listen to the button presses and jump player (draw()).
    • Move the obstacles across the screen periodically (draw()).
    • Check if the obstacle and the player overlap (draw()).
  2. Build the one-button interaction into the game. Using knowledge covered from the code tutorial build a function that will take the interaction and have the game respond to that.

    Using the jumping game example, when we press a button on the keyboard have the character now move up and down.

  3. Add in any other animation that is required of the game. If other elements on the screen are meant to move as part of the game add in code to allow them to animate as well.

Bring to your February 4 class

Your updated game in p5js.

From February 4 to February 11

During this week's class you will receive feedback and support on your progress on the game.

Please complete the following:

  1. Building or working with pre-existing code examples, add in any tracking you need to make the game work. For example if you are detecting when two objects collide — but do not feel confident enough to complete that yourself — please work with one of the existing code snippets provided with the course materials to integrate that functionality.
  2. Add a pre-game and post-game state. How this state behaves is up to you but these states must allow the player to:
    • Understand how (through keyboard press) or when (after time expires) the game will start.
    • Understand that they have reached the end of the game and how they can play again.
  3. Explain how the core game loop works using comments in the code. Go back through your code and add in comments indicating how the code allows the core game loop to work. These comments will need to:
    • Start with // GAME LOOP
    • Be numbered to indicate the sequence in which they should be read.
    • Explain in your own words how you understand the game loop is working.
    • If you do not understand why something works please be honest about that.
  4. Add in comments to the code citing anything that is working with other resources. For example if you watched a YouTube video or pulled from course code snippets add a comment to the code clearly indicating which portions of the code were informed by that additional resource.

Grading rubric

Please email Andrew with any questions about the rubric.

A B C D/F

Game quality (5 pts)

  • Game effectively makes use of the affordance of one button.
  • Game uses animation effectively to convey the responses to the user's interactions with the system.
  • Game states (pre/in-game/post) allow the player to understand the different game states effectively.
  • The game mechanics are learnable.
  • The game is playable.
  • Game effectively makes use of the affordance of one button.
  • Game uses animation to convey some of the responses to the user's interactions with the system.
  • Game states (pre/in-game/post) are present, but not all understandable by the player.
  • The game mechanics are learnable.
  • The game is playable.
  • Game effectively makes use of the affordance of one button.
  • Game uses animation to convey some of the responses to the user's interactions with the system.
  • Game states (pre/in-game/post) are present but not understandable by the player.
  • The game mechanics are difficult to learn.
  • The game is playable.
  • Game effectively makes use of the affordance of one button.
  • There is little-to-no animation and/or the animation confuses the user's interactions with the system.
  • Game states (pre/in-game/post) are missing and/or not understandable by the player.
  • The game mechanics are difficult to learn.
  • The game has issues that make it difficult to play and/or unplayable.

Code quality (5 pts):

  • Code makes effective use of variables.
  • Code makes effective use of functions.
  • Structure of code is legible — variable and function names describe their purpose clearly.
  • There are no console errors.
  • Code makes mostly effective use of variables — there is some duplication or redundancy of values.
  • Code makes mostly effective use of functions — there is some duplication or redundancy of portions of code.
  • Structure of code is legible — variable and function names describe their purpose clearly.
  • There are no console errors.
  • Code makes mostly effective use of variables — there is some duplication or redundancy of values.
  • Code makes mostly effective use of functions — there is some duplication or redundancy of portions of code.
  • Structure of code is mostly legible — most variable and function names describe their purpose clearly.
  • There are console errors.
  • Code makes some effective use of variables — there is duplication or redundancy of values in a variety of places.
  • Code makes some effective use of functions — there is duplication or redundancy of portions of code in a variety of places.
  • Structure of code is sometimes legible — many variable and function names do not describe their purpose clearly.
  • There are console errors.

Constraints followed (5 pts):

All constraints followed.

One constraint not followed.

Two constraints not followed.

Three or more constraints not followed.

Quality of commenting (5 pts)

  • Commenting in the code demonstrates an honest and effective explanation of code sourcing and understanding.
  • Citations are provided (if necessary) for all materials that informed the development of the code.
  • The main game loop is clearly illustrated in comments and is understandably explained.
  • Commenting in the code demonstrates an effective explanation of code sourcing and understanding.
  • Citations are provided (if necessary) for most materials that informed the development of the code.
  • The main game loop is illustrated in comments and is explained.
  • Commenting in the code demonstrates a somewhat effective explanation of code sourcing and understanding.
  • Citations are provided (if necessary) for some materials that informed the development of the code.
  • The main game loop is illustrated in comments and is somewhat explained.
  • Commenting in the code demonstrates some explanation of code sourcing and minimal understanding.
  • Citations are not provided and/or a significant amount appear to be missing.
  • The main game loop is illustrated in comments but not effectively explained.

Final submission requirements (February 11)

The final submission for P2 is a ZIP file containing the final game.

Your project submission is due to Canvas before your February 11 class.

Please make sure double-check all your submitted URLs to ensure they can be opened. We want to avoid late or problematic submission penalties whenever possible.