[HN Gopher] Checkboxland
       ___________________________________________________________________
        
       Checkboxland
        
       Author : thunderbong
       Score  : 271 points
       Date   : 2021-09-11 06:16 UTC (1 days ago)
        
 (HTM) web link (www.bryanbraun.com)
 (TXT) w3m dump (www.bryanbraun.com)
        
       | notjustanymike wrote:
       | Yes, but is it WCAG 2.1 AA compliant?
        
       | Wowfunhappy wrote:
       | This is cool, but I wish the Game of Life let you change the
       | pattern by manually toggling check boxes with your mouse. Right
       | now, if you pause the game and change which boxes are checked,
       | they'll revert to the previous state once the game is resumed.
        
       | bazhova wrote:
       | This would be good for a chip8 display
        
       | bryanbraun wrote:
       | There's a better webcam demo that's kind of buried but fun to
       | play with here:
       | https://www.bryanbraun.com/checkboxland/docs/demos/webcam-te...
        
       | matthew_kuiash wrote:
       | I needed a good giggle and there it is! Thanks! I enjoyed that!
        
       | hkdobrev wrote:
       | Where is Minesweeper example? :-D
        
         | p4bl0 wrote:
         | That would be hard to do. Checkboxes can only be in two
         | distinct states.
        
           | hkdobrev wrote:
           | See the snake game on the website.
        
           | zabzonk wrote:
           | Three, if you count disabled.
        
             | Wowfunhappy wrote:
             | And partial, no? So four states.
        
               | p4bl0 wrote:
               | Right. But that still isn't enough for minesweeper, where
               | a cell can be: covered, marked, uncovered with no mines
               | next to it, uncovered with one mine next to it, uncovered
               | with two mines next to it... etc until uncovered with
               | eight mines next to it.
               | 
               | So except if you limit the game to having no cells with
               | more then one neighbors with a mine, it won't work.
        
               | Wowfunhappy wrote:
               | What I'd do:
               | 
               | * All squares start off as unchecked boxes.
               | 
               | * Marked squares are partially-checked boxes.
               | 
               | * Revealed bombs (e.g. player lost, show the board) are
               | fully checked.
               | 
               | * Uncovered squares are deleted, and a number is placed
               | in the space as simple text.
               | 
               | You could absolutely argue the last point is cheating,
               | but, meh, I feel it's within the spirit of the idea.
               | 
               | (Undecided on whether to use disabled checkboxes to mark
               | the perimeter of the playing field; I'd have to try it
               | and see what felt right.)
        
       | tempodox wrote:
       | Pixelation alone would be nothing new but these are stateful
       | interactive pixels! Hilariously crazy.
        
       | bhrgunatha wrote:
       | Reminds me of a colleague many years ago who made pictures as a
       | table with each cell assigned a background colour, manually
       | editing the html!
        
         | skytreader wrote:
         | Any chance your colleague has a YouTube channel and is named
         | "Matt Parker" https://www.youtube.com/watch?v=UBX2QQHlQ_I ?
        
       | f0e4c2f7 wrote:
       | I thought this was going to be an elaborate rant about how modern
       | corporate life has become about checking boxes instead of doing
       | actual work.
       | 
       | This is good too.
        
         | indymike wrote:
         | Was thinking it would be a memo about how soul crushing adding
         | regulatory compliance to UIs is.
        
         | goddstream wrote:
         | Genius. How can any programmer be bored on a Sunday when there
         | are things like this. What a time to be alive.
        
         | pwdisswordfish8 wrote:
         | I was expecting a rant about cookie consent pop-ups.
        
         | __MatrixMan__ wrote:
         | I was thinking it was going to be about manual software
         | testing.
         | 
         | Instead I spent a few minutes trying to navigate my bedroom by
         | checkbox camera. It didn't go well, but kudos to the author
         | just the same.
        
       | ape4 wrote:
       | Looking at the code, it seems weird that each <input
       | type=checkbox> has style="..." in it. Why not use a class or
       | .input[type=checkbox] {...}
        
       | Existenceblinks wrote:
       | What I appreciate is keyboard navigation on demos, from any demo
       | to Marquee even gradually transition from previous to next one
       | without refreshing the whole scene.
        
       | DonHopkins wrote:
       | Is this available as a three.js renderer?
        
       | p4bl0 wrote:
       | When I saw the link title on HN I immediately thought of the idea
       | of implementing Conway's game of life using a grid of checkboxes.
       | It _is_ actually there. Neat!
        
       | agys wrote:
       | "Render anything as HTML checkboxes" is the best headline!
        
       | hayksaakian wrote:
       | This definitely seems like more of a "for fun" project, but it's
       | a fun challenge to think about a practical situation where this
       | is the best solution.
        
         | e12e wrote:
         | The rationale is fantastic:
         | 
         | https://www.bryanbraun.com/2020/06/06/checkboxland/
         | 
         | Must be one of my favorite projects in a long while. Such a
         | mad/brilliant idea, and the aestethic is remarkable for such an
         | odd thing as a checkbox.
         | 
         | Many thanks to the poster.
        
         | chrisco255 wrote:
         | It's fun, sure but no doubt canvas is the way to go for the
         | same effect at less memory overhead.
        
           | jonathanlydall wrote:
           | Indeed. Back in about 2010 or so when I made a Minecraft
           | Redstone Simulator[1], I initially prototyped using a <table>
           | for the display of the "grid".
           | 
           | Just making the cells change colour as a mouse was clicked
           | and dragged over the cells (to draw) was very laggy. After
           | which I switched to canvas which worked really well.
           | 
           | At the time I was a very inexperienced developer but looking
           | back now it was very obvious a table with cell approach
           | wouldn't be performant.
           | 
           | [1]: https://mordritch.com/mc_rss/
        
         | chii wrote:
         | > think about a practical situation where this is the best
         | solution.
         | 
         | could be used as a captcha style roadblock!
        
           | matheusmoreira wrote:
           | God help us all.
        
             | shreddit wrote:
             | To continue please check all checkboxes to display the mona
             | lisa
        
         | hadlock wrote:
         | Not sure if lynx supports check boxes, but might be a way to
         | include native animated graphics where ascii art is merely
         | static
        
           | djxfade wrote:
           | Does Lynx support javascript?
        
             | wlkr wrote:
             | No, Lynx doesn't support JavaScript. I think to get
             | something close you'd have to do a page refresh (e.g. <meta
             | http-equiv="refresh" content="1">) and set the check box
             | states-server side to emulate 'animation' in this way.
        
       | JKCalhoun wrote:
       | "Don't you see, no one has ever done this before! I've got to do
       | this! I've _got_ to do this! "
       | 
       | With that last shout and a wild look in his eye he ran madly out
       | of the lab, hurrying back to his office.
        
         | bryanbraun wrote:
         | pretty accurate tbh
        
         | cf100clunk wrote:
         | Somewhere another madman plots an ncurses version for viewing
         | in lynx.
        
       ___________________________________________________________________
       (page generated 2021-09-12 23:02 UTC)