Live data from Hacker News

JavaScript game of Tron in 219 bytes

alokmenghrajani.github.com

11–20 of 54 posts

Re: JavaScript game of Tron in 219 bytes

#16

It's really cool to see how you've come up with tron in just 219b. You mention saving 11 bytes, bringing the total to 212. Then another 9 (seemingly making it 203). But go on to say you saved 2 more bytes, making it 219. I'm confused.

From 212 bytes, 9 bytes were added (not subtracted) to keep track of the score, making the total 221 bytes. Save 2 bytes and you get 219 bytes.

Re: JavaScript game of Tron in 219 bytes

#17
post #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.

Also it needs multiplayer, achievements and a story mode. No, but seriously, this was not a competition in making a playable game, they clearly specify the rules that they have set for themselves.

Re: JavaScript game of Tron in 219 bytes

#18
post #14

Here's a question for you: how will this look on the new Mackbook Pro with Retina Display ? The tron line is 1px wide, and on that computer's screen the one pixel is too small to see.

Most likely, 1px = 2 device pixels on the retina MBP, like on the the retina iPad and iPhone.

Re: JavaScript game of Tron in 219 bytes

#19
post #14

Here's a question for you: how will this look on the new Mackbook Pro with Retina Display ? The tron line is 1px wide, and on that computer's screen the one pixel is too small to see.

Surely that must have some sort of scaling by default for webpages. Otherwise I would guess nearly all websites appear miniature.

Re: JavaScript game of Tron in 219 bytes

#20
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!).

That's why i can reach 1000 point. Its difficult to keydown and keyup immediately.
Post reply on HN