# SameGame

KSame on Ubuntu Linux

SameGame (さめがめ) is a tile-matching puzzle originally released under the name Chain Shot! in 1985 by Kuniaki Moribe (Morisuke). It has since been ported to numerous computer platforms, handheld devices, and even TiVo,[1] with new versions as of 2016.

## History

SameGame was originally created as Chain Shot! in 1985 by Kuniaki Moribe. It was distributed for Fujitsu's FM-8 and FM-7 platforms in a Japanese monthly personal computer magazine called Gekkan ASCII. In 1992, the game was ported as SameGame to Unix platforms by Eiji Fukumoto, and to the NEC PC-9801 series by Wataru Yoshioka. In 1993, it was ported to Windows 3.1 by Ikuo Hirohata. This version was translated into English by Hitoshi Ozawa, and is still available from his software archive.[2] In 1994, Takahiro Sumiya ported it to Macintosh. This version has some gameplay differences—three, instead of five, colors—and is probably the most widely distributed of the original series. It was the basis for the Same Gnome and KSame variations created for Linux.

In 2001, Biedl et al. proved that deciding the solvability (whether all blocks can be removed) of 1-column (or 1-row) 2-colour Clickomania can be done in linear time. Deciding the solvability of 2-column, 5-colour Clickomania is NP-Complete. Deciding the solvability of 5-column 3-colour Clickomania is also NP-Complete.[3]

## Gameplay

### Game mechanics

SameGame is played on a rectangular field, typically initially filled with four or five kinds of blocks placed at random. By selecting a group of adjoining blocks of the same color, a player may remove them from the screen. Blocks that are no longer supported will fall down, and a column without any blocks will be trimmed away by other columns always sliding to one side (often the left). The goal of the game is to remove as many blocks from the playing field as possible.

In most versions, there are no time constraints during the game. However, some implementations gradually push the rows upward or drop blocks from above. Sometimes the player can control the number and timing of blocks that drop from above in certain ways. For example, on some implementations for the iOS, this can be done by shaking the device. The game ends if a timer runs out or if no more blocks can be removed. Some versions, including some versions for Windows Mobile, include both portrait and landscape orientations.

### Gallery

#### Variations

In one variation, the game starts with no blocks on the field. Blocks fall down to the playing field, and must be removed before they reach the top. If they reach the top and overflow, the game is over. In some variations, such as Bubble Bang, circles or balls are used instead of blocks—which alters the gameplay, as the balls form different shapes than square blocks.

In three-dimensional variants, the playing field is a cube (containing smaller cubes) instead of a rectangle, and the player has the ability to rotate the cube. "Cubes" for iPhone OS uses this approach.

Some versions allow the player to rotate the playing field 90 degrees clockwise or counter-clockwise, which causes one of two things to happen:

1. The left and right sides become the bottom and the top, and the blocks fall to the new bottom. The orientation switches between portrait and landscape. NeoSameGame for iPhone OS uses this approach.
2. The blocks fall to the left or right side, but the player must rotate the field back to portrait orientation (which is fixed). Bubblets Tilt for iPhone OS uses this approach.

In some variations, blocks can be removed when connected to blocks of the same color diagonally, not just horizontally and vertically. Some versions introduce new types of blocks. The different types of blocks interact in various ways with the play field; for example, one type might remove all the blocks in a row. An example of this is the "Revenge mode" in PocketPop Revenge (PocketFun) for iPhone OS.

#### Rules variations

1. The game ends when the playing field is cleared, or if the remaining blocks cannot be removed. At the end of play, the player receives a score.
2. When the playing field is cleared, instead of ending the game, a new level appears—usually harder, with more block types or lower time limits, or both. The condition for winning may vary between levels. Instead of clearing the whole level, for example, a certain score or a certain number of removed blocks must be reached. When the needed score is reached, in most versions the player is allowed to clear the rest of the level. If the player cannot reach the needed score—or if the timer runs out—the game ends, and the player receives a final score.[citation needed]
3. In an "endless" variant, the game starts with an empty field. The blocks or balls start falling down; but if they reach the top, new blocks stop falling, so they do not overflow—thus, the game never ends. The player can end the game at any time by waiting for blocks to reach the top, then performing a special action (for example, right-click instead of left-click).
4. Some versions have player lives.[citation needed] If a player reaches a losing condition one time, the game does not end; instead, a life is lost. If all lives are lost, the game ends.
5. In the "continuous" variant, whenever a vertical set of blocks has been cleared and the remaining blocks have shifted to one side, a new, randomly selected column of blocks will pop up on the other side, thereby allowing a game to be played for an extended amount of time.[citation needed]
6. In the "shift" variant, when a set of blocks has been cleared, all remaining blocks to the top and left will shift down and to the right.[citation needed]
7. The "megashift" variant is a combination of the rules of the "continuous" and "shift" variations.[citation needed]

