Inspiration
Worldle became overnight sensation. On App Store, I've played tons of word games. After some thoughts and tinkering, I realised that I wanted to showcase some skills, learn something and build something beautiful. Hate2Love is the result. You get a start word (e.g., HATE) and the target word (e.g., LOVE). And You have to reach target word by changing one word at a time. (e.g., HATE -> LOVE) That's it! [Thanks to my brother for wonderful name - Hate2Love]
Rules
- You have a start word (HATE) and target word (LOVE). Make a meaningful word by changing one letter and reach target word:
H A T E
L A T E
L I T E
L I V E
L O V E
How we built it (Yup, I'm telling all secrets - feel free to ping me on discord to know more)
- Character recognition model was trained using apple's createML app. Created separate app to write each letter and createML magically creates model using data.
- Those fonts are handwritten letter by me. And there are some other easter eggs too.
- Foundation: Each word becomes a node. And if difference between 2 word is 1, we create edge between them. (e.g., LITE <-> LIVE). Thus, dictionary becomes a graph and you can pick 2 words from same set. (There's one big word cloud that contains >95% of words and we used it to choose puzzle )
- Difficulty: It's BFS (breadth first search between two words) - the longer distance means difficult puzzle
- Hint: Solve puzzle using BFS and suggest user next word
Challenges we ran into
- Integrating CoreML was really new and building UI, adding conditions and adjusting time - those things take a lot of time compared to model itself
- I had lots of ideas and hence time felt very limited with each piece half complete at one point. I was about to leave UI components and ML part behind but constant help from my peers and motivation of prize and promises made earlier to my GF, pushed me. There were times when small things would take hours and I was just stuck.
What's Next for HateToLove?
- Make it iOS ready - gather feedback and publish it into App Store
- I wanted to store puzzle solved, categorise words and allow avatars based on milestone - this will be the next thing in my Wishlist
- Add time limit and maybe create hand made levels to give that candy crush or typical word game vibe
- Currently, Main function contains whole logic of game including appearance of shapes. I will be exploring state management and different components to optimise game in future.
How can I play?
- Download this zip folder on iPad
- Download Swift Playground app from App Store
- Unzip the downloaded file
- Open with swift playground and click run! [if you're using iPad with M1 chip, you might encounter an error. Try lowering swift version to 4.xx or lower on Mac and run playground as iOS. Tested on swift playground in iPad Air (2nd gen) and MacBook Air i5 (2015) ]
Log in or sign up for Devpost to join the conversation.