Crafting a Game With CraftyJS
Has the usual suspects like Entity Component System, Collision, Sprite Maps, etc.
Amos the Alien is a small demo I made.
I knew that I wanted a scrolling background of some sort - in other words - parallax scrolling. I also knew that I wanted two modes of scrolling: A) automatic background scrollin (clouds, etc) and character movement scrolling.
To do this in Crafty, the best way would be to create a ‘Scrollable’ component that scrolls in either direction on the screen.
Then you can create a ‘Background’ entity that contains a list of scrollable components. A scroll method is used during frame events or when the main character moves.
Crafty also has scenes for which I built the background, character and platform entities for the demo above.
All and all, it was fun. Might continue it one day, but not really motivated to.