A finnish version of the word guessing game Wordle implemented in Rust.

Related tags

Games sanuli
Overview

Sanuli

Sponsored Netlify Status

Sanuli

A finnish version of the word guessing game Wordle implemented in Rust.

Live version running at sanuli.fi.

Quick start

Follow Rust installation instructions.

To build the WASM based yew UI, further wasm tooling is required

$ rustup target add wasm32-unknown-unknown
$ cargo install --locked trunk
$ cargo install wasm-bindgen-cli

Create word list files and populate them with uppercase words, one per line

$ touch common-words.txt
$ touch daily-words.txt
$ touch full-words.txt
$ touch profanities.txt

Start the UI in development mode

$ trunk serve

Word lists

Three separate word list files in the root of this project containing all the words are required. The lists are not included in this repository.

The lists are:

  • full-words.txt - Full list of all accepted 5 and 6 character words. The checks if a word real or not is done against this list
  • daily-words.txt - List of daily words. The daily word is taken from row equal to the days from 2022-01-07.
  • common-words.txt - Subset of the full words list, intended for easier game mode. Note that all these words must exist on the full-words.txt
  • profanities.txt - Words filtered out when profanities filter is enabled

Beware that these are included in the release binary, and anyone can obtain the lists!

Generating base word lists

To create a word list, a dictionary like the "nykysuomen sanalista" by Kotus, licensed with CC BY 3.0, can be used as a baseline.

A parser for parsing kotus-sanalista_v1.xml file from Kotus is included:

$ cargo run --bin parse-kotus-word-list your/path/to/kotus-sanalista_v1.xml

which creates a full-words-generated.txt file in the working directory.

Development

For development, start the web server with

$ RUSTFLAGS=--cfg=web_sys_unstable_apis trunk serve

This should make the UI available at 0.0.0.0:8080 with hot reload on code changes.

To change the default port, use

$ RUSTFLAGS=--cfg=web_sys_unstable_apis trunk serve --port=9090

Release build

$ RUSTFLAGS=--cfg=web_sys_unstable_apis trunk build --release

and copy the produced dist directory to your target server.

