JavaScript platformer game engine