A very basic JavaScript game engine