Hello everyone,
Thank you for reading this month’s newsletter. Last month, I wrote that I wanted to focus on one or two projects in the long run. Well, I went off script and started working on a new project - read further for more details on how and why.
Puzzle AI - Second App
Not my idea
It all started with the following picture I saw on Twitter. I was pretty impressed by the illusion generated by AI.
Then I saw another tweet by Ash, where the above image was used in a puzzle.
I thought this was a great idea for an iPhone Game. Instead of the tiles which you switched, I wanted a sliding game.
The idea would be to have one of those old puzzles where one tile is missing, and you have to move the tiles around to reveal the final image.
I turned this into a challenge: Can I go from the idea to App Store within a day? The first version should be as simple as possible. The answer is: Definitely.
First version
It took me 12 hours to go from creating the project in XCode to getting the app accepted by Apple. The main issue was not the app itself. It was rather to generate the images in a fast manner. In the end, I managed to generate a few decent images and published the first version with 34 images like these:
This is the final version. It’s very simple, in the sense that you see all the puzzles, select one and try to solve it. For now, I start counting the number of moves.
Major bug
After publishing the project, I tried to solve one of them. In hindsight, I should have done it during development. During development, I was focused on “shipping to the App Store” as fast as possible.
To generate the puzzles, what I did was to take all tiles and randomly shuffle them and mark the first tile as blank. Well it turned out, that in that case half of the puzzles are impossible to solve.
Luckily, there is a simple algorithm to check if any randomly generate puzzle is solvable. I spent another few hours to fix that bug and voilà, the new change got accepted today (02.10.2023) by Apple. 🥳
What is coming?
Don’t expect a lot! This was a learning project for me to improve my SwiftUI and AI skills. Depending on the interest of the app, I will decide to add more features.
From month on, I will go back to focus on the meal planner app and another project I have been working on (maybe you have already noticed?).
Thank you for reading this issue!