MIT OpenCourseWare
  • OCW home
  • Course List
  • about OCW
  • Help
  • Feedback
  • Support MIT OCW

Handout GB-2

Contents:

Background

The 6.170 staff has enjoyed using your initial implementation, but notices a key difference between Gizmoball and their childhood memories of real pinball. The problem is that Gizmoball is a little flat for their tastes.

You'll extend Gizmoball to support multiple levels of play. This is a more realistic approximation of pinball where there are raised platforms on and under which gameplay can take place. You should have both full play and edit mode support for the new functionality.

The intent of this amendment is not to test your skill at rendering in 3 dimensions. Rather, it is to test the extensibility of your exisiting design and your group's ability to adapt to requirements changes.

Top

Platforms and Transporters

A platform is defined as a 2-dimensional surface in the x,y-plane on which all the standard gizmos and balls may be placed and gameplay conducted. Each of these platforms shall be completely bordered by its own set of outer walls. In any gizmoball game, platforms can appear at levels between 0 and 100. There can be zero or more platforms at a given level in the z-dimension. (In other words, there is a partial ordering on platforms that corresponds to a platform's level in the z-dimension).

Balls and moving gizmos may only migrate from platform to platform through transporter gizmos. Each ball or gizmo is on exactly one platform at any time. A ball or gizmo cannot be on two different platforms, nor may it be "between platforms". However, gizmos may be connected to gizmos on different platforms, and the normal action-triggering semantics should be preserved.

There is a default platform at (0,0) with a width, height of (20L, 20L) and z level of 0. No platform may extend beyond the dimensions of the default platform in the x,y-plane.

Top

Transporter Gizmo

A transporter gizmo is similar to a circle bumper in appearance and an absorber in function. Transporter gizmos can participate in gizmo connections just like other gizmos. However, the semantics of a Transporter gizmo's action is slightly more complex. A transporter gizmo will magically transport colliding balls to another transporter gizmo it's connected to, thus allowing balls to change levels.

Top

Detailed Requirements

The Detailed Requirements (Appendix 1) section of the original specifications are amended as follows.

Transporter Gizmo

A circular shape with a diameter 1L. Transporter gizmos should be visibly distinguishable from circle bumpers.

Trigger: generated whenever the ball hits it
Coefficient of reflection: 0 or 1.0 depending on whether a ball is captured
Action:

  • If a transporter gizmo t1 is triggered by another transporter gizmo t2, relocate any balls which have been captured by that transporter gizmo t2 to the location of this transporter t1.

When a ball hits a transporter gizmo, if the transporter gizmo is connected to other transporter gizmos, then the ball is captured. Otherwise, the transporter gizmo behaves like a circular bumper.

On a collision:

  • If a transporter gizmo is connected to some set S of gizmos that does not contain other transporter gizmos, then the transporter gizmo behaves like a circle bumper.
  • If there is some subset ST of S that is made up of transporter gizmos, then a transporter gizmo ti is selected randomly from ST. The ball is magically transported to the approximate position of the transporter ti.

Top

File Format

In order to accommodate the new type of gizmo and platforms, the file format has also been amended. We introduce two new commands to allow the creation of transporter gizmos and platforms. We also introduce an optional PLATFORM property for specifying the platform on which a gizmo appears. Moreover, the amendment of the file-format to allow for property key-value pairs also allows teams who want to save non-standard gizmos or state information in the file format.

Transporter gizmos are created using the Transporter command, which is similar to the Circle command. Platforms can be specified by the Platform command.

Formally, the syntax and semantics of the file format is amended as follows:

Top

Syntax Amendment

(remember that the file-format is case-insensitive)

<commandline> ::= <command> <property-pair>* "\n" | "\n"

<command> ::= ... (same as previously, except add) ...
Transporter <name> <int-pair> |
Platform <name> <int-pair> <int-pair> <int>|

<property-pair> ::= <property-name>=<property-value>

<property-name> ::= IDENTIFIER

<property-value> ::= IDENTIFIER

<int> ::= INTEGER

Top

Semantics Amendment
"Platform" (IDENTIFIER name) (INTEGER x) (INTEGER y) (INTEGER width) (INTEGER height) (INTEGER z)
Creates a platform named name with its upper left-corner at (x,y) at a raised level of z. The default platform of play is at (0,0) with a width, height of (20L, 20L) and z level of 0
"Transporter" (IDENTIFIER name) (INTEGER x) (INTEGER y)
Creates a Transporter Gizmo named name with its upper left-corner at (x,y) and diameter of 1L. Gizmo-creation commands (Square, Circle, Triangle, RightFlipper, LeftFlipper, Absorber, Ball, Transporter) can now take an optional PLATFORM property pair such as "PLATFORM=l1" where l1 is a platform defined in the same file. Gizmo creation commands with a correct platform property-pair will be placed on the appropriate playing platform. Gizmo creation commands without a valid platform property-pair will be placed on the default platform.

You should specify and document the semantics of the remaining commands and test accordingly.

Ambiguities

Parts of this amendment have been left intentionally vague. It is up to you to decide what (if any) clarifications are necessary. You should include any changes to your Revised Specification documentation in your final submission on Dec. 10.

Design Decisions

Spend some time thinking about the best way to incorporate this change into your design. In your final design write-up, be sure to discuss the changes to your initial design (and the relevant trade-offs). You will be graded on how easily your initial design can support the amendment, and how cleanly you incorporate the amendment into your design.

Change Log

This section will detail the changes made during revisions of this handout. You may use the version number at the bottom of your hardcopy to determine what has changed since you printed this handout.

Top