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.
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?