simplified sprite setup code.