Fork me on GitHub
#clojure-gamedev
<
2018-02-26
>
wusticality00:02:52

writing code in the lisp way is a hell of a lot more sane than doing it imperatively

curlyfry10:02:21

Anyone here using play-cljs? I'm liking it so far but having an issue where the canvas element doesn't show anything when using :optimizations :advanced. It's added to the dom but my game isn't showing.

spiralganglion17:02:55

@iwannaseethelight — I'm building a number of large simulations in CLJS over the next year (for work). It's certainly do-able. I think you just need to be strategic about how you structure your system, so that you don't accidentally slow down the fast parts, so to speak. And CLJ(S) gives you some helpful tools — for instance, volatile! and set! — that allow you to gradually opt for more performance as needed, before you drop all the way down to the host language. You might find parts of this article helpful: https://hackernoon.com/workshop-report-hi-perf-clojurescript-with-webgl-asm-js-and-emscripten-a545cca083bc There was an amazing episode of the HaskellCast where they interview Conal Elliott about his original design of FRP, which was created for making animations in a function language that'd run at a crazy high frame rate (and this was back in the mid 90s). I'm not a Haskeller, but I still found this episode superbly helpful for figuring out how to design similar systems in CLJS. http://www.haskellcast.com/episode/009-conal-elliott-on-frp-and-denotational-design