20RDLE

Discussion, Reviews & High-scores

Moderator: Moderators

Post Reply
User avatar
chysn
Vic 20 Scientist
Posts: 1205
Joined: Tue Oct 22, 2019 12:36 pm
Website: http://www.beigemaze.com
Location: Michigan, USA
Occupation: Software Dev Manager

20RDLE

Post by chysn »

If you haven't been hiding under large rocks the last few weeks, you know that this damn thing is all the rage. So why shouldn't we have it on the VIC-20?

20RDLE is a WORDLE implementation for a VIC-20 with 24K expansion. Obviously, most of that goes toward the 9000-entry word list, to verify that your moves are valid. There wasn’t much left for the game itself!

Download and enjoy! https://github.com/Chysn/VIC20-20RDLE/tree/main/vic
Screen Shot 2022-01-29 at 10.26.24 AM.png
Last edited by chysn on Sat Jan 29, 2022 9:27 am, edited 2 times in total.
VIC-20 Projects: wAx Assembler, TRBo: Turtle RescueBot, Helix Colony, Sub Med, Trolley Problem, Dungeon of Dance, ZEPTOPOLIS, MIDI KERNAL, The Archivist, Ed for Prophet-5

WIP: MIDIcast BASIC extension

he/him/his
fraural
Vic 20 Drifter
Posts: 27
Joined: Sat Oct 02, 2021 1:28 am
Location: Trento, Italy

Re: 20RDLE

Post by fraural »

Done. I'm studying :)
Bookmarked your Github;)
Thanks :mrgreen:
fraural
Vic 20 Drifter
Posts: 27
Joined: Sat Oct 02, 2021 1:28 am
Location: Trento, Italy

Re: 20RDLE

Post by fraural »

I didn't know the game.
Nice! :D

Immagine 2022-01-29 133230.png
User avatar
chysn
Vic 20 Scientist
Posts: 1205
Joined: Tue Oct 22, 2019 12:36 pm
Website: http://www.beigemaze.com
Location: Michigan, USA
Occupation: Software Dev Manager

Re: 20RDLE

Post by chysn »

fraural wrote: Sat Jan 29, 2022 6:34 am I didn't know the game.
Thanks for trying it!

I know you're working on machine language. I just finished the code comments, if you'd like to take another look.
fraural
Vic 20 Drifter
Posts: 27
Joined: Sat Oct 02, 2021 1:28 am
Location: Trento, Italy

Re: 20RDLE

Post by fraural »

chysn wrote: Sat Jan 29, 2022 7:24 pm I know you're working on machine language. I just finished the code comments, if you'd like to take another look.
Great! You are officially my Master :)
(How do you translate "Maestro"? :wink: )
User avatar
orion70
VICtalian
Posts: 4341
Joined: Thu Feb 02, 2006 4:45 am
Location: Piacenza, Italy
Occupation: Biologist

Re: 20RDLE

Post by orion70 »

Seems like this game is very popular... :mrgreen:
https://nypost.com/2022/01/31/new-york- ... n-figures/
User avatar
chysn
Vic 20 Scientist
Posts: 1205
Joined: Tue Oct 22, 2019 12:36 pm
Website: http://www.beigemaze.com
Location: Michigan, USA
Occupation: Software Dev Manager

Re: 20RDLE

Post by chysn »

orion70 wrote: Tue Feb 01, 2022 2:08 am Seems like this game is very popular... :mrgreen:
https://nypost.com/2022/01/31/new-york- ... n-figures/
Oh, yeah, you can't escape it.

The usual development task of "cloning" such a game isn't terribly interesting, because its logic is simple. What interested me here was storage and search on a VIC-20-sized platform. The rule is that you must play a valid word each move, and there are 8938 5-letter words in the U.S. English Scrabble dictionary, and 27.5K of memory available. You can't just try to jam 8938 x 5 bytes into memory. First, I'm storing each letter in five bits instead of 8, so letters need to be stored across byte boundaries. But this wasn't enough, because (9K x 5 letters x 5 bits)/8 bits is still almost exactly as much a +24K VIC has. So the words are alphabetized, with only the last four letters stored in three bytes, and there's a 52-byte table that keeps track of the starting offset of each letter. This gets a 9000-entry word list down to just over 26K.

