first attempt in making javascript game without any game engine or framework