### Scoring

Same GNOME, the SameGame for GNOME

Most versions of the game give ${\displaystyle (n-k)^{2}}$ points for removing ${\displaystyle n}$ tiles at once, where ${\displaystyle k=1}$ or ${\displaystyle 2}$, depending on the implementation. For instance, Insane Game for Texas Instruments calculators uses ${\displaystyle (n-1)^{2}}$; Ikuo Hirohata's implementation uses the formula ${\displaystyle n^{2}-3n+4}$. The Bubble Breaker implementation for Windows Mobile uses the ${\displaystyle n(n-1)}$ formula. The 2001 version released by Jeff Reno uses the formula ${\displaystyle n(n-2)}$.

Some versions also offer a large bonus for removing all blocks from the screen, or leaving no more than a certain number of blocks. Others reduce the final score based on the number of blocks remaining at the end of the game. Some game versions award bonus points for clearing the field quickly, encouraging faster play. The faster the player finishes the level, the bigger the bonus. Still others offer combination, or chain, bonuses for clearing the same color of blocks two or more times in succession.

Another scoring technique awards bonus points for each chain of a certain color that has a certain number of blocks (for example, two red blocks or 11 blue blocks). After receiving the bonus once, sometimes the bonus condition changes. BPop uses this scoring variation.

Some versions have a simple scoring system: each block removed is worth one point, and there is no bonus for removing more than two blocks at a time. This is seen in the Same Pets and Same Hearths variants.

#### Goal-based scoring

Some versions award scores based on the attainment of goals. This is typically seen in multi-level versions of the game. There are four primary scoring systems for such games.

In one variation, each level has a target score. The player's score starts at zero, and the player must reach the target score. At the beginning of each level, the player's score is reset to zero; the target score increases with each level.

Other versions have a cumulative target score. In these versions, the player's score carries over from level to level. As a result, if the player substantially exceeds the target score on a given level, they may enter the subsequent level having already met that level's target score, as well. BPop has a cumulative target score.

Some versions maintain the same target score for each level; such variations can be played indefinitely. In such games, the player typically loses due to poor planning or a lapse in concentration. Examples of such games are Same Pets and Same Hearths.

In games without a goal score, like Bonkers for iPhone and SameGameBros for iPhone, the goal is to clear the level completely. The game ends when the player fails to do so.

## Visuals

Blocks typically appear as colored squares, circles, or spheres. Some variations use gradient shading to give the illusion of dimensionality. Other tile themes, or skins, include animals, hearts, stars, faces, Lego blocks, and jelly bears. Designs may follow a theme, such as Christmas or monochrome. Most games have only one skin, but others allow choosing from multiple skins.

There is a special visual aspect in some versions; instead of separate blocks, games like iDrops and SameGameManiak feature bordered areas for adjacent blocks of the same color. Some have elaborate tile graphics, featuring pictures or patterns inside the tile, like KSame and Same GNOME.

### Variations

Reveal the picture
The SameGame concept can be extended to a "Reveal the picture" game. A picture or photo is behind the blocks; it becomes increasingly visible as blocks are removed, until it is completely revealed. Examples include Same Pets, Same Hearts and the Nissan Cube promotional app for iPhone.
Animation
Some games feature animation of one or more game events, such as cleared tiles bursting or exploding, or scoring animations (BPop, Bubblets Tilt).
Block highlighting
Some versions display which blocks are selected with a border around them (BPop), jittering of the blocks (BPop), or an increase of the size of the selected blocks (Bubblets Tilt). If the blocks are deselected (usually by dragging away from them, or tapping another block chain or a single block), the highlight is removed.

## Versions