One bit of each 3-byte packet is used as a starting letter boundary, an easy way to stop the search. Another bit is used to mark the 3000 most-common words, which can be selected as the puzzle.
User avatar
beamrider
Vic 20 Scientist
Posts: 1448
Joined: Sun Oct 17, 2010 2:28 pm
Location: UK

Re: 20RDLE

Post by beamrider »

Good effort - nice to see the Vic keeping up with the times...

I've been playing the C64 online version.

Something very nostalgic about connecting up to a BBS with a C64 and CRT monitor from my garage man-cave.

https://youtu.be/rDlWmLjZ4vY?t=26

https://misterfpga.org/viewtopic.php?t=3954
fraural
Vic 20 Drifter
Posts: 27
Joined: Sat Oct 02, 2021 1:28 am
Location: Trento, Italy

Re: 20RDLE

Post by fraural »

chysn wrote: Tue Feb 01, 2022 8:52 am You can't just try to jam 8938 x 5 bytes into memory. First, I'm storing each letter in five bits instead of 8, so letters need to be stored across byte boundaries. But this wasn't enough, because (9K x 5 letters x 5 bits)/8 bits is still almost exactly as much a +24K VIC has. So the words are alphabetized, with only the last four letters stored in three bytes, and there's a 52-byte table that keeps track of the starting offset of each letter. This gets a 9000-entry word list down to just over 26K.

One bit of each 3-byte packet is used as a starting letter boundary, an easy way to stop the search. Another bit is used to mark the 3000 most-common words, which can be selected as the puzzle.

Really very smart. I'm trying to understand the logic, it's not easy.
User avatar
beamrider
Vic 20 Scientist
Posts: 1448
Joined: Sun Oct 17, 2010 2:28 pm
Location: UK

Re: 20RDLE

Post by beamrider »

chysn wrote: Tue Feb 01, 2022 8:52 am You can't just try to jam 8938 x 5 bytes into memory. First, I'm storing each letter in five bits instead of 8, so letters need to be stored across byte boundaries. But this wasn't enough, because (9K x 5 letters x 5 bits)/8 bits is still almost exactly as much a +24K VIC has. So the words are alphabetized, with only the last four letters stored in three bytes, and there's a 52-byte table that keeps track of the starting offset of each letter. This gets a 9000-entry word list down to just over 26K.
One bit of each 3-byte packet is used as a starting letter boundary, an easy way to stop the search. Another bit is used to mark the 3000 most-common words, which can be selected as the puzzle.
Interesting, this seems like a simplified version of Deterministic acyclic finite state automaton

I guess you could reduce it even further by building a full tree, but in this case you didn't need the additional lookup complexity?
User avatar
chysn
Vic 20 Scientist
Posts: 1205
Joined: Tue Oct 22, 2019 12:36 pm
Website: http://www.beigemaze.com
Location: Michigan, USA
Occupation: Software Dev Manager

Re: 20RDLE

Post by chysn »

beamrider wrote: Wed Feb 02, 2022 4:19 am Interesting, this seems like a simplified version of Deterministic acyclic finite state automaton
That looks like a cool thing, thanks for the link! I'll check that out in detail later today.
I guess you could reduce it even further by building a full tree, but in this case you didn't need the additional lookup complexity?
I think I might have had some memory savings doing a tree for the first two characters, certainly not more than that. If the letter table isn't complete (that is, 26 two-byte offsets), then a third byte per letter must be used to identify the letter. This eats up the savings of the letter being implicit in the index. But a second-level index would use 1352 bytes, plus 9000 x 2 (2 bytes to store three letters), so a significant savings over a one-letter index. The code complexity would have gone up a bit, though. If I had needed to store an extra, say, 3000 words, I would have had to do this.
User avatar
mathom
Vic 20 Dabbler
Posts: 80
Joined: Wed Aug 07, 2019 11:37 am
Location: Centennial, Colorado
Occupation: Software Engineer

Re: 20RDLE

Post by mathom »

So I had heard of this game but never played it until I found a couple of VIC versions. First I noticed this on YouTube
https://www.youtube.com/watch?v=-1dE0U3vviQ by Matt Heffernan. It plays well but is "hard" to load because of having to load a two-part cartridge image.Then I remembered that you had posted one so I gave it a try. It is an enjoyable and moderately addictive game. I like your screen layout and the border color change on "not a word" and of course it is easier to load. So much for the "honeydo" list for the rest of today. :lol:
...mathom...
Post Reply