simple game engine for javascript and canvas