Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - spacejaguar

Pages: [1]
1
Support / Many high resolution sprites/images - Performance Advice
« on: February 19, 2013, 11:02:50 am »
So after reading this 2 posts,

http://unikronsoftware.com/2dtoolkit/forum/index.php/topic,405.msg1766.html#msg1766
http://unikronsoftware.com/2dtoolkit/forum/index.php/topic,241.msg961.html#msg961

I still have questions regarding performance Vs memory loading Vs Atlas size.

I am making a game wich uses high resolution art, 130 animals at 512x512 resolution each... wich translates to a 34 megapixel image.  :o

Atlas spanning is out of the question as acording to one of the posts the system loads all the atlas to the memory even if only one sprite is used. And it would be best if I didn't had to mess with manual memory  management in Unity, Loading / Unloading of assets.

So all i am left is with one option, a compromise of creating several smaller collections each containing a single Atlas of 2048*2048 (wich would include on average 16 animals each)

Since at anytime only 2 animals would be shown on a scene at the same time only 2 animal atlas would be loaded since they belong to different collections.

Is this possible? If atlas are divided by different collections will the system only load them when required ?

Has anyone tried this aproach?


2
Support / Load/Change texture on Sprite.
« on: January 20, 2013, 06:00:35 pm »
I am new to programing and having trouble changing the texture on a 2k 2d sprite.  :-\

I am using the    "SwitchCollectionAndSprite (tk2dSpriteCollectionData newCollection, int newSpriteId)" as seen on the tk2BaseSprite class reference but keep getting all sort of errors.
I am using Javascript.

I wantto create a small javacript script and atach it to the object. Then the script reads a variable that informs wich Sprite image should be used.

Can someone please provide an example on how to do this? Would it be possible to call the sprite texture based on the sprite name instead of the sprite ID?

Thanks in advance.

Pages: [1]