Wordie - an open source Wordle implementation

Show off your games, demos and other (playable) creations.
User avatar
milon
Party member
Posts: 472
Joined: Thu Jan 18, 2018 9:14 pm

Wordie - an open source Wordle implementation

Post by milon »

Everybody loves Wordle, right?
For fun & for coding practice, I give you Wordie - an open source implementation of Wordle. :D

Screenshot_2022-06-23_14-11-47.png
Screenshot_2022-06-23_14-11-47.png (59.86 KiB) Viewed 4395 times

This is version 0.5 of Wordie. It's pretty and the mechanics are complete, but there's still a lot of tweaking to do. It's currently missing a bunch of nice stuff like music, sound effects, animations, stats tracking, etc. The only "bug" I know about is the keyboard doesn't update its colors after making a guess (I just haven't added that feature yet), but it will correctly redraw if you resize the window. There's lots of optimizations & code cleanup that can happen - check the source code and look for the "fixme" comments scattered around.

The onscreen keyboard SHOULD mimic your physical keyboard, and therefore should be compatible with non-US layouts. I can't really test this though, so someone please let me know. :)

I'm releasing it now because a bunch of IRL stuff just came up, and I likely won't be able to do anything significant with this for a few months or longer.

Let me know how you like it, what you don't like, etc. And feel free to patch the code too! Just try to avoid external libraries for my sake, please.

Enjoy!

EDIT - Download current version here, or from my latest post: download/file.php?id=21234
Last edited by milon on Thu Jun 23, 2022 6:13 pm, edited 3 times in total.
Any code samples/ideas by me should be considered Public Domain (no attribution needed) license unless otherwise stated.
User avatar
BrotSagtMist
Party member
Posts: 657
Joined: Fri Aug 06, 2021 10:30 pm

Re: Wordie - an open source Wordle implementation

Post by BrotSagtMist »

Nice gui, no idea how the game is played tho.
I am not sure if creating an on screen keyboard with custom keys makes sense.
Mine is failing pretty hard here:
shot-2022-05-12_23-22-17.jpg
shot-2022-05-12_23-22-17.jpg (23.61 KiB) Viewed 5928 times
obey
User avatar
togFox
Party member
Posts: 828
Joined: Sat Jan 30, 2021 9:46 am
Location: Brisbane, Oztralia

Re: Wordie - an open source Wordle implementation

Post by togFox »

I'm not a wordle person but it looks pretty. :)
Last project:
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Turn-based PBEM horse stable (racing) management sim: https://togfox.itch.io/horse-stable-manager
https://discord.gg/HeHgwE5nsZ
User avatar
milon
Party member
Posts: 472
Joined: Thu Jan 18, 2018 9:14 pm

Re: Wordie - an open source Wordle implementation

Post by milon »

BrotSagtMist wrote: Thu May 12, 2022 9:28 pm Nice gui, no idea how the game is played tho.
I am not sure if creating an on screen keyboard with custom keys makes sense.
Mine is failing pretty hard here:
shot-2022-05-12_23-22-17.jpg
Wow, that's definitely a fail! What layout & language does your system use?

And the onscreen keyboard is a part of the game. It color codes to help you track what you've learned about each letter so far.

And thanks togFox! You can chuck the help button (the ? in the top-right) for a help panel.
EDIT: Thanks to autocorrect, you can chuck the help button! :) Or you can just click it. Whatever works on your system, lol.
Last edited by milon on Wed May 18, 2022 1:50 pm, edited 1 time in total.
Any code samples/ideas by me should be considered Public Domain (no attribution needed) license unless otherwise stated.
User avatar
BrotSagtMist
Party member
Posts: 657
Joined: Fri Aug 06, 2021 10:30 pm

Re: Wordie - an open source Wordle implementation

Post by BrotSagtMist »

Its neo german, similar to dvorak, the keys in question are üöä.
Also noticed the game crashes if i click anything other than a key with the mouse.
obey
User avatar
milon
Party member
Posts: 472
Joined: Thu Jan 18, 2018 9:14 pm

Re: Wordie - an open source Wordle implementation

Post by milon »

Gotcha. That makes sense - I hadn't considered non-US keys being present, so that's a broken implementation on my part. Sorry about that! I'm not sure when I'll have time to fix it. Since I'm just dealing with English 5 letter words (currently), I should probably just hard code a US layout - or maybe do that as a fallback if non-US keys are present.

About the mouse crashing, that's a new issue to me. What's the error message?
Any code samples/ideas by me should be considered Public Domain (no attribution needed) license unless otherwise stated.
User avatar
BrotSagtMist
Party member
Posts: 657
Joined: Fri Aug 06, 2021 10:30 pm

Re: Wordie - an open source Wordle implementation

Post by BrotSagtMist »

Code: Select all

game_state.lua:21: attempt to perform arithmetic on field 'w' (a nil value)


Traceback

[love "callbacks.lua"]:228: in function 'handler'
game_state.lua:21: in function 'isHovering'
game_state.lua:39: in function 'mousepressed'
main.lua:86: in function <main.lua:84>
[love "callbacks.lua"]:154: in function <[love "callbacks.lua"]:144>
[C]: in function 'xpcall'
But you should be able to replicate that, no? If not, is that related to the keyboard?
obey
User avatar
milon
Party member
Posts: 472
Joined: Thu Jan 18, 2018 9:14 pm

Re: Wordie - an open source Wordle implementation

Post by milon »

BrotSagtMist wrote: Thu May 19, 2022 7:57 pm

Code: Select all

game_state.lua:21: attempt to perform arithmetic on field 'w' (a nil value)


Traceback

[love "callbacks.lua"]:228: in function 'handler'
game_state.lua:21: in function 'isHovering'
game_state.lua:39: in function 'mousepressed'
main.lua:86: in function <main.lua:84>
[love "callbacks.lua"]:154: in function <[love "callbacks.lua"]:144>
[C]: in function 'xpcall'
But you should be able to replicate that, no? If not, is that related to the keyboard?
No, I haven't seen that at all, and I've tested mouse & keyboard fairly extensively (on US layouts only). Very weird. Maybe it's related to the keyboard somehow?

Anyway, I've uploaded a new version that might just fix it. It does a static US QWERTY layout, should be touch-friendly (currently untested), I tweaked the colors a little, and correctly updates the keyboard appearance after each guess. New .love is in the OP, or you can get it from this link: [obsolete link removed]
Last edited by milon on Tue May 24, 2022 2:21 pm, edited 1 time in total.
Any code samples/ideas by me should be considered Public Domain (no attribution needed) license unless otherwise stated.
User avatar
BrotSagtMist
Party member
Posts: 657
Joined: Fri Aug 06, 2021 10:30 pm

Re: Wordie - an open source Wordle implementation

Post by BrotSagtMist »

Same errors.
obey
User avatar
pgimeno
Party member
Posts: 3656
Joined: Sun Oct 18, 2015 2:58 pm

Re: Wordie - an open source Wordle implementation

Post by pgimeno »

It's crashing because `pointer` (as a gui element) lacks w and h.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest