Hello Guest

Author Topic: Background images and general best practices  (Read 4788 times)

digitalfront

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 35
    • View Profile
Background images and general best practices
« on: October 05, 2012, 04:54:24 pm »
I purchased your product the other night and find it really impressive overall.  Great job!
 
We are building a card game (CCG) for the ipad and had a few questions:
 
1)  We have dozens of 1024x768 background images we need to use throughout the game.  Would we make a sprite collection for each background image?  Only one background image would be used at a time.
 
2)  If the background image is using a sprite atlas of 1024x1024, does that mean all the sprites in the scene are forced to use a openGL frame buffer of that size?  Or is it just a power of 2 frame buffer per sprite atlas (mixed sizes like, 128x128, 512x512, etc)?
 
3)  We are using a tk2dcamera with a resolution of 1024x768 for the ipad.  For the overrides sections we use that for any resolutions that need special processing?  Otherwise it will scale everything automatically?  (we plan to do some droid tablet releases too)
 
4)  We I first added the toolkit to my project I tried to move the root folder into a sub folder I had made and then everything seemed to get corrupted.  Does the default file structure have to be kept for the toolkit to work right?
 
5)  Lastly, our game is expected to have a few hundred card images (only a few animations though).  Is their any limitation to the number of sprite collections we can have in the project?
 

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Background images and general best practices
« Reply #1 on: October 05, 2012, 07:35:49 pm »
1. It'll probably be easier to use runtime sprite collections to create a sprite outside a sprite collection in this case. Refer to this: http://unikronsoftware.com/2dtoolkit/forum/index.php/topic,340.0.html. This will be a core API function in 1.80 (already is in the alpha), so you will be able to do tk2dSprite.CreateFromTexture(...) to simply create a sprite from a texture, without having to do any collection related processing.

2. You can have mixed sprite collection sizes, it doesn't matter (outside the usual memory constraints, etc)

3. If you need it to scale everything automatically, just add one default override - this will be a wildcard override which will scale everything to fit automatically. You'll still need to manually draw the letterbox bars, etc. for other aspect ratios.

4. File structure doesn't matter, but you can't put it into certain folders. Eg, if you moved everything into a folder called plugins, it wont' work any more as Unity has special processing parameters for those folders. Also ALWAYS do it from within the Unity interface, if you did it from outside the interface, horrible things could and most likely will happen.

5. No. There is a bug with large animations in 1.76 occupying memory even when they're not used, but this shouldn't be the case on the actual sprite collections.

digitalfront

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: Background images and general best practices
« Reply #2 on: October 05, 2012, 08:22:24 pm »
Thanks for the answers. 

The link in #1 says "The topic or board you are looking for appears to be either missing or off limits to you." 

Is it correct?

EDIT: nevermind...I just requested access to the members forum
« Last Edit: October 05, 2012, 08:32:48 pm by digitalfront »