A very tiny (500 character) clone of a certain word guessing game. Try guessing the 5-letter word by typing in the field. Hit enter to guess. Any letters that are correct and in the correct position will be marked in green, any letters that are correct, but not in the correct place are marked in yellow.

You have six tries in total to guess the word.

Comes with a total of six words built-in!

Entire source code can be found here:

<style>body,p>*{width:100%;background:#000;color:#fff}p,h1{width:20%;margin:auto}#a{background:#444}p{height:5em}</style><script>t=0;a=new Date()%6*5;w=atob('Z2FtZXNqYW1teXNtYWxsYmlyZHNncmVlbmhlbGxv').slice(a,a+5);c=v=>t++>5||v.length!=5||(document.getElementById('a').innerHTML+=`<tr>${[...v].map((e,i)=>`<td style=height:2em;background:${w[i]==e?'#4c4':w.includes(e)&&'#aa0'}>${e}</td>`).join('')}</tr>`)</script><h1>TinyWords</h1><p><input maxlength=5 autofocus onchange=c(value)><table id=a></table>

You can add your own words using a handy tool (conveniently also less than 280 characters):

<script>c=()=>document.body.innerHTML+=`<input maxlength=5 onchange=a()>`;a=()=>document.getElementById('a').innerText='replace Z2Ft... with: '+btoa([...document.getElementsByTagName('input')].map(e=>e.value).join(''))</script><p id=a></p><button onclick=c()>+

There is a mini version with just 280 characters to fit into Twitter:

<script>g=0;a=new Date()%3*5;w=atob('Z2FtZXNqYW1teXNtYWxs').slice(a,a+5);c=v=>g++>5||(document.getElementById('a').innerHTML+=`<tr>${[...v].map((e,i)=>`<td style=background:${w[i]==e?'#4c4':w.includes(e)&&'#cc0'}>${e}`).join('')}`)</script><input onchange="c(value)"><table id="a"></table>

Made for the TweetTweetJam 8.

Comments

Log in with itch.io to leave a comment.

got one of the words in 4 tries! I agree with TurdBoomerang - the obfuscation in the source code was a great touch! Incredible work!

(+1)

Congratulations and thank you for your kind words! 😉

I love the fact that your source code obfuscates the words baked into the game. And the tool to add your own words is such a cool touch!

Thank you for your kind words! 😉

I thought quite a bit about how to make it fun for people when they can see the source code. Fortunately, Javascript has a short Base64 decode function!

I guessed the right word on my first guess! Thought it had glitched but it was an actual answer, turns out! The second one was tougher. Great work. :)

Glad you enjoyed the game! 😃

I did choose words that fit the theme of the jam, but I did not think anyone would guess one first try! Congratulations!

If you don’t mind, you can tell me in a private message which word it was you guessed on the first try!