Versions of SameGame
Name Author Release Date Platforms Notes
Chain Shot! Kuniaki Moribe 1985 Fujitsu FM 8/7 · PC‑8801 · PC‑9800 · N5200 (1988) · Macintosh (1992) The original iteration of the game. Had a 20×10 playing field and four colors.
Same Game Eiji Fukumoto 1992 Unix The first version titled Same Game; it increased the number of colors to five.
Same Game Wataru Yoshioka (W. Yossi) PC-9801
Same Game Ikuo Hirohata (Japanese)
Hitoshi Ozawa (tr. English)
1993 Windows 3.1 Added an optional large field of 25×15. The large field requires an 800×600 desktop resolution.
KSame
Same Gnome
Swell Foop
Based on Takahiro Sumiya's Macintosh version.
Undake 30: Same Game 1995 SNES Featured Mario franchise-related icons: Mario's head, coins, Super Mushrooms, Fire Flowers, and Yoshi eggs.
ColorFall Michael LaLena 1998 Java/Browser based Added the concept of levels. Clear levels by removing a fixed number of colors. New colors are added every level. Five different versions are available.
Clickomania! Matthias Schüssler 1998 Windows Board size and number of colors are configurable. Originally the goal was only to clear the playing field, the number of blocks removed in one turn did not affect the score. This is still the default setting.
SameGame Ronald van Dijk 1999 Amiga It has a 15×10 playing field and three colors.
Sega Swirl Scott Hawkins (Sega) 1999 Dreamcast · Adobe Shockwave · Palm OS
MacStones Craig Landrum 1999 Based on Same Gnome.
Spore Cubes René Boutin / Spore Productions 2000 Web browser, Windows, ActionScript 3, Palm OS, Pocket PC, iOS, Android (operating system) Inspired by the addictiveness of Clickomania! (see above), this game featured two skill levels which varied the number of colors in the playfield, consisting of 10 x 13 cubes. The original version of the game had randomly selected images behind the cubes, such that when the playfield was cleared, the player could see the entire image.
Maki Christopher G. Stach II December 2000 Java applet/Browser based Three difficulty levels, five colors, ${\displaystyle (n-2)^{2}}$ scoring, cleared board bonus, online high scoring.
PocketPop PocketFun 2001 Pocket PC Won a number of awards, including Best Game, in Pocket PC Magazine 2001.[4][failed verification]
Jawbreaker 2003 Pocket PC
Bubble Shot FingerFriendlySoft iOS A Bubble Breaker–compatible game where adjacent bubbles visually melt into larger bubbles. Includes additional "Folding" and "Black Hole" modes and static challenges.
bubbles.el Ulf Jasper February 2007 GNU emacs Can display using graphics or text, according to availability
SameGame Steve and Oliver Baker 2008 JavaScript Online version that allows configuration of board size, number of colors and offers a range of alternative tile themes to play with.
Bubble Bang Decane January 2009 Web browser and iOS Three-dimensional game using balls instead of blocks. The iOS version uses Nvidia PhysX for realistic physics. The web browser version requires Unity.
SameGame Alan Alpert July 2009[5] All supported Qt platforms Written as a QML/QtQuick demo.
Pop'Em Drop'Em SAMEGAME Hudson Soft March 23, 2009[6] WiiWare
SameGame Torbjörn Gustafsson February 2009 Android (operating system)
Bubble Drop! Gizmobuddy.com Symbian S60 Includes the ability to selectively remove obstructing bubbles by using "tools", "acid", "fire", or "bomb", and with eight different gameplay modes of three and six colors. Players can submit high scores to a website.
ColorBalls Pistooli March 2010 Haiku OS
Click-o-mania HTML Bugaco January 2011 JavaScript Written in GWT[7]
Cube Crush Gregor Haag June 2011
2015
2016
ActionScript 3
Html5
Android (operating system)
Written in OpenFL to be cross-platform. Online Highscores. 3 and 4 color mode.[8]
Maki appsburgers September 2011 Android (operating system)
Bubblet Edouard Thiel October 2011 Linux, Mac OS X, Windows Written in C and included in EZ-Draw[9]
Bubblet-js Benoit Favre October 2011 JavaScript Online version, translated from C using EZ-Draw-js[10]
Tapotron Demura Games October 2013 iOS
One More SameGame Dušan Saiko October 2014 QT5 Online score synchronization, multilanguage, installation packages for Android, Windows, Linux[11]
SCRUSH Zafar Iqbal December 2016 Scratch (programming language) Online, Multi-platform, Highscore[12]
samegame1k Gábor Bata February 2017 JavaScript Online version, in 1024 bytes of JavaScript. An entry for the JS1k 2017 code golfing competition[13]

## References

1. ^ http://myaccount.mytivo.com.au/tivoservice/samegame
2. ^ Ozawa, Hitoshi. "ISOFT - Home of Japanese software". Retrieved 2010-11-28.
3. ^ Biedl, Therese; Demaine, Erik (2001). "The Complexity of Clickomania". More Games of No Chance. arXiv:cs/0107031. Bibcode:2001cs........7031B.
4. ^ "pocketfun". pocketfun.co.uk.
5. ^ "Qt Declarative UI SameGame". Nokia. 2009-07-28. Archived from the original on 2014-03-25. Retrieved 2014-03-24.
6. ^ "One WiiWare Game and Two Virtual Console Games Added to Wii Shop Channel". Nintendo. 2009-03-23. Retrieved 2009-03-25.
7. ^ "Archived copy". Archived from the original on 2011-07-08. Retrieved 2011-01-19.CS1 maint: archived copy as title (link)
8. ^ http://gregorhaag.com
9. ^ http://pageperso.lif.univ-mrs.fr/~edouard.thiel/ez-draw/index.html
10. ^ http://pageperso.lif.univ-mrs.fr/~benoit.favre/EZ-Draw-js/jeu-bubblet/jeu-bubblet.html
11. ^ http://samegame.saiko.cz
12. ^ https://scratch.mit.edu/projects/136505698/
13. ^ https://gaborbata.github.io/samegame1k/