Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

Aercom

Member Since 19 Jan 2013
Offline Last Active Feb 09 2013 03:46 PM
-----

#5024066 Tile sheet spriting math ?

Posted by Aercom on 21 January 2013 - 04:55 PM

I recommend starting tile_num at 0, not 1!

 

Would be similar to this

 

 

 

//50 x 50 tiles
sprite_x_start = 32 * (tile_num % 50);
sprite_y_start = 32 * (tile_num / 50);

 

 

assuming sprite_y_start is an integer.
 




PARTNERS