Framework for a platformer style javascript game