Live data from Hacker News

JavaScript game of Tron in 219 bytes

alokmenghrajani.github.com

1–10 of 54 posts

Re: JavaScript game of Tron in 219 bytes

#4
It's unfortunate that they decided to save 2 bytes by using onkeyup instead of onkeydown. That choice makes the game nearly unplayable for me. Compare the version in the demo to the one here: http://micahw.com/tron.html (221 bytes).

In any case, this is really impressive. It's always fun to see the tricks people employ to get these tiny sizes (smaller than this comment!).

Re: JavaScript game of Tron in 219 bytes

#7
post #4

It's unfortunate that they decided to save 2 bytes by using onkeyup instead of onkeydown. That choice makes the game nearly unplayable for me. Compare the version in the demo to the one here: http://micahw.com/tron.html (221 bytes). In any case, this is really impressive. It's always fun to see the tricks people employ to get these tiny sizes (smaller than this comment!).

No wonder the "lag" feels so bad. Also, the area is way too tiny and it needs a way to restart without having to reload the page.

Re: JavaScript game of Tron in 219 bytes

#8

Encountered a bug: When I die, the game keeps counting score as my "dead" player keeps going across land behind the scenes.

It's 219 bytes, it's not that clever! When you die it simply displays 'game over' along with incremented timer. Because the entire logic is inside a `setInterval` call it never gets stopped.

setInterval is set to update in 9 ms intervals - I assume because whilst it's probably more playable (easier) at higher intervals doing so would require additional bytes.

Re: JavaScript game of Tron in 219 bytes

#9
post #4

It's unfortunate that they decided to save 2 bytes by using onkeyup instead of onkeydown. That choice makes the game nearly unplayable for me. Compare the version in the demo to the one here: http://micahw.com/tron.html (221 bytes). In any case, this is really impressive. It's always fun to see the tricks people employ to get these tiny sizes (smaller than this comment!).

Your version plays so much better, that was really not a good way to save 2 bytes.
Post reply on HN