Comments
  • Is the

    Is the "nykysuomen sanalista" list under CC 3.0 or GNU-LGPL?

    In the README.md it is stated that the "nykysuomen sanalista" by Kotus, is under the CC BY 3.0 license. This does not seem to be the case.

    From what I, as a non-Finn, could gather, the list is GNU-LGPL licensed.

    Could you either get that right or clarify it? I would like to use the list for my own clone.

    Thank you! Best regards,

    Michael

    opened by mupfdev 7
  • Share button like Wordle has

    Share button like Wordle has

    Wordle has a "share" button on the win screen, which allows one to share their result as a set of emoji without revealing the word or their guesses (the asterisk indicates "hard mode", other parts should be self-explanatory):

    Wordle 220 3/6*
    
    ⬜⬜🟩🟨⬜
    ⬜🟩🟩⬜⬜
    🟩🟩🟩🟩🟩
    

    I've written a javascript bookmarklet to do this, but it would be nice to have this as a "proper" feature.

    opened by petzku 6
  • Solving daily at midnight

    Solving daily at midnight

    Started #15 before midnight, but finished it just past midnight. Now #16 is claimed to be solved. Words are from yesterday, but colors apparently based on today's solution.

    opened by armatti 5
  • Offering word which is not on the list.

    Offering word which is not on the list.

    After getting frustrated that I couldn't guess this in the morning, I finally went and downloaded the KOTUS wordlist to see where my blind spot is. There are no other 5 letter words ending with ENIS than what my last guess is. So something is wrong but I'm not rusty enough to hunt it down.

    FI5oni_WQAEsA3X

    opened by vaizki 5
  • Menu doesn’t work with iOS Safari

    Menu doesn’t work with iOS Safari

    Dropdown menu doesn’t work with iOS Safari (iOS 15.2, iPhone SE 2020). You can not select the word lenght or any options. These work however in Chrome on the same phone and iOS.

    opened by julehti 4
  • Letter input highlights do not take into account already placed letters

    Letter input highlights do not take into account already placed letters

    IMG-20220704-WA0000.jpg

    The second S in the image is highlighted as wrongly placed even though the only known S is already in its correct position. Intuitively, the second S should not be highlighted as it is not known.

    opened by vjrasane 3
  • Games shared by links can't be revealed anymore

    Games shared by links can't be revealed anymore

    After the neluli gamemode refactoring yesterday revealing/replaying the shared game no longer works, and instead just the hidden game is shown with no way to interact with it. I forgot about that feature, oops.

    See https://sanuli.fi/?peli=S8RUS9Z8S09JUkFLSVNTQUtFVFRVS8RUS9Y_

    opened by Cadiac 1
  • Ensure that the correct word can always be guessed

    Ensure that the correct word can always be guessed

    When user submits a guess the first step is to ensure that the guess is on the full words list. In some cases user has started to solve a word and later returned to it, refreshing the browser, but the word to solve has since been removed from the word list.

    Change the logic to always accept the correct word, even if it isn't on the word list anymore.

    opened by Cadiac 1
  • Error handling on shared links

    Error handling on shared links

    In some cases, there is no error handling for Sanuli game links.

    This also shows if this issue is fixed in my fork.

    Failed game: RIHLA|OIKEAPITSAMIINALUUTARUUSURALLIRALLI; completely working

    Succeeded game: TUNKU|OIKEAKUULUTUKKUTUNKU; completely working

    Over 6 guesses: RIHLA|OIKEAPITSAMIINALUUTARUUSURALLIRALLI; a black screen and 2 error messages in the console [1, 2]. Not fixed.

    No quesses: RIHLA|; a black screen and 2 error messages in the console [3, 2]. Not fixed.

    Forbidden characters in quesses: RIHLA|ÅÅÅÅÅ55555+++++ÂÂÂÂÂ😀😀😀😀😀ЙЙЙЙЙ; a black screen and 2 error messages in the console [3, 2] (after testing I could find that the characters causing the problems were the 😀 and the Й; the game was completely working when they were removed). Not fixed.

    Forbidden characters on the right word: Å5+Â😀|OIKEAPITSAMIINALUUTARUUSURALLIRALLI; weird rendering at the "viewing screen, shows the correct word as "Ã5+ÃÐ" and on the guessing screen there is also weird rendering, and the word requires 10 characters (and is impossible to quess). Fixed as a by-product of quotient checking, this probably should be investigated further if it causes any problems within normal gameplay which it causes if the shared link is invalid (a crash).

    4-char words: RIHL|OIKEPITSMIINLUUTRUUSRALLRALL; a black screen and 2 error messages in the console [1, 2]

    6-char words (not in word lists): RIHLAA|OIKEAAPITSAAMIINAALUUTAARUUSUARALLIARALLIA; a black screen and 2 error messages in the console [1, 2]

    Random text: (not encoded in base64) RANDOMTEXT; Redirects to the last played gamemode

    (this list is not complete (yet); I will add more game links later)

    Console error messages: 1: panicked at 'index out of bounds: the len is 6 but the index is 6', src/sanuli.rs:697:22

    Stack:

    Error at imports.wbg.__wbg_new_693216e109162396 (https://sanuli.fi/index-fb0d4eb7f7e0dd71.js:410:19) at https://sanuli.fi/index-fb0d4eb7f7e0dd71_bg.wasm:wasm-function[1287]:0x4f377 at https://sanuli.fi/index-fb0d4eb7f7e0dd71_bg.wasm:wasm-function[362]:0x3b982 at https://sanuli.fi/index-fb0d4eb7f7e0dd71_bg.wasm:wasm-function[892]:0x4c962 at https://sanuli.fi/index-fb0d4eb7f7e0dd71_bg.wasm:wasm-function[531]:0x4201e at https://sanuli.fi/index-fb0d4eb7f7e0dd71_bg.wasm:wasm-function[915]:0x4d053 at https://sanuli.fi/index-fb0d4eb7f7e0dd71_bg.wasm:wasm-function[293]:0x36ab5 at https://sanuli.fi/index-fb0d4eb7f7e0dd71_bg.wasm:wasm-function[101]:0x6008 at https://sanuli.fi/index-fb0d4eb7f7e0dd71_bg.wasm:wasm-function[140]:0x1eda5 at https://sanuli.fi/index-fb0d4eb7f7e0dd71_bg.wasm:wasm-function[119]:0x17e48

    imports.wbg.__wbg_error_09919627ac0992f5 @ index-fb0d4eb7f7e0dd71.js:422

    2: Uncaught (in promise) RuntimeError: unreachable at index-fb0d4eb7f7e0dd71_bg.wasm:0x3b9a1 at index-fb0d4eb7f7e0dd71_bg.wasm:0x4c962 at index-fb0d4eb7f7e0dd71_bg.wasm:0x4201e at index-fb0d4eb7f7e0dd71_bg.wasm:0x4d053 at index-fb0d4eb7f7e0dd71_bg.wasm:0x36ab5 at index-fb0d4eb7f7e0dd71_bg.wasm:0x6008 at index-fb0d4eb7f7e0dd71_bg.wasm:0x1eda5 at index-fb0d4eb7f7e0dd71_bg.wasm:0x17e48 at index-fb0d4eb7f7e0dd71_bg.wasm:0x197a5 at index-fb0d4eb7f7e0dd71_bg.wasm:0x4eef9

    3: index-fb0d4eb7f7e0dd71.js:422 panicked at 'index out of bounds: the len is 6 but the index is 6', src/sanuli.rs:685:22

    Stack:

    Error at imports.wbg.__wbg_new_693216e109162396 (https://sanuli.fi/index-fb0d4eb7f7e0dd71.js:410:19) at https://sanuli.fi/index-fb0d4eb7f7e0dd71_bg.wasm:wasm-function[1287]:0x4f377 at https://sanuli.fi/index-fb0d4eb7f7e0dd71_bg.wasm:wasm-function[362]:0x3b982 at https://sanuli.fi/index-fb0d4eb7f7e0dd71_bg.wasm:wasm-function[892]:0x4c962 at https://sanuli.fi/index-fb0d4eb7f7e0dd71_bg.wasm:wasm-function[531]:0x4201e at https://sanuli.fi/index-fb0d4eb7f7e0dd71_bg.wasm:wasm-function[915]:0x4d053 at https://sanuli.fi/index-fb0d4eb7f7e0dd71_bg.wasm:wasm-function[293]:0x36ae6 at https://sanuli.fi/index-fb0d4eb7f7e0dd71_bg.wasm:wasm-function[101]:0x6008 at https://sanuli.fi/index-fb0d4eb7f7e0dd71_bg.wasm:wasm-function[140]:0x1eda5 at https://sanuli.fi/index-fb0d4eb7f7e0dd71_bg.wasm:wasm-function[119]:0x17e48

    imports.wbg.__wbg_error_09919627ac0992f5 @ index-fb0d4eb7f7e0dd71.js:422

    opened by androidkotlindev 3
  • Challenge mode

    Challenge mode

    Implement a challenge mode where you can generate a seed and share a link with it.

    Idea is you can play the same word chain together/against others and the players can decide the rules other than wiping out if they wish.

    This could be played online with friends or offline in the same room for example.

    Thanks!

    opened by hifi 0
  • more statistics

    more statistics

    Like in the original game, it would be nice if the game logged on which turn you solved the word. So you would see in stats that you have solved for example 12 words on the 3rd try, 20 on 4th try and so on.

    Timestamp when you start to solve a word and when you get it solved. Add these to statistics too, as in how long it took you to solve each wordle and count average times, show your best time etc. These are not in the original game but I think they would add value.

    Make separate statistics for the daily words and the basic game/chain mode. For example the original game only has the daily word mode and has stats and it's nice. Currently this version accumulates stats independent in which mode you solve them.

    I don't remember how this kind of thing is to be handled, but I copypasted the idea from the Lojban fork in case it gets implemented in one of the versions. Would be nice in both https://github.com/La-Lojban/valsr/issues/8

    opened by khlsvr 2
  • Using the default landing page as

    Using the default landing page as "päivän sanuli" page instead of random sanuli

    Me and few others have been solving a few of these, and it's not just me who have accidentally been solving the random wordle instead of the daily wordle that we thought we were solving. So to get the daily wordle we have to go to the menu and switch to it. At least that's happening to new users. It does remember I was solving a daily, if I left one unsolved and open the page a bit later though.

    opened by khlsvr 0
Owner
Jaakko Husso
Jaakko Husso
Fish Game for Macroquad is an online multiplayer game, created as a demonstration of Nakama, an open-source scalable game server, using Rust-lang and the Macroquad game engine.

Fish Game for Macroquad is an online multiplayer game, created as a demonstration of Nakama, an open-source scalable game server, using Rust-lang and the Macroquad game engine.

Heroic Labs 130 Dec 29, 2022
A solver for the popular Wordle game written in Rust.

Wordle Solver A solver for the popular Wordle game written in Rust. It does not attempt to be the most efficient solver possible but tries to avoid us

William Hoggarth 2 Jul 1, 2022
Simple wordle clone written in Rust.

wordle-rs A small wordle clone built in rust. Note: There are a lot of weird words I've never even heard in the dictionary file. If anyone knows a bet

Dheeraj Prakash 1 Feb 2, 2022
Own implementation of Wordle as a CLI app

WordleClone Own implementation of Wordle as a CLI app. Preview Note Running this program in Window's Command Prompt may display unsatisfactory visuals

Kenneth Marinas 1 Feb 18, 2022
A Computer Science Wordle variant, where all solutions are related to computing

Csdle I decided to expand a previous project I made, Rdle, which was a plain wordle clone. Recently however, I have been getting very into Wordle vari

Daniel Kogan 2 Sep 8, 2022
🚢 Battleship game implemented in Rust

?? Battleship game implemented in Rust. Fully playable between 2 players on the terminal. To play on the public instance: $ nc battleship.o

Orhun Parmaksız 55 Jan 2, 2023
The video game for Fonts of Power. A tabletop roleplaying game made in Rust with Bevy!

The code and rules for Fonts of Power, a tactical TTRPG / video game about exploring magical places. You can follow its development in our Discord ser

null 25 Dec 23, 2022
Red Light, Green Light is a traditional Korean children's game, popularised by the Squid Game TV series.

Red Light, Green Light Red Light, Green Light is a traditional Korean children's game, popularised by the Squid Game TV series. This project is the di

Cedric Chee 1 Jan 10, 2022
A game inspired by the classic atari game: demon attack

rusty_demon_attack A game inspired by the classic atari game: demon attack You can play the game in the web!

null 58 Jan 4, 2023
Snake implemented in rust.

rsnake - An implementation of classic snake in rust This game was built using the piston_window window wrapper. Download the game If youre using mac-o

Maximilian Schulke 85 Jan 7, 2023
A roguelike game in Rust

A fantasy deathcrawl in Rust Work in progress. To run, with Rust compiler and Cargo package manager installed: cargo run --release When building on W

Risto Saarelma 347 Nov 21, 2022
😠⚔️😈 A minimalistic 2D turn-based tactical game in Rust

Zemeroth is a turn-based hexagonal tactical game written in Rust. Support: patreon.com/ozkriff News: @ozkriff on twitter | ozkriff.games | facebook |

Andrey Lesnikóv 1.3k Jan 5, 2023
⬡ Zone of Control is a hexagonal turn-based strategy game written in Rust. [DISCONTINUED]

Zone of Control The project is discontinued Sorry, friends. ZoC is discontinued. See https://ozkriff.github.io/2017-08-17--devlog.html Downloads Preco

Andrey Lesnikóv 354 Nov 14, 2022
This is a simple implementation of the classic snake game in rust

My snake game Looks like this. This is with Roboto Mono Nerd Font. If you use a different font it may look different or distorted. Install rust In ord

Konstantinos Kyriakou 16 Apr 4, 2021
The classic tetris game written in Rust using ncurses

tetris.rs This is the classic tetris game I wrote to have a bit of fun with Rust. Installation and playing cargo install --

null 71 Jul 25, 2022
A refreshingly simple data-driven game engine built in Rust

What is Bevy? Bevy is a refreshingly simple data-driven game engine built in Rust. It is free and open-source forever! WARNING Bevy is still in the ve

Bevy Engine 21.1k Jan 3, 2023
Data-oriented and data-driven game engine written in Rust

What is Amethyst? Amethyst is a data-driven and data-oriented game engine aiming to be fast and as configurable as possible. Principles These principl

Amethyst Engine 7.9k Dec 31, 2022
Rust library to create a Good Game Easily

ggez What is this? ggez is a Rust library to create a Good Game Easily. The current version is 0.6.0-rc0. This is a RELEASE CANDIDATE version, which m

null 3.6k Jan 4, 2023
Minesweeper game developed with Rust, WebAssembly (Wasm), and Canvas

?? click here to play the game ?? Minesweeper game Revealing all the cells without hitting the mines is the task. Each number in the cell denotes how

Karthik Nedunchezhiyan 23 Dec 28, 2022