base code using MelonJS