title: On using mixins in a CoffeeScript game engine
body: <p>I am working on a CoffeeScript game engine for Html5 canvas. I came up with the "cool" idea to utilize mixins after I checked a very neat CoffeeScript <a href="http://arcturo.github.com/library/coffeescript/03_classes.html.github.com/library/coffeescript/03_classes.html" rel="nofollow">implementation</a>. I thought, it may be a very cool idea to reduce the various hierarchy of objects that game objects usually provide, by developing a set of mixin-based components, each of which has a very specific functionality. Then, when developing an actual game, one could build unique game objects on the fly by basically starting from one component and mixing it with a bunch of other components. This reduces the hierarchies and allows for frequent changes.</p>
  
  <p>Then I thought about the possible collisions that might come up, for example having a few components define a method with the same signature. Now, I am not as excited as before.</p>
  
  <p>What should I do? Is this a good way? I still like it, especially because of JS' underlying prototype mechanism, which allows for such an easy way to combine stuff on the fly.</p>