3 ms·
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 de
by zachrose 14y ago
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?
- ibdknox 14y agocomponents are maps of state. so when you call (position 10 10) it's returning a map.