top | item 38821187

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

65 points| abbm | 2 years ago |playspindle.com

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!

42 comments

order

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.

abbm|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...

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.

abbm|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)

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!

abbm|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.

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.

abbm|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)

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?

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

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.

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

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.

abbm|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

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