SameGame

SameGame (さめがめ) is a tile-matching puzzle video game originally released under the name CHAIN SHOT in 1985 by Kuniaki "Morisuke" Moribe. It has since been ported to numerous computer platforms, handheld devices, and even TiVo, 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, to the NEC PC-9801 series by Wataru Yoshioka, and to Macintosh as ChainShot! by Eiichiro Mawatari. 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. In 1994, Takahiro Sumiya ported it to Macintosh. This version has some gameplay differences—a choice of between two and 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. Follow-up work in 2015 by Adler et al. proved that deciding the solvability of Clickomania is hard even in the 2-column 2-colour case, as well as Parameterized complexity results on determining whether an instance of size n is solvable in k or fewer clicks.

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.

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.
 * 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. 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.
 * 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.
 * 7) The "megashift" variant is a combination of the rules of the "continuous" and "shift" variations.

Scoring


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