CS109 Match-3 Games Introduction
Match-3 Games Introduction
Welcome to the exciting world of Match-3 (), a captivating puzzle game that challenges your strategic thinking and pattern recognition skills.
Game Rules:
1. Game Board: The game is played on a board which can be represented as a grid of cells. Note that there may be obstacles in the grid.
2. Piece: Pieces of cell size can be placed on the board. Each cell can be occupied by at most one piece. Each piece occupies one single cell. The pieces may have different patterns or shapes (stars, triangles, circles, hexagons, and diamonds).
3. Initial Board: The initial game board is filled with randomly placed pieces of different patterns.
4. Matching Rule: Players make moves by swapping the positions of adjacent (exclude diagonal adjacency) pieces. When three or more pieces of the same pattern align in a straight line (horizontally or vertically), they are cleared, and points are scored.
5. Generation of New Pieces: Once some pieces are cleared, pieces above those empty cells will fail down untill the empty cells are occuplied, and then new pieces are randomly generated to fill the remaining empty cells. Thus, an updated board is obtained.
6. Combos and Chain Reactions: If the match rule is met in the updated board, then it forms combos or chain reactions, earning extra points.
7. Level Objectives: The game has different levels with increasing difficulties. Each level has specific objectives, such as reaching a target score. Players must meet the objectives to proceed to the next level.
8. Move Limit and Difficulty: The game allows a limited number of moves, within which the players must achieve specific objectives of the levels. The difficulty of levels increases by reducing the number of moves available to achieve a higher score.
9. Props: There are special items available in the game that can assist players in shuffling the grid or creating special effects to aid in achieving objectives.
Project Requirements
Task 1: Game Initialization (10 pts)
Implement a level selection interface where players can choose from different levels to start a game. Multiple levels should be available, with increasing difficulty.
You are free to define your own difficulty assessment. For instance, in level one, the objective could be to reach 100 points within 10 moves, while in level two, the goal might be to reach 200 points within 8 moves.
For each level, an 8x8 game board with randomly generated pieces of various patterns should be initialized.
It's important to ensure that the initial board does not have any pre-existing matches of
three or more identical pieces. If such matches exist, the board should be regenerated. A new game can be initialized at any point during the game process within the program.
Task 2: Saving/Loading a Game (20 pts)
The saving system allows to record the information of a game, including level information (the remaining move count, game score), and information about the past moves in the game. In the saved files (records), the different piece types (stars, triangles, circles, hexagons, and diamonds) are represented by the numbers 1, 2, 3, 4, and 5, respectively.
The loading system should be able to correctly read saved files and restore the game state. Errors can be detected and properly reported by pop-up windows while loading the saved games.
Task 3: Game Play (40 pts)
The game should be able to detect match-3, match-4 or larger combinations after swapping pieces. And player will score points based on the number of matched pieces. For instance, a match-3 will score 30 points, while a match-4 will score 40 points. In cases where there is a crossover situation, such as an horizontal match-3 intersecting with a vertical match-4, the total score will be the combined score of both matches. For example, if a horizontal match-3 scores 30 points and a vertical match-4 scores 40 points, the total score will be 70 after the elimination.
The procedure for piece elimination can be described as follows:
After the player clicks on two pieces, they need to click the button "Confirm Swap" to confirm the move.
After clicking the button, the selected pieces will be swapped if the selected pieces are adjacent.
If there are no match-3 or larger combinations on the board after the exchange, the pieces are swapped back and the player will be informed.
Otherwise, eliminate the matched pieces.
After the elimination, the player needs to click the "Next Step" button (the "Confirm Swap" button should not be pressed simultaneously) to allow the pieces above the cleared area to fall down (i.e., the aforementioned Step 5).
Click "Next Step" again to generate pieces randomly in the remaining blank cells.
If match-3 or more continue to take place, the player can continue eliminating
them by clicking the "Next Step" button until there are no more match left.
There are two possible outcomes when a game terminates. If the player has earned enough points within the required number of moves, they will successfully pass the level. Otherwise, the player will fail.
After completing a level, a hint box should appear and ask if the player want to proceed to the next level.
When launching the game, three shuffle props should be provided. These props allow players to regenerate the pieces on the board. This is to prevent situations where the game reaches a dead end. In other words, the players can shuffle the board for at most three times.
Task 4: Graphical Interface (10 pts)
You are free to use javaFX, Swing or any other GUI framework written by java (such as libGDX). But the combination of WebView, HTML, and JavaScript in javaFX is not allowed.
Task 5: Advance (20/30 pts)
You can enhance the GUI by adding decorative elements, background music, and sound effects to create a more engaging user experience.
Implement a mechanism to detect if the game is stuck in a dead end. If a dead end is detected, signify the user to use the shuffle props.
Implement a hint system with which players can seek for suggestions or guidance on possible moves or strategies by the game engine.
Implement piece drop animation.
Piece drop animation refers to the inclusion of smooth animations that depict the process of pieces falling from their original positions to their new positions on the board.
Allow customization of the board shape to be something other than the standard 8x8 grid, or even introduce non-rectangular board shapes (e.g., an I-beam board like in Anipop).
Introduce an online mode that enables multiplayer functionality or reconnect after dropping offline.
After implementing the manual mode, you can proceed to implement the automatic mode as a separate game mode.
Manual mode: Implement the basic requirements as described in Task 3.
Automatic mode: Design a gameplay mode where the cycle of pieces elimination, pieces dropping, pieces generation, and elimination again is completed automatically without requiring player to click on buttons.
It is worth noting that the automatic mode should be implemented as a separate game mode. Please note that to fulfill the basic scoring requirements, it is necessary to implement the manual mode, which should be demonstrated independently of the automatic game mode. This distinction will facilitate easier evaluation of the project.
Additionally, you can create a separate game mode that incorporates additional functions and features:
Expand the selection of props available in the game, providing additional power-ups or special items that players can utilize strategically.
Introduce additional rules inspired by games like Bejeweled. For example, introduce the concept of bombs that are generated when a match-5 occurs.
Add more types of pieces and design extra rules for them.