Blocks Unlock: Puzzle :-)


Blocks Unlock is a classic puzzle game

It has 3 worlds , with a total of 30 levels

The goal is to clean each level by “filling rows”

Android version is now available

Thank you Defold :slight_smile:


Can a GUI element be hidden behind a sprite with z-index?
Admob and Firebase Analytics extensions (SOLVED)

awesome game bro :heart_eyes: i like it

1 Like


Hey bro nice game. I have a question, how did you create this game. With tilemaps or something else? And how can you make the movement of figures in squares? I also wanted to create a similar game and would like to hear recommendations on how to make it better.

1 Like


Hi Wadator,

I’m glad you like Blocks Unlock, it was a lot of work, so I’ll try to talk about the main aspects!

I think I started by learning the colorslide tutorial

And yes, in Blocks Unlock levels are made up with tilemaps:

I’ve used 3 layers

  • grid: semitrasparent background grid
  • level: contains level initial blocks
  • game: layer where user’s block are dropped
    Level and Game layers are distinct so it is easy to find when level layer is cleaned, and it is time to go to the next level :slight_smile:

Movement (dragging figures, pieces) it is a bit complicated.

Pieces are game objects with 25 sprites (5x5)

With a script I can craft any different figure form.

To move (drag) the game object I’ve started from here clicking a game object
You can find concepts concerning screen coordinates, world coordinates, and finally the project with the cursor script.

Dragging pieces is the half of the work.

I’ve found hard to match where a block drops into the tilemap.
The problem to solve is the change of coordinate system: world coordinates of the game object into tile index (ie: -4,-4 to 5,5) of the tilemap.
But this depends on how you draw the collection of the level, because game objects have relative placements.

Finally (really from the beginning!!!) I’ve used rendercam to achieve the orthographic view.

I hope this information helps you get started.

In the defold community you will find a lot of examples and works, and the defold team is great (helped me a lot) with great hints!



Thank you very much for your reply. Following your recommendations I’ll try to do something.

1 Like