Show HN: Spindle, a cross between Wordle and a Rubik's Cube made in PHP (playspindle.com)
I was late to wordle, so I am also late to making my own version.
In Spindle, you rotate words on a grid with the aim of assembling the day’s target word. I enjoy it, so I thought some of you might enjoy it too.
From a tech perspective, it’s a very simple Laravel / Livewire app. My happy place in recent years has been Typescript and SvelteKit, so this was a bit of an adjustment, but it allowed me to take advantage of an existing shared hosting server meaning no additional financial outlay. Happy to report a positive experience with PHP and this framework, although I do miss types! Deploying with rsync feels enjoyably old school.
(I gather PHP does have types now, but perhaps I’m using the wrong IDE or need a specific VS.Code plugin…)
Very happy to answer any questions, although I’m the first to admit it’s very simple from a tech perspective. Your guess at how it was implemented is probably a better solution than what I actually did :)
Happy holidays all!
43 comments
[ 2.8 ms ] story [ 107 ms ] threadThe instructions could use maybe a few examples on how to make a move -- but I figured it out. The game is tough and challenging, but it's really satisfying when you make progress. Well done!
A more out-there suggestion would be a replay (either on the puzzle itself or as a gif) of all the moves you made. Could make it more interesting to share with friends.
PHP does indeed have good support for types now. Laravel as a framework generally eschews them, but it's flexible enough to make it developer preference really.
EDIT: https://github.com/clarewolftrust/spindle (but definitely take it with a grain of salt!)
It is literally my first php project in years, though, and first Laravel project ever, so might not be the best educational reference!
Spoiler:
At the end, it shows you a graph of how many turns people took to solve it, and if I'm reading it correctly, only 30-ish people solved it at all, despite being on the front page of HN for 2-3 hours? Definitely on the harder end of wordle derivatives! And I bow down to whoever solved it in 9 turns.
PS: I solved it in 8 today, and my friend - who seems unnaturally good at this - solved it in 7. He always seems to beat me by 1; it’s like if the person who invented golf was best mates with Tiger Woods!
and why can't I spin more than 2 letters?
It took me a while to get it - extra instructions would be helpful.
Other words better than spin: reverse, mirror, or flip. Word reverser, word flipper.
Arguably more a mix of wordle and boggle or scrabble than Rubix.
So if you had a row like AEBUG, you could tap B then G to spin BUG, and the row would end up as AEGUB. Or you could tap B then E to spin BE, and the row would end up as ABEUG.
(Because BUG and BE are both real words)
It also is flawed in that if I wanted to spin, for example, BED, I could not - it would spin once BE was clicked.
Edit: I see in other places you explained how to do longer words. But that just proves the point. This needs a serious refactor of the UX.
A simple thing you can do when they try to make an invalid spin is pop up "XYZ is not in the word list" on a brief toast. That'll make it easier to learn that you need to spin words, and that you have to click the first letter first.
I'm curious to see how people did with so few turns
Also I would like an undo or at least a reset button
It would help to have an unlimited undo in a dedicated button. I realize that the undo can be done by spinning words in reverse order, but that's inconvenient and I really wouldn't remember what I did beyond last 2-3 words.
Perhaps you can have competitive and casual modes? One with the score and no undo, another without and with respectively.
There could be an official word each day that is ranked, but also randomly generated puzzles that you could play limitlessly. Only issue there is when you have words appearing in the casual mode and ranked mode, which I'm not entirely sure how to fix.
Symfony, the other big PHP framework, has a lot more to offer if you like types. It also has a combination of Encore, Stimulus and Twig to link the backend to the front, but it doesn’t have the features of Livewire.
First of all, I need to 'spin', but how do I do that? By clicking, dragging, typing...? Any or all of these? And if so, clicking/dragging what?
And what is it that is being spun? Rows, columns? Apparently it's words, but that is mentioned nowhere.
Second, in the 'How to Play' there are these two examples: > For example, you could spin CAT to obtain TAC. > You can also spin in reverse, so you could spin TAHC to make CHAT
I don't see the difference between these two, both reverse a word by 'spinning', so why are these two seemingly identical examples given here?
By rearranging existing words on the grid you can map new words including the "target" word. It's actually pretty hard I find...
After checking back here a few times I eventually got that I could only spin valid words but they were hard to find so I ended up relying heavily on 2 letter words to reach my final score of 35. Assuming that you support valid Scrabble 2 letter words https://scrabblewordfinder.org/two-letter-scrabble-words you end up spinning words that sound like gibberish most of the time so it seems a bit arbitrary when you can't spin titles like Mr or Ms. :P. Perhaps allow a few free spins to help people unblock the board? Or allow people to skip past problem letters every now and then so that they can spin longer words?
All the best with further development!
It does! In PHP fashion, checks done runtime and there’s no compile step to check your code. Can be quite a trip!
I picked up laravel again recently it’s let me work at a feverish pace, love it. Happy to see you were able to get something shipped with it as well.
Personally I find this game too difficult to be pleasurable. It’s like the difference between playing an easy-medium sudoku and a real hard sudoku. The former is relaxing whilst the latter is frustrating, time consuming and requires 100% concentration.
I like to relax while playing games :)
I am intrigued and will return. Perhaps it’s a skill to learn.
Best of luck and congratulations on the release.