News for hackers. Stuff that matters.
Re:Anatomy of a knockout by zachrose on Wednesday December 12, 2012 @12:14AM (#4908754)
I am so curious about this: where is the state!?

I understand that functional programming avoids state and mutability, but there must be bits in memory that describe what's happening in the game, no? So entities are unique ids, which I interpret as "objects" without data or methods. And components are described as collections of state, but really they're just functions? I'm looking at the code, and while I don't understand Clojure syntax yet I can see that there are "things" like :camera, :player, and multiple :platforms, which are defined with what I assume to be preliminary data like position and dimensions.

Can anybody give me some clues?

Re:Anatomy of a knockout by ibdknox on Wednesday December 12, 2012 @12:16AM (#4908759)
components are maps of state. so when you call (position 10 10) it's returning a map.