Interactive programming Flappy Bird in ClojureScript
Channel:Bruce Hauman · Length:6:22 · Published:2014-04-29 · Views:55109
Summary
Bruce Hauman live-codes Flappy Bird in ClojureScript in about six minutes, using figwheel to hot-reload changes into the running game. The demo shows game behavior being changed interactively without restarting.
Why HN recommends it
It is the canonical demo HN people cite for live interactive development and hot reloading, as proof the workflow is real and not smoke and mirrors.
I still marvel at Bruce Hauman's demo — HN, 2016
Functional programming · Web development · Game programming & engines
Subtitles (excerpt)
I wrote a linan plugin called fig wheel that pushes compiled closure script to the browser so that you can basically do interactive programming I'm I'm going to do a little demo and something you notice while I'm doing it is that I am not reloading the browser and that all the changes are happening as I save my closure script file another thing to notice is that the program is right running and that all the changes are being applied to the running stateful program so first let's change a little Dom and see how quickly changes get applied so I'm changing the button from do art to start and it just happened immediately let's change it back to Art save the file and again we get it back start is a much better name so we can just eliminate the button it's gone eliminate save it's back so if we start the program here we see Flappy Bird and Flappy Bird is not oscillating and in the real game right here a Flappy Bird before you actually start playing he's oscillating so let's go add that functionality to the game we're going to go up here to the top where I up dat the bird and we're going to create a function called sine wave it's key so we're going to base the sine wave on the time Delta keep a reference to the
On Hacker News
I don't disagree with the article, but I also don't know that pushing the boundaries of interactivity and "fun" are relegated to academia. Iterating on what makes things fun is (probably) highly unscientific and might be better left to people more focused on it directly, such as game programmers. As far as interactive development of games goes, I still marvel at Bruce Hauman's demo[1] of "Interac… — nprescott, 2016-07
From my standpoint as a one man show, it's invaluable to be able to write the web client and backend in the same language, to share code between them... and have that one language NOT be JS. Clojurescript with Rum/Citrus or Reagent/Reframe deliver on the promise of React/Redux with much less fuss and overhead. Editing JSX is a pain in comparison to the Hiccup syntax used more often in CLJS, e.g. … — Nihilartikel, 2020-07
One of the best things about ClojureScript is figwheel and realtime programming. You can see it in action here [VIDEO] — LandR, 2019-11
I'm not sure if the parent did, but I followed what you were looking for and the answer is still "try clojure", perhaps more specifically it is "Try the Clojure libraries figwheel and devcards to do web stuff" but the push for immediate feedback and "interactive programming" is central for everyone. It's a community that took Bret Victor's Inventing on Principle talk to heart, already agreeing du… — freshhawk, 2017-07
If you're starting from from scratch it looks really awesome. No callback hell and in believable tooling. Watch these talks to see what I mean about tooling: Few minutes [VIDEO] Longer [LINK] — base698, 2015-09
Related videos
- I Forgot My Phone · charstarleneTV · 2:10
- Using Social Media To Cover For Lack Of Original Thought - Onion Talks - Ep. 6 · The Onion · 3:36
- Bruce Hauman - Developing ClojureScript With Figwheel · ClojureTV · 45:30
- The spelled-out intro to neural networks and backpropagation: building micrograd · Andrej Karpathy · 2:25:52
- Ruby Conf 12 - Y Not- Adventures in Functional Programming by Jim Weirich · Confreaks · 53:21
- The Soul of Erlang and Elixir • Sasa Juric • GOTO 2019 · GOTO Conferences · 42:02
- "Simple Made Easy" - Rich Hickey (2011) · Strange Loop Conference · 1:01:38
- What the heck is the event loop anyway? | Philip Roberts | JSConf EU · JSConf · 26:52
- Rich Harris - Rethinking reactivity · You Gotta Love Frontend · 36:45
- "Making Impossible States Impossible" by Richard Feldman · elm-conf · 25:06
- William Byrd on "The Most Beautiful Program Ever Written" [PWL NYC] · PapersWeLove · 1:31:05
- The Value of Values with Rich Hickey · InfoQ · 31:43
- Why Isn't Functional Programming the Norm? – Richard Feldman · Metosin · 46:09
- Overwatch Gameplay Architecture and Netcode · GDC Festival of Gaming · 1:04:03
- Maybe Not - Rich Hickey · ClojureTV · 1:03:28
- Solving Problems the Clojure Way - Rafal Dittwald · Clojure/north · 1:02:26