Still along the lines of making minimal daily gains, today I implemented half of the transition between stages. This used to be in the original game of 2011 but I removed it in the rewrite because it is tricky to do right.

The way it was originally implemented was very naive. It lacked elegance, it wasn’t performant, it introduced complexity for what amounts to eye candy. However, it worked, and when I found myself playing the new version I missed my transition.

This new version uses a couple of tricks to be performant (the visuals are done on DOM elements rather than SVG ones, and they use CSS transforms). The code is still inlined, but I have a clear idea of how to separate concerns so that Eye Candy does not bring her ugly sister Complexity by the hand.

alt text