Jump to content
  • Advertisement
tracegame

2D Irrregular shape puzzle game match algorithm?

Recommended Posts

Posted (edited)

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.

Edited by tracegame

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!