📜 ⬆️ ⬇️

Bushed Bricks: A simple and exciting JavaScript game.

image

The Russian version of the name of the game sounds like “Stray Blocks,” which quite amply conveys its storyline. It is not good for worthy representatives of the “quadrangular” kind to hang out anywhere. The main task of the player will be to find a shelter for them for which game points will be awarded. You can shelter our “orphans” along the sides of the playing field, but only on the condition of matching colors and a sufficient level of reliability. Next, first things first ...

Rules and mechanics of the game


The playing field consists of empty cells (by default, 7x7). From the start, the player has a set of five blocks, one for each available color, which are arranged in a random order. With each subsequent step, two blocks of random color are added. On the sides of the playing field there are four multi-colored lines symbolizing “shelters”, which are ready to kindly accept a block of the corresponding color, but only if certain conditions are met:

First, “shelter” can only really worthy comrades with good karma. Blocks improve their karma by merging. A block that reaches its maximum value is marked with a number symbolizing the number of associations. He can still continue to interact with other blocks of his color, but at the same time, the shelter doors of the corresponding color are open for him. The growth of karma looks like this:
')
image

Secondly, there are among the blocks and "hopeless" individuals who are not ready to accept under any circumstances - they are marked in brown. From personal opposition and some bitterness to the world around them, their main task is to prevent the player from carrying out his responsible mission.

Game points and management


For placing a block in a shelter that meets all conditions, 10 points are awarded for each unit of karma.

Options are available for managing navigation keys ← ↑ ↓ → and swipe for mobile devices.

The game engine is implemented on "pure" javascript. You can adjust the game balance to your taste. Key game characteristics can be set via query parameters. More in the project repository description.

Game sources are available on GitHub. You can play there.

Updates


1. The process of using algorithms like “washing machine” is significantly complicated. Now turning over at least hourly, even against it is difficult to go much further than the 200th move. Playing "intelligently" you can score a lot more points.

2. Slightly changed the balance of the game. Now brown blocks will appear more often.

3. Improved mobile version. It looks like this:
Screenshot from a mobile device, resolution 720x1280

Source: https://habr.com/ru/post/314402/


All Articles