Activities/VisualMatch

About Dimensions
Dimensions (previously known as Visual Match) is a pattern-matching game written for Sugar; it is included as part of the Honey collection of Sugar add-ons. The object of the game is to find sets of three cards where each attribute—color, shape, number of elements, and shading—either match on all three cards or are different on all three cards.

Prime Dimensions is the number variant of Dimensions, where instead of shape, three prime numbers, 5, 7, and 11, are used. Texture is replaced by representation, e.g. Arabic numerals, Roman numerals, Mayan numerals, etc.

Word Dimensions is the word variant of Dimensions, where instead of shape, three word categories are used: animal, food, celestial body. Texture is replaced by font attribute: bold, italic, normal.

Visual Match is deprecated.







Where to get Dimensions
Dimensions is available from the Sugar Activities Library: Dimensions Prime Dimensions Word Dimensions. The source code is available at, , and.

The basics
Play by clicking on three cards to make a match.
 * As you click, the cards will move to the match area on the left side of the screen. (You can also drag the cards to the match area.)
 * Once three cards are in the match area, a validation test is run:
 * If the cards make a valid match, a smiley face will appear.
 * If they are an invalid match, a frowny face will appear, which details as to why the cards do not match. Clicking on the smiley face will result in the match being removed and new cards dealt from the deck. Clicking on the frowny face will remove the last card in the match area back to the right side of the screen.
 * Once the game is over, the screen will fill with smiley faces.

There is a video of basic game play at.

Note: When Dimensions first starts up, it shows a simple animation of game play. Click on the screen to interrupt the animation and begin play.

More details

 * Cards have four different attributes: color, shape, fill texture, and number of elements.
 * The number version works with prime factors instead of shapes and textures.
 * The word version works with semantic groupings.


 * Matches must be valid across all four attributes. Examples of valid and invalid matches are shown below.
 * A valid match is defined by cards where each attribute is either the same on each card or different on each card, e.g, all three red cards or one red, one green, and one blue card.
 * An invalid match is when two cards share and attribute and the third card does not, e.g., one red and two green cards.


 * At the end of the game, all of the matches are displayed in a simple animation.
 * Also, the game state is saved to the Journal and restored upon resume.
 * A simple cooperative sharing model is supported.
 * Everyone works cooperatively to find matches.
 * Only the initiator of the shared session can start new games, change game type or level.

Examples of valid matches
The colors, shapes, and shade match; numbers are different.

The numbers match; colors, shapes and shade are different.

Everything is different.

Examples of invalid matches
two of the same colors (red)

two of the same shape (X)

two of the same shade (solid)

two of the same number (2)

Additional features

 * Dimensions includes a computer (robot) assistant: The robot will help you find matches.
 * It operates on a timer—finding matches after an adjustable number of seconds.
 * The robot is enabled/disabled by clicking on the button the the Tool menu.
 * You can also use the robot as a computer opponent. Decreasing the time between moves increases the challenge.


 * Dimensions includes Beginner, Intermediate, and Expert Modes.
 * In Beginner Mode, there are only 9 (32) cards and only two card characteristics,
 * In Intermediate mode, there are 27 (33) cards and three card characteristics.
 * In Expert Mode, there are 81 (34) cards and four card characteristics.


 * Dimensions includes number-search and word-search games in addition to the pattern-search game.
 * There is an edit mode so that customized word lists can be used in the Word Game (and shared over the network).
 * Also, you can load custom cards from the Journal.


 * The grid layout is arbitrary; there is no need to pick in rows or columns, or one from each column.
 * The blank cards on the left are a place to display the most recent match; they can be otherwise ignored.
 * A count of number of matches found is shown in the toolbar; when the robot assistant is helping, the count is displayed as two numbers, where the number of matches found by the robot is in parentheses, e.g., 3(2) would indicate that the robot found 2 matches out of a total of 5 (3+2) found so far.
 * Dimensions keeps track of your best times (one for Beginner Mode and one for Expert Mode). These times are displayed next to the level-mode buttons on the Tools Toolbar.
 * As you improve, Dimensions will automatically advance you to a more difficult level of play.


 * You can select cards using the keyboard:

Watch out, because Dimensions can be very addictive.

Other modes of play
Number Game

Everything is different: colors, prime factors, and representations.

Word Game

The words are from different semantic groups; the colors are different; the font style (bold) matches.

When there is no match


On occasion, there is no match among the 12 cards on the grid. If there is no match, three additional cards are dealt along the bottom row as illustrated in the figure above.

The toolbars
THIS SECTION NEEDS TO BE UPDATED TO REFLECT THE REFACTORING OF VISUAL MATCH INTO 3 SEPARATE ACTIVITIES.



