Home

mlamp

Download project

Bubble Breaker

Try to arrange big areas of bubbles with the same color.
The more bubbles of the same color are part of an area, the more points you will get.
500 is quite good, 1000 is outstanding.

Product description

The aim of this game is to arrange big areas of bubbles of the same color.
The more bubbles of the same color are part of an area, the more points you will get.
500 is quite good, 1000 is outstanding.

At the beginning the field is initialized and random color values are assigned to the bubbles.
The High Score is loaded from a file.
By selecting a bubble for the first time, the game calculates the possible points for removing the area around the bubble.
Clicking a second time, all bubbles in the area which have the same color are removed.
Only areas with more than one bubble are removed.

In the next step the program checks if there are areas remaining or if the game is over.
When the user finishes the game and reaches a new high score, it is stored in a file. A new game can be started.

More information

PLC_PRG: The main program, which initializes the game, controls the user action and checks if the game is over.
The selected bubbles are stored and the possible points calculated.

GenerateColor: Randomly generates one out of five colors.

GameOver: This program proves if there is an area with at least two bubbles of the same color.
If not, the game is over.

Random: Generates a random value, which is used to generate a color for the bubbles.

RemoveBubbles: Based on the selected bubble, the area with bubbles of the same color is marked and the
according points are calculated. When the area consists of more than one bubble of the same color all bubbles are removed
if the selected one gets clicked again.
Emerging gaps will be filled with the remaining bubbles and empty rows removed.

Visu: The visualization shows the game field with all bubbles.
Pressing the “New Game” button initializes a new game in the “PLC_PRG”. The “High Score” displays the value
from the High Score file. “Score” shows the current point.
“Selection Points” shows the possible points for the selected area.
Depending on the score at the end of the game one of three banners is displayed.

System requirements and restrictions

System requirements and restrictions Info
Programming System CODESYS Development System Version 3.5.14.0 or higher
Runtime System CODESYS Control Version 3.5.14.0
Required Accessories -

Screenshot thumbnail
Screenshot of the game