from Hacker News

Snake in Elm with WebGL

by tibastral2 on 6/26/17, 2:24 PM with 27 comments

  • by pgt on 6/26/17, 7:28 PM

    I made Snake in 103 lines of ClojureScript for a talk from 2015: https://github.com/theronic/cljs-snake

    It would be fun to implement WebGL as a renderer.

  • by dyarosla on 6/26/17, 7:06 PM

    Bug: Create snake of length two. Move RIGHT. Quickly press UP LEFT in quick succession. Lose.

    Similar bug with RIGHT->DOWN->LEFT

    And so on for all the other initial directions.

  • by Kiro on 6/26/17, 6:44 PM

    How is the actual game loop executed? I don't know Elm but I only find update, not how it's run.
  • by donatj on 6/26/17, 7:06 PM

    I attended a two day Elm workshop a while back. There is a lot there to love, I just think it's Haskell inspired syntax is a major impediment to it's mainstream adoption. I however would love to be proven wrong as the webs reliability would be so remarkably improved.
  • by lolc on 6/26/17, 8:12 PM

    Cool demo. And I learn there was an Elm conference close to where I live and I missed it.