Added y-sorting for sprites