Combined sub-directory code with sprite generator