Everybody loves Wordle, right?
For fun & for coding practice, I give you Wordie - an open source implementation of Wordle.
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
Wordie - an open source Wordle implementation
Wordie - an open source Wordle implementation
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.
- BrotSagtMist
- Party member
- Posts: 657
- Joined: Fri Aug 06, 2021 10:30 pm
Re: Wordie - an open source Wordle implementation
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:
I am not sure if creating an on screen keyboard with custom keys makes sense.
Mine is failing pretty hard here:
obey
Re: Wordie - an open source Wordle implementation
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
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
Re: Wordie - an open source Wordle implementation
Wow, that's definitely a fail! What layout & language does your system use?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
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.
- BrotSagtMist
- Party member
- Posts: 657
- Joined: Fri Aug 06, 2021 10:30 pm
Re: Wordie - an open source Wordle implementation
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.
Also noticed the game crashes if i click anything other than a key with the mouse.
obey
Re: Wordie - an open source Wordle implementation
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?
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.
- BrotSagtMist
- Party member
- Posts: 657
- Joined: Fri Aug 06, 2021 10:30 pm
Re: Wordie - an open source Wordle implementation
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'
obey
Re: Wordie - an open source Wordle implementation
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?BrotSagtMist wrote: ↑Thu May 19, 2022 7:57 pmBut you should be able to replicate that, no? If not, is that related to the keyboard?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'
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.
- BrotSagtMist
- Party member
- Posts: 657
- Joined: Fri Aug 06, 2021 10:30 pm
Re: Wordie - an open source Wordle implementation
It's crashing because `pointer` (as a gui element) lacks w and h.
Who is online
Users browsing this forum: SugarRayLua and 1 guest