Live data from Hacker News

Twenty years later I wrote a Tetris again

blog.levit.be

11–20 of 43 posts

Re: Twenty years later I wrote a Tetris again

#12
Great story. I recently made my own tetris game, though since I wanted to put it on the app stores and not get sued, I had to come up with a "tetris without being tetris", which was a great creative exercise. In the end I made a more unique game with some gameplay that is rather fun (IMHO) that would never have come to be if I just made a straight clone.

Re: Twenty years later I wrote a Tetris again

#13
post #6

Earlier quoted context omitted.

"...the majority of them in node.js, so now I need to install 500MB of dependencies to play a simple game of Tetris."

Check out https://github.com/mafintosh/tetris . This is a Node.js based Tetris clone, with only 46KB of dependencies. Please provide an example of a Node.js project which downloads 500MB of deps.

One? LOL, here are some that I know require ~600MB of dependencies:

- http://rungoterminal.com/

- https://github.com/shockone/black-screen

- https://github.com/nylas/N1

And there are hundreds of them, specially if they require Babel which by itself requires a significant amount of disk space, but since you were lazy to find these projects by yourself, I will be lazy too and just list three of them, I will leave the rest to your imagination.

Re: Twenty years later I wrote a Tetris again

#14
Yes because with improved tools we are expected to do more things to achieve the same goals.

Doesn't this mean we are becoming more inefficient? I wouldn't agree with calling those tools "improved", in that case.

About the size of the code: the code I wrote this time is roughly one third of the size of my original code which probably means it has less bugs and is more maintainable

That neglects to consider the fact that you are now depending on orders of magnitude more code than before, which from an overall perspective certainly doesn't mean "less bugs", and in fact could even make things more difficult to debug.

...and for something related but on the opposite direction, a competition on making the smallest (binary) Tetris clone that follows a spec:

https://files.scene.org/view/mags/hugi/compos/hc22fin.zip

The winners are 363 bytes.

Re: Twenty years later I wrote a Tetris again

#15

I think any re-implementation of something you are fond of is a great exercise. It reminds me of a small project in undergrad for a networking course. Our professor's assignment for the quarter was to implement a basic TCP stack using the UDP protocol. It wasn't perfect and had quirks but it worked for a basic client/server model and gave me a huge appreciate for what happens when we use the internet. I think the hig…

> I think any re-implementation of something you are fond of is a great exercise

This is basically my procedure for learning a new programming language. I have a list of things that I like to have on hand that cover a fair amount of possible paradigms, and re-implement them. Things like FFT, linear algebra methods, numerical root finding/optimization algorithms, etc. Project Euler (and now also exercism.io) are great for finding small but digestible things to do too.

At the moment I'm working on finding some better mathematical examples for class abstractions & better use cases for object-oriented concepts in general. Because it looks like I'll be teaching a course either in Java or C# next fall. Coming from a scientific computing background the usual use cases for java and .net aren't my typical problem areas of expertise (though there are some things I definitely do appreciate about them).

Re: Twenty years later I wrote a Tetris again

#17
I like to have a simple personal 'benchmark' when learning new languages. One of the first programs I try to implement whenever a new language comes along is a filesystem walker.

It combines enough concepts that allow me to quickly evaluate the syntax and some core principles of a language. I rarely end up writing the same thing, which is rather impressive and sometimes even enlightening.

Re: Twenty years later I wrote a Tetris again

#19
post #3

"One night in May of 1996 I was bored and wanted to play Tetris very badly..." now this is how a great programming story should start :-)

"... so I connected my laptop to the internet, searched github, and within minutes I found several great implementations" ;)

LOL touché !

Re: Twenty years later I wrote a Tetris again

#20

Great story. I recently made my own tetris game, though since I wanted to put it on the app stores and not get sued, I had to come up with a "tetris without being tetris", which was a great creative exercise. In the end I made a more unique game with some gameplay that is rather fun (IMHO) that would never have come to be if I just made a straight clone.

Thanks for posting this. I'm always on the lookout for interesting Tetris variants. I purchased (on iOS) for Quad Blocks, after playing it on your website.
Post reply on HN