Android jigsaw puzzle game development records 0

Source: Internet
Author: User

I recently completed a small Android project called jigsaw puzzle. The project is not complex, but it is also a complete project, which involves a wealth of knowledge points.

The following is a summary as follows:

Requirement definition:

1. Select an image and go to the tile page. You can select a default image or custom image, that is, select an image from the image library or take a photo from the camera.

2. You can set the difficulty of the game, that is, select the NXN structure for the puzzle.

3. Automatically disrupt the order of the puzzle, and use the inversion and algorithm to ensure that the generated data is resolved.

4. You can view the source image during the puzzle process.

5. The puzzle has the functions of timing and recording steps.

6. After the puzzle is completed, all the images are displayed and the puzzle is successfully upgraded.

7. You can view the history.

* 8. The ida star algorithm can be used to automatically solve problems.

Basically, the above functions can be implemented. The automatic problem solving algorithm has not yet been implemented. It seems that it can only be reserved for the second edition---, alas, please advise.

In international practice, first look at the effect:



Figure 1. Is the initial interface slightly fresh? haha



Figure 2. Select the game difficulty option in the upper right corner. Ignore the option 2. for debugging purposes, change the option to 5X5.



Figure 3. Selecting images and difficulty



Figure 4. Go to the main puzzle page and click the corresponding square to move it with the blank square. It is the same as the actual puzzle.



Figure 5. Click the source image button to display the source image, which has an animation effect.


Figure 6. Complete the puzzle



Figure 7. Click the Add Custom button to select a local atlas or camera



Figure 8. Mobile phone Atlas. Ignore the photo. Xiaomi System


Figure 9. Take a photo of the camera. Please confirm the license.


Figure 10. Take a photo with the camera and go to the tile page

Basically, these functions are described above. Next, we will explain the implementation process of this project.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.