Live data from Hacker News

Show HN: MineSweeper implemented in 100% CSS and HTML – no JavaScript

github.com

61–70 of 97 posts

Re: Show HN: MineSweeper implemented in 100% CSS and HTML – no JavaScript

#61
post #6

Earlier quoted context omitted.

yeah, i expected it to be instant to be honest, given it's just markup and there's no "thinking"

It's 1.23MB of CSS & HTML - this is meant to be a stress test of the limits, lag is expected for the next several years of average-at-the-time computers!

yeah fair enough

Re: Show HN: MineSweeper implemented in 100% CSS and HTML – no JavaScript

#62

Earlier quoted context omitted.

If I understand this timer, is it true that after ~16.5 mins, the game would stop? Are you stopping at 1000 keyframes because of a hard limit or for performance or for?

the timer stops at 999 because that's what it does in the real minesweeper, you can keep playing though!

Ah, that makes sense, it's just for the visual. Thanks for clarifying.

Re: Show HN: MineSweeper implemented in 100% CSS and HTML – no JavaScript

#63
post #54

Idle question, is CSS/HTML turing complete? If so I look forward to a Show HN of a CSS/HTML emulator of JSMESS emulating a 386 running Windows 98.

It is (and has been since the css 2.0 era) if you include user clicking mouse. There is a famous demo of rule110 in css at http://eli.fox-epste.in/rule110-full.html

Mouse is not necessary using CSS 3 (animations); Minesweeper[1] is enough to show Turing completeness.

[1] http://web.mat.bham.ac.uk/R.W.Kaye/minesw/infmsw.pdf

Re: Show HN: MineSweeper implemented in 100% CSS and HTML – no JavaScript

#65
post #54

Earlier quoted context omitted.

It is (and has been since the css 2.0 era) if you include user clicking mouse. There is a famous demo of rule110 in css at http://eli.fox-epste.in/rule110-full.html

Mouse is not necessary using CSS 3 (animations); Minesweeper[1] is enough to show Turing completeness. [1] http://web.mat.bham.ac.uk/R.W.Kaye/minesw/infmsw.pdf

edit: ^ previously said "with css variables to hold state" or something similar (or my wires got crossed and I saw that somewhere else)

CSS variables can't be set by animations yet without JS's CSS Houdini giving them a type - a CSS @ property is in the works to do it without JS though!

Re: Show HN: MineSweeper implemented in 100% CSS and HTML – no JavaScript

#68
post #2

I realize this is an absurd thing to do, but it was fun and I wanted to test the limits of CSS again so I could share the results! I linked to the README since any web devs that see this will probably want to know how buuut here's a link to the game if you want to go hands on: https://propjockey.github.io/css-sweeper/#randommenu It's all open source, and I discuss some details of how to do it in that readme, but I am…

This should make white-boarding interviews a lot more fun. "Please implement Minesweeper, but only using HTML + CSS"

Why would you give "them" ideas?
Post reply on HN