Hacker News new | past | comments | ask | show | jobs | submit login
SVG Tetris (xul.fr)
84 points by marcodiego 9 months ago | hide | past | favorite | 17 comments

The last one is using SMIL (declarative animations) not a <script> tag. Wikipedia doesnt let you upload svgs that embed javascript.

>Svg supports the <script> tag. This allows for some very interesting usages.

That raises the question of how one disables the <script> tag on one's browser to prevent the most interesting usages.

IIRC an svg as the src of an img won't run the script.

But it used to be that if you chose "View Image" on the SVG, then it would run the script when it opens the svg in its own window.

Not sure if that's still true.

I first saw your comment on this topic a few weeks ago: https://news.ycombinator.com/item?id=26115086

The controls here are maddening though - I kept expecting the down button to drop the piece rather than rotate it.

I prefer the up button to rotate clockwise myself.

Me too, space should rotate and arrow down should drop.

Can’t do much on mobile, except with an old blackberry i guess. Do you intend to add touch controls as well?

If you do a page info, you'll note the SVG was created in 2007. Highly doubtful anyone is going to update it.

It was a neat tech demo at the time, but we do have better ways to implement Tetris on the web now (possibly then, too)

Looks like it's even earlier. From the page source:

  <!-- SVG Tetris for SVG-enabled Mozilla       -->
  <!-- (c)2004 alex fritze <[email protected]> -->

Right, this was a famous SVG demo example from 2004 stored on http://www.croczilla.com/svg/samples/svgtetris/svgtetris.svg for many years

"Look Maa it is image, it is game, it is web page ..." :)

I thought oh I cannot believe this it is again one of those supper advance CSS, and then a saw javascript.

Never the less, still cool!

But they disabled the Control + and - keybindings so you can't zoom in!

They consume every event, even reloading the page is impossible without reaching for the UI buttons.

Score 102!

SVG as a new Flash? Thankfully open standard.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact