graphics engine written for 2d game