Unintend'o Controller Project

“There are 10 types of people in this world: those who understand binary and those who don’t.” – Unknown

Introduction

Now that you’ve learned some basics about Programming using Scratch, it’s time to delve deeper into the layers of computational abstraction—to understand how computers represent information. From video game platforms to smartphones and supercomputers, it’s all bits and binary underneath. Learning how to make bits and binary work for you can be very useful.

https://www.youtube.com/embed/iMcZ7oZDjRU

Controller Project

It’s 1987 and a low budget startup video game company, Unintend’o (pronounced: UN—INTEND—OH), is trying to get into the gaming business by making knock-off games of popular titles. Their first game, entitled Peerless Fabio Twins, involves two pipefitting Italian twin bothers named Fabio and Lucio who face a variety of dangers in order to rescue the Countess Lichen. To do so, they must defeat all sorts of animated lichens and molds by jumping on top of them.

You’ve been hired to create a new controller for the video game company Unintend’o. You will need to decide the role of each button on the controller so that you can move the character through a 2D digital space.

Assignment

Program a video game controller using bits.

Given a game controller with four directional arrow buttons (, , , and )and two additional buttons, labeled B and A:

  • Develop a controller interface for basic game moves (e.g., walk forward, backward, jump, duck) and advanced combo moves (e.g., whirl, leap, crawl), which requires that you:
    • Map the button’s states (pressed/not pressed) to a binary sequence that travels down a wire.
    • Map each binary sequence to one of the aforementioned (and other) actions.
  • Write detailed technical specifications that describe and evaluate your system.

Submission

Your submission will include both a Scratch program and the technical specifications of your device driver. You should use this starter code to begin the project.

The Scratch program should:

  • map keys pressed to a binary sequence. Note that interaction between the keys (, , , , A, and B) and the program is restricted to only this. In other words, the key presses should only be used to build the binary sequence.
  • cause Fabio to act according to the binary sequence you have created. Note that Fabio does not directly reference controller or keyboard events, but rather acts according to the value of the binary sequence.
  • use loops for repetitive tasks.
  • use conditionals for branching/decisions.
  • work as specified in technical specifications.

The technical specifications must include:

  • A basic overview of the controller design with an explanation of each button’s role in the game—in effect, a user's manual.

  • An evaluation of the driver you developed, including:

    • a table outlining all possible button combinations and what action each causes (if any). Assuming you assign each button to a bit, there are 26 or 64 possible combinations!

    • a description of which button combinations perform a special action (i.e., a combo move). Your project should include at least two combo moves that perform a special action when two button presses occur simultaneously. You should include two separate combo moves, not just one combo move duplicated for multiple directions. For example, you might cause Fabio to run double speed if (and only if) the or buttons are pressed while also holding down the B button would count toward one of your combo moves.

    • a description of any limitations your controller may have that lie outside of your table of button-press combinations. For example, perhaps if both the and buttons are pressed at the same time, Fabio oscillates between the two directions rather than favoring one over the other or standing completely still.

  • Key terminology from the glossary used where appropriate.

Learning Goals

Over the course of this module and this project, you will learn to:

  • Describe the dichotomous nature of binary code.
  • Describe how bits encode information.
  • Explain how state space is exponentially proportional to the number of bits encoding it.
  • Construct a binary representation of a decimal numeral.
  • Explain how abstraction simplifies the use of ASCII text.
  • Explain how digital representation can universally approximate physical media.
  • Evaluate the social impact of the universality of digital information.
  • Explain how a digital copy is or is not perfect.
  • Use lists as ordered data structures that may contain multiple values.
Content Area Performance Quality
Bitstrings
Fabio performs tasks based on the bitstring and not directly from the key presses or controller buttons.

—AND—

The bitstring is created correctly.

Fabio performs tasks based on the bitstring and not directly from the key presses or controller buttons but the bitstring may be created incorrectly.

The bitstring may be created correctly, but Fabio responds to the key presses or controller buttons and not the bitstring.

Not enough criteria are met in order to award any credit.
Loops and Conditionals
Both loops and conditionals have been added to the program.

—AND—

All loops and conditionals are used effectively and correctly with purpose in the program.

Loops or conditionals (but not both) have been added to the program AND all loops or conditionals are used effectively and correctly with purpose in the program.

—OR—

Both loops and conditionals have been added to the program but not all loops or conditionals are used effectively and correctly with purpose in the program.

Loops or conditionals (but not both) have been added to the program.

—AND—

Not all loops or conditionals are used effectively and correctly with purpose in the program.

Not enough criteria are met in order to award any credit.
History List
Program uses a list to accurately keep track of all button presses through their associated bitstrings throughout the program.

Program uses a list to keep track of all button presses through their associated bitstrings throughout the program but may not be accurately recorded.

—OR—

Program uses a list to accurately keep track of some button presses through their associated bitstrings.

Program uses a list to keep track of button presses through their associated bitstrings at some point in the program, but they may not be accurate.

Not enough criteria are met in order to award any credit.
Basic Moves
Fabio performs six different actions when the user presses left, right, up, down, A and B.

—AND—

The movements appear fluid and are aesthetically pleasing.

Fabio performs six different actions when the user presses left, right, up, down, A and B, but some movements do not appear fluid or may not be aesthetically pleasing.

—OR—

Fabio performs less than six different actions when the user presses left, right, up, down, A and B, AND those movements appear fluid and are aesthetically pleasing.

Fabio performs some kind of action when the user presses keys.

Not enough criteria are met in order to award any credit.
Combo Moves
Fabio performs at least two different actions when the user presses a combination of buttons simultaneously.

—AND—

The movements appear fluid and are aesthetically pleasing.

Fabio performs at least two different actions when the user presses a combination of buttons simultaneously, but some movements do not appear fluid or may not be aesthetically pleasing.

—OR—

Fabio performs one action when the user presses a combination of buttons simultaneously AND the movements appear fluid and are aesthetically pleasing.

Fabio performs one action when the user presses a combination of buttons simultaneously but the movements do not appear fluid or may not be aesthetically pleasing.

Not enough criteria are met in order to award any credit.
Driver Evaluation
There is a completed table outlining all possible combinations of button presses that perform a specific action.

—AND—

It includes the bitstring that those presses map to along with an explanation of the move that it performs.

—AND—

Any limitations of the driver are explained and justified.

There is a completed table outlining most possible combinations of button presses that perform a specific action AND It includes the bitstring that those presses map to along with an explanation of the move that it performs AND Any limitations of the driver are explained and justified.

—OR—

There is a completed table outlining all possible combinations of button presses that perform a specific action AND It includes some wording about the bitstrings, moves, and limitations.

There is a table of some possible combinations of button presses that perform specific actions.

—AND—

It includes some wording about the bitstrings, moves, and limitations of the driver.

Not enough criteria are met in order to award any credit.
Documentation
There is descriptive documentation that explains the program’s purpose and major code segments.

—AND—

There are complete and clear instructions on how to use the program.

There is documentation that explains the program’s purpose and major code segments AND there are instructions on how to use the program.

—OR—

There is descriptive documentation that explains the program’s purpose and only some code segments AND there are instructions on how to use the program.

There is documentation that explains the purpose of the program and some code segments.

—AND—

There are some instructions on how to use the program.

Not enough criteria are met in order to award any credit.