Hacker News new | ask | show | jobs
by jlblatt 2744 days ago
Man, has any game been implemented more times than Tetris? It was always one of those things I wanted to do and finally got around to hacking together a javascript version of it a few years ago:

http://cortexture.net/tetris/

I would love to add multiplayer to in someday...

Also, if you haven't read the Kotaku review of "Tetris" (the game in general, not any specific release/platform), it is not only profound but hilarious: https://kotaku.com/tetris-the-kotaku-review-1718328217

> The best-known and best-loved video game ... is not a Skinner box of rewards for players but a bleak encounter with futility ... Tetris ends with certain death. It is a jigsaw puzzle that must be assembled on deadline, yet never can be ... The enemy in Tetris is not some identifiable villain ... but a faceless, ceaseless, reasonless force that threatens constantly to overwhelm you, a churning production of blocks against which your only defense is a repetitive, meaningless sorting. It is bureaucracy in pure form, busywork with no aim or end, impossible to avoid or escape. And the game’s final insult is that it annihilates free will. Despite its obvious futility, somehow we can’t make ourselves stop rotating blocks. Tetris, like all the stupid games it spawned, forces us to choose to punish ourselves.

5 comments

I love your version!

Just some feedback:

- You need to add a bit more delay initially on holding left/right before moving a second time. It's too often that I held down the key just a bit too long and it moved over two spaces when I only wanted it to move once, screwing me over. And it doesn't feel like my fault because that's not how most implementations behave.

- The spin logic while touching the stack feels wrong. There's really not enough wiggle room there IMO.

- When holding soft drop, as soon as it touches the stack, it locks. It should have some delay before locking unless hard drop is hit to be able to move a piece over. Too often I just hold it down to get a piece to shift it into a corner and it locks on me before I can move it.

- Get rid of that alert at page load please. Especially if you require F5 to play a new round.

> $(document).ready(function(){ if('ontouchstart' in document.documentElement) alert("..."); });

This worked in 2012 I swear! Oh the shame now however :'(

Thank you! The timing of EVERYTHING was by far the hardest part, as evidenced by your comments, there's something intrinsically familiar about the Tetris (or Breakout or Galaga or etc...) version you are used to. I modeled this one to be closest to the first I played, the 80s GameBoy version.

That said- I've noticed these myself in some form or another. 2 & 3 are related- I need to delay more as the block sits atop a collision. 1 I thought was off but just couldn't justify the time to prove it.

Thanks for the feedback!

The GameBoy one was basically all I played as a kid. So much fun. But I'm also kinda spoiled by having played Tetris Effect these past few weeks on PSVR, which has all the modern rules and features.
> Man, has any game been implemented more times than Tetris?

Yes, because it's a relatively complex game. My bet's on something much simpler like Rock–paper–scissors which has over 60 implementations just on Rosetta Code: https://rosettacode.org/wiki/Rock-paper-scissors

The "Number reversal game" has more implementations, but that's probably less unambiguously a game and more a special-case of of a programming problem: https://rosettacode.org/wiki/Number_reversal_game

I believe the High/Low guess the number game is very common as a beginners programming task too.
In response to the quote, which is indeed quite funny, I’ve found my favorite and most difficult Tetris variations often do offer an ending, sometimes requiring extreme lengths to complete however: https://youtu.be/6YOR-nAnj4I
> Man, has any game been implemented more times than Tetris?

Chess implemented much more times than Tetris!

I'd guess Chess, crosses and naughts, or connect four. Since it's fairly easy to program those in a university course, probably they have been done countless times.
I would say "guess the number between 1 and 100" which is featured in a good number of tutorial and can be implement in less than ten lines in most languages