The Main Toolbar (from left to right):
 * The Sugar Activity Button:used to access the Activity Menu, which includes sharing;
 * The Game Button: used to access the New Game Menu;
 * The Tools Button: used to access the Tools Menu, which includes a computer assistant and game-level variants;
 * The Numbers Button: used to access the Numbers Menu, which includes a variety of Number Game options;
 * The Deck Counter: The number of cards remaining in the deck is displayed
 * The Match Counter: The number of matches found is displayed;
 * Elapsed Time Counter: The number of seconds that have elapsed since the last match was found is displayed;
 * Status: The current status is displayed; Once all of the matches have been found, the total elapsed time is displayed. Note that there may be some cards left on the playing field at the end of the game that do not make a match.
 * The Help Button: (not shown) Help for all toolbar buttons.
 * The Sugar Stop Button: used to exit the activity.

The Game Toolbar (from left to right):
 * New 'Pattern' Game: sets generated from xo✓ cards
 * New 'Number' Game: sets generated from 5, 7, and 11
 * New 'Word' Game: sets generated from semantic categories, e.g., foods, animals, celestial bodies
 * New 'Custom' Game: sets loaded from images in the Sugar Journal
 * The Robot Button: used to turn on/off computer assistance;
 * The Robot Pause Control: time (in seconds) before robot assistance starts;
 * The Level Buttons: used to switches between Beginner (2-dimensions), Intermediate (3-dimensions) and Expert (4-dimensions) Modes;



From left to right:
 * The Sugar Activity Name field:
 * The Sugar Write-to-Journal Button (Sugar 0.96+): used for writing notes to the Journal reflection field.
 * The Sugar Share Button: used for sharing the activity for collaborative play;
 * The Copy-scores-to-clipbaord Button: used for copying score history to the Sugar clip board. Scores can be imported into SimpleGraph.



From left to right:


 * The Edit-words Button: used to invoke a panel in which to edit the words used in the Word game;
 * The Load custom-cards Button: used to invoke a panel in which to load cards from Journal.



From left to right:
 * Products Cards: e.g. 1✕5, 2✕7, 3✕11
 * Roman-numeral Cards: e.g., V, XIV, XXXIII
 * Number-word Cards: e.g., five, seven, eleven
 * Chinese-number Cards: 五, 七, 十一
 * Mayan Cards: Mayan numerals
 * Quipu Cards: Quipu
 * Hash-mark Cards: AKA tally marks
 * Dots-in-circles Cards:
 * Points-on-a-star Cards:
 * Dice Cards: Dice
 * Dots-in-rows Cards:

The game is then created from digits, one of (a) to (f) and one of (g) to (k)



Note: In older versions of Sugar, the toolbars appear above tabs.

From left to right:
 * Sugar Activity Tab: Sharing, Stop, ...
 * Game Tab: New game buttons
 * Tools Tab: robot, play Levels...
 * Numbers Tab: Number game variants

Learning with Dimensions
At a basic level, Dimensions can be used to enhance the observational skills of young learners; they are repeatedly asked: what is the same? what is different? At a deeper level, the concepts of multidimensional sets can be explored.

The numbers games can be used to explore different arithmetic representations.

Exploring the math
The combinatoric math behind Dimensions may be of interest to some learners: See for an explanation.

Creating a custom game
You can create your own set of cards for Dimensions. Use your favorite program for creating images (Paint, Turtle Art, Record, etc.) to make sets of cards. You need to create at least 9 cards in order to play at the beginner level (3 cards each along 2 dimensions). You can also make a collection of 27 cards (3 cards each along 3 dimensions) or 81 cards (3 cards each along 4 dimensions). The cards must all have the same name in the journal with the exception of a number, beginning with 1 and incrementing by 1, e.g., card.1.png, card.2.png, ... card.9.png. Any image format supported by Sugar should work and you do not have to include the image-type suffix in the title, e.g., card.1, card.2, ... card.9 will also work. Just be sure that the order corresponds to the serialization of your multidimensional space, e.g.:

You load a set of custom cards from the Journal by clicking on the 'import image' icon and selecting any one image of your set. The rest will be loaded automatically.



The above cards were generated in Turtle Art. The sample code is supplied with Turtle Art: set.ta, the code generates a deck of cards and saves them as SVG to the Journal.

Show me the code
You can explore the Dimensions source code [cloning the project] directly from git.

Where to report problems
There are several known problems with the current version of Dimensions:
 * Restore from Journal does not work on pre-0.82 versions of Sugar.
 * Chinese Cards don't display properly on some systems due to a missing font.
 * There is no indication of whom found the match in group play.

Reporting problems
If you discover a bug in the program or have a suggestion for an enhancement, please file a ticket in our bug-tracking system.

You can view the open tickets here.

Credits
Dimensions was written by Walter Bender and the students from his 2009-2010 freshman seminar at MIT: Games, Puzzles, and Other Things to Think With. Special thanks to Michele Pratusevich and Vincent Le, as well as Mark Battley.