3 ms·
I see these games as proofs of concept. Is there any inherent reason why you couldn't write a performant game in ClojureScript, if you took the time and energy
by VMG 14y ago
I see these games as proofs of concept.
Is there any inherent reason why you couldn't write a performant game in ClojureScript, if you took the time and energy to focus on performance and polish as much as with other games?
I don't think the point of these articles is "if you want to write a game better do it in Clojure with CES" but "look at this interesting programming concept"
- Domenic_S 14y ago> Is there any inherent reason why you couldn't write a performant game in ClojureScript From the parent: if you want to run at a reasonable framerate you need to perform quite some logic in about 16 milliseconds[...] simply "iterating" over a seq made of a hundred elements in Clojure apparently takes more time than that.
- sgrove 14y agoBut that was the point - you can write it cleanly in ClojureScript, experiment, find bottlenecks, then drop down to Javascript for the tight parts, and clean it up (beautifully) with macros. There's obviously a tradeoff here with immutability/correctness/speed, but when you need to iterate over thousands (or hundreds of thousands) of items, you can get 'native' speed when you need it.
- ibdknox 14y agoFWIW, this is exactly what we did and chromashift has native JS level performance.