Settings

Theme

Show HN: Spindle, a cross between Wordle and a Rubik's Cube made in PHP

playspindle.com

65 points by abbm 2 years ago · 43 comments · 1 min read

Reader

Hi HN,

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!

HuoKnight 2 years ago

This is a really cool puzzle! As others have said, definitely need better instructions for how to actually make moves, I spent a good amount of moves figuring it out. Also, it would be a nice addition if there was a function to share your results, similar to wordle and other similar online puzzles.

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.

  • abbmOP 2 years ago

    All great ideas thank you! It’s amazing how the core game can quickly become only 10% of the total functionality!

tcmb 2 years ago

Looks nice, but the instructions are confusing me. I've read the 'How to Play' and still don't know how to play.

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?

  • bionsystem 2 years ago

    I get it now. If you have a word like "CAT" you click on the C and the T ; because TAC is also a word it can "spin" and write TAC instead.

    By rearranging existing words on the grid you can map new words including the "target" word. It's actually pretty hard I find...

    • Contortion 2 years ago

      Except I'm trying to spin letters to make words and it's flashing red telling me it's not possible. I have SGET and I'm trying to switch the S and the G. Am I missing something?

  • theogravity 2 years ago

    Agreed. It's not clear to me when I can and can't spin something.

furyofantares 2 years ago

Very cool.

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.

eps 2 years ago

Beautifully designed, very clean, but frustrating to play due to being unpleasantly difficult. I gave up after 5 minutes.

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.

  • abbmOP 2 years ago

    Thanks for trying it! Do you think undo would be okay if it “cost” you a turn? Part of the fun (for me at least) has been the competitive nature of it (ie, competing on getting the lowest turn count)

    • eps 2 years ago

      No, imo that won't be okay. Competition is not in a picture if one can't even finish a round :)

      Perhaps you can have competitive and casual modes? One with the score and no undo, another without and with respectively.

      • HuoKnight 2 years ago

        I think this is a good idea. I personally enjoy seeing where I place and trying to use the least possible number of moves. However, I also thought it would be good to be able to play as many puzzles as you want in a day, and a casual mode may be a way to do this.

        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.

abroun_beholder 2 years ago

Congrats on releasing this. Having played through and reached the target word, my suggestion would be to try to find a way to lower the difficulty for new players. With Wordle as a new player you can just type in words make some progress and then work out more advanced strategies later on. With Spindle for me it felt frustratingly hard and not much fun at times I'm afraid.

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!

MilnerRoute 2 years ago

Nice interface!

The 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!

  • abbmOP 2 years ago

    Thanks! And yes the instructions are proving to be a common issue in these comments. Will fix those in the next day or so.

    • oaktowner 2 years ago

      I've been fiddling for a few minutes and have successfully moved a bunch of pieces...but also can't figure out for the life of me why some moves aren't allowed.

      • abbmOP 2 years ago

        It only allows English words (that are present in the word list I found… think valid scrabble words). Does that explain the issues you’re seeing?

spuz 2 years ago

Could you give more details about the rules? You said "it has to be a recognised English word for it to spin" but what does this mean? Are you talking about the word(s) formed before or after the spin? It seems completely arbitrary when it allows me to spin two letters at the moment because seemingly none of the words before or after the spin are valid 5 letter words.

  • abbmOP 2 years ago

    Sorry for the confusion! The word you spin must be a valid word.

    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)

    • codingdave 2 years ago

      I'm agreeing with everyone who says this is terribly confusing.

      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.

blowski 2 years ago

Laravel is quite patchy with types, because it does a lot of magic not supported by PHP’s type system. There are libraries and IDE plugins that mask this.

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.

kgdiem 2 years ago

> (I gather PHP does have types now, but perhaps I’m using the wrong IDE or need a specific VS.Code plugin…)

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.

nextaccountic 2 years ago

why sometimes I can't spin? (it blinks in red)

and why can't I spin more than 2 letters?

  • abbmOP 2 years ago

    It has to be a recognised English word for it to spin. And to spin a longer word, you tap the first letter then the last letter. I’ll be updating the instructions soon, but hopefully that helps in the meantime!

    • thih9 2 years ago

      I get it now. So if there's a substring "TOUR", I can click on "T" and "R" to spin it; then it becomes "RUOT". After that I am not allowed to click on "R" and "T" to spin it again, because "ruot" is not a word. But i can click on "T" and later "R" to spin it in reverse - and then it does become "TOUR" again.

      It took me a while to get it - extra instructions would be helpful.

    • eps 2 years ago

      You may want to show a popup message explaining that first time it refuses to spin. I tried playing, it kept blinking red, so I just gave up. If it weren't for the above comment, I would've never realized what was happening.

    • Terretta 2 years ago

      If updating, remove any reference to Rubix Cube since it doesn't "spin" a row, that reference is adding more confusion about how it works than it clarifies.

      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.

    • matsemann 2 years ago

      I'm trying to spin CAT as in the example. I press C, A and then it just blinks red before I get to T. I don't get how to play this.

pixxel 2 years ago

Just to give you feedback:

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.

pierrec 2 years ago

Really neatly done. It felt difficult but maybe it's a skill that can be learned.

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.

  • abbmOP 2 years ago

    It definitely gets easier with a bit of practice.

    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!

    • HuoKnight 2 years ago

      Definitely gets easier! The first puzzle after the HN post took me 181 ( including figuring out how it works), which I think is the most anyone has taken on one puzzle lol. However today it only took me 22 moves! It's a very fun puzzle and it really just needs a bit of practice.

    • spuz 2 years ago

      I definitely found it too difficult. I'd like to see a 3x3 or even a 1 dimensional version that I could use as a learning tool.

nextaccountic 2 years ago

Oh I managed today's word in 93 turns

I'm curious to see how people did with so few turns

Also I would like an undo or at least a reset button

Vuska 2 years ago

Open source? Would love to see a production Livewire app, especially since it's using v3 with AlpineJS.

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.

  • abbmOP 2 years ago

    Not yet open source, but probably a switch I can flick on GitHub. Let me check.

    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!

danielrw7 2 years ago

I love wordle games and this seems like a fun addition! On mobile (Android, Firefox/Chrome), I can't figure out how to spin words longer than 2 letters long, it just flashes red or spins the letters immediately after I tap the second letter

  • HuoKnight 2 years ago

    Seems to work if you select the first and last letter of the word you want to spin

    • abbmOP 2 years ago

      Yes that’s right - the instructions need tweaking, but you tap the first letter, then the last letter, and if it’s a recognised word then it rotates.

noman-land 2 years ago

This is really cool once you get the hang of playing. I echo all the suggestions made by other posters.

pjm331 2 years ago

Done in 50 - though I’m not sure all of my words were really words hah - very fun game

jackstraw14 2 years ago

i don't know how to play it, but love games like this

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection