Irrregular shape puzzle game match algorithm?

Started by
1 comment, last by Zakwayda 4 years, 11 months ago

Trying to make a mini puzzle game,like tearing a photo into pieces.

The way I can think of is to calculate those pieces of image distance.

If the puzzle image is correctly solved.

Distances between piece 1 and others should approximate be some fixed values.

Some error distance 5 or 10 should be allowed.

Question is I don't if there are any other better way to do this.

What puzzle game like this usually do to solved Irrregular shape match problem?

Pieces don't need to be at the extract right location.Small gaps should be allowed.

Advertisement

I'm not sure I followed all that, but one variable would be whether the picture is to be assembled in a fixed area (for example a rectangle defined visually by an outline), or if it can be assembled at an arbitrary position. If the former, a simple (and perhaps naive) method would be to consider the puzzle solved when the position of each piece is within some threshold distance of its correct position.

Based on your wording though I'm thinking maybe you don't intend for there to be a fixed area in which to assemble the picture. In any case, maybe you could clarify that point.

This topic is closed to new replies.

Advertisement