Crafting a Game With CraftyJS

Introduction

Briefly going to mention a javascript game engine called CraftyJS that I’ve been playing with the past couple of days.

Has the usual suspects like Entity Component System, Collision, Sprite Maps, etc.

The Project

Amos the Alien

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.



comments powered by Disqus