How do I make game like Hexa Puzzle

Get help using Construct 2

Post » Fri Sep 29, 2017 11:10 am

Hello,

Any one have an idea how to make game like "Hexa Puzzle", or there is a tutorial in Scirra website?

Hexa Puzzle link: https://play.google.com/store/apps/details?id=com.bitmango.go.blockhexapuzzle&hl=en

Kind Regards.
B
10
S
4
Posts: 49
Reputation: 900

Post » Fri Sep 29, 2017 1:58 pm

Good Morning.
I also like this game, but I do not know how your mechanics work ...
I would like to learn a little about it.
Huemerson
B
27
S
18
G
22
Posts: 114
Reputation: 18,866

Post » Fri Sep 29, 2017 2:21 pm

Although the cells are hexagons, both the empty grid and coloured pieces can be encoded with 2D arrays. Then it's just a matter of comparing two arrays to check if a piece can fit into the grid. Not much different from tetris or other similar games.
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :)
B
17
S
9
G
70
Posts: 1,053
Reputation: 38,169

Post » Sat Sep 30, 2017 10:40 am

Hello,

Thank you for your reply.
This is my file: https://www.dropbox.com/s/xqiv27cudx3452f/How%20do%20I%20make%20game%20like%20Hexa%20Puzzle.capx?dl=0
I can just move one block, but I don't now how to move two or three block in the same to make a different shape of blocks.
Also I don't know how to use array.
B
10
S
4
Posts: 49
Reputation: 900

Post » Sat Sep 30, 2017 10:59 am

You can pin several blocks to some invisible sprite (block base). And then drag&drop that base sprite.
But this is the easiest part. The hard part would be checking if the blocks can fit into the grid.
And for this you should learn how arrays work.

On the second thought, this game can probably be made without the arrays, by using "Is overlapping" events.
As you drag and then drop colored blocks onto the grid, you need to test if each block is overlapping a cell and if that cell is empty (not occupied by another block).
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :)
B
17
S
9
G
70
Posts: 1,053
Reputation: 38,169

Post » Sat Sep 30, 2017 6:07 pm

Thank you very much. I will start learning arrays, it's better like you said.
B
10
S
4
Posts: 49
Reputation: 900


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, dop2000, Seruza and 10 guests