ahandrewh teaches IAT-165game design and development

P2: A Tiny Game (due February 11)

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.

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.