Goodbye, ABBA


A few days ago I realized that, somehow, ABBA was always present in the initial IT layouts. I figured maybe I was seeing things and didn't give it much importance.

This morning, though, I was fixing something unrelated and saw that, no, ABBA was always there. So I thought maybe it was a matter of frequency or something like that, but my interest was well and truly piqued, so I started debugging and - lo and behold - there it is: the grid always chose ABBA as first word in Italian. After further investigation it turned out that this was caused by this implementation of "picking an item out of an array":

return array[rng.randi() % array.size()]

which was recommended somewhere as a way of dealing with the fact that Godot's Array doesn't let you specify a RNG to use for pick_random()

Well, you know the saying "Don't trust what you read on the Internet"? I shouldn't have, because that implementation doesn't work - I don't have the time, patience or inclination to figure out the exact reason why it doesn't but it doesn't.

So what I did is replace it with:

return array[rng.randi_range(0, array.size()-1)]

and I'm happy to confiirm this works as intended - which means grids are now a little more random and everything is good in the world.

Farewell ABBA, it's been great while it lasted.

PS: I also changed the color of letters in cooldown so that they're a little less distracting. Hope it helps.
PPS: did you know that "didest" is an actual English word? It probably appeared once in the kind of writing that includes "thou dost" and "prithee sirrah". And a second time in Wordrush.

Files

wordrush-web.zip Play in browser
Version 78 2 days ago

Leave a comment

Log in with itch.io to leave a comment.