Project 004
Sliding Tiles Puzzle.
Retro sliding tile puzzle game with multiple grid sizes.
A retro and nostalgic Sliding Tile Puzzle game which brings back the excitement of your childhood. With five grid sizes to choose from, this app offers a challenging yet entertaining experience. The Sliding Tile Puzzle uses the Unsplash developer API to fetch random images for the puzzle. The image is then scaled based on its aspect ratio which allows it to fit into the puzzle pieces no matter the image or puzzle resolution.
Creating the puzzle board introduced some interesting game logic, as only one half of randomly generated puzzles are solvable. The solution for a randomised yet solvable puzzle comes from calculating the parity of the generated array, and swapping any two random pieces as required. More information regarding the solvability of sliding tile puzzles is referenced here.
Creating the puzzle board introduced some interesting game logic, as only one half of randomly generated puzzles are solvable. The solution for a randomised yet solvable puzzle comes from calculating the parity of the generated array, and swapping any two random pieces as required. More information regarding the solvability of sliding tile puzzles is referenced here.