Snake in Elm with WebGL

by tibastral2on 6/26/2017, 2:24 PMwith 27 comments

by pgton 6/26/2017, 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 dyaroslaon 6/26/2017, 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 Kiroon 6/26/2017, 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 donatjon 6/26/2017, 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 lolcon 6/26/2017, 8:12 PM

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