Hacker News new | ask | show | jobs
by zamadatix 857 days ago
Very fun for 256 bytes. The script itself looks beautifully compressed as well. I think gameplay is a bit dampened by the scale of the board vs your character though. In Frogger (at least the one I remember) the cars are the same size as the player. Here they are double height which quickly turns it into a game of trying to tap as fast as possible even when you're only trying to pass one oncoming car a few levels in.

One thing I don't understand is the role of the "</svg>" closing tag. I didn't immediately see any reference to an open or closing svg tag anywhere in the source.

2 comments

Same with the </canvas> tag. Are these closing tags needed for some "reason"? I suspect the second (and third) line is included by mistake. Also, if we are counting bytes, the closing pre tag is required and should be counted. The game also relies on filtering out non-arrow key presses but this code isn't compressed or counted at all. The instruction "Do not press any other keys" seems superfluous with the extra onkeydown code added.

Why was this code and a lot of similar code posted to github only 2 hours ago?

hey just a quick update from the author. I release3d this just today. Only the top part of the code (256 bytes) is necessary, bottom stuff is just a bit extra to add some context for people going directly to the github version!
Ahh yeah, that makes sense. Cheers for doing that. I enjoyed unwinding it and playing with it.
And now it can be 250 bytes.