2D Toolkit Forum

2D Toolkit => Support => Topic started by: mike2d on April 08, 2013, 10:43:47 am

Title: multiple spritesheet
Post by: mike2d on April 08, 2013, 10:43:47 am
hi,

a simple question : if my animation takes a good amount of time and i want a quite nice resolution, i would use multiple spritesheet wouldn't i ?

how to do that  ?

thanks,
Title: Re: multiple spritesheet
Post by: unikronsoftware on April 08, 2013, 12:29:39 pm
Your animations can source images from various sprite collections - you're not limited to one. If you want, you can either
1. Manually create multiple sprite collections.
2. Use the atlas spanning feature.

Be aware that the atlas spanning feature isn't a silver bullet - you will run out of memory if you add too many sprites in one go.
Title: Re: multiple spritesheet
Post by: mike2d on April 08, 2013, 01:28:13 pm
all right, nice.

now, as i'm going to create an animated texture, i need them to be ordered so i guess i'll have to use the 1st solution => manually create multiple sprite collections ?

how can i achieve that ?
Title: Re: multiple spritesheet
Post by: unikronsoftware on April 08, 2013, 01:34:30 pm
Do something like this?
http://unikronsoftware.com/2dtoolkit/doc/tutorial/importing_a_spritesheet.html
Title: Re: multiple spritesheet
Post by: mike2d on April 08, 2013, 02:16:14 pm
wonderfull, i'll try that :)

thanks
Title: Re: multiple spritesheet
Post by: mike2d on May 26, 2013, 09:00:22 am
i tried to import my texture but i have a problem to set tile width / height.

my texture is 1024px square of 5x5 images but i can't match those settings perfectly with the tile width / height settings in 2dtk... if i set width and height to 204, it's a little too small and 205 is too big.

any idea ?
Title: Re: multiple spritesheet
Post by: unikronsoftware on May 26, 2013, 09:19:16 am
if your texture is 1024px, and you have 5 images horizontally - there must be some spacing between tiles, as 1024 can't be divided by 5 evenly...
Title: Re: multiple spritesheet
Post by: mike2d on May 26, 2013, 11:14:19 am
ok so there's no magic trick that resizes the spritesheet adding needed spaces to match col / row count.

that would have been perfect  ;D

thanks
Title: Re: multiple spritesheet
Post by: unikronsoftware on May 26, 2013, 11:21:48 am
You can configure padding, etc. but no magical way to do it, I'm afraid.