Falling Letters
A simple typing game made with only 500 characters for TweetTweetJam 8.
Type letters as they appear. The game ends if the letters reach the bottom. Backspace to restart.
Source code: (exactly 500 characters)
<style>*{background:#111;color:#1d1;font-size:8.9vw;line-height:8.2vh}</style><pre id="a"></pre><script>g=String.fromCharCode,h=document,m=Math,i=1200,s=0,a=[],r=e=>m.floor(m.random()*e),d=e=>{h.getElementById("a").innerHTML=e||a.join("\n")},f=()=>{a.splice(0,0," ".repeat(r(18)+1)+g(r(26)+65)),d(),i-=10,a.length<13?setTimeout(f,i):(d("Game Over\n\nScore: "+s),a=[])},h.onkeydown=e=>{k=e.keyCode,c=g(k),a.length<1?8==k&&(s=0,i=1200,f()):32!=k&&a.at(-1).search(c)>-1&&(a.pop(),s++,d())},f();</script>
Status | Released |
Platforms | HTML5 |
Author | OgelGames |
Tags | 2D, High Score, Minimalist, Text based, Typing |
Average session | A few minutes |
Inputs | Keyboard |
Comments
Log in with itch.io to leave a comment.
"Employee #427's job was simple: he sat at his desk in Room 427 and he pushed buttons on a keyboard.
Orders came to him through a monitor on his desk telling him what buttons to push, how long to push them, and in what order.
This is what Employee #427 did every day of every month of every year, and although others may have considered it soul rending,
Stanley relished every moment that the orders came in, as though he had been made exactly for this job.
And Stanley was happy."
- The Stanley Parable
Couldn't stop thinking of this quote while playing xD
But honestly, I love this little game.
I could be biased, but I adore the matrix-esque look!
Really smooth and pleasent to play. Good exercise to practice typing fast / blindly :D
Wow! This is very well golfed and a fun game all around! 😊
Good job!
I did find a way to shave off another 12 bytes:
Ooh nice! I didn't know the closing style tag could be omitted.
Yeah, browsers close tags for you. HTML parsing is really permissive. I have only recently learned about this when golfing my own game for the jam!
Unfortunately this does not work with the <script> tag.