Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Aercom

Member Since 19 Jan 2013
Offline Last Active May 23 2014 04:01 AM

#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