A javascript based game engine