Author Topic: inventory thumbnails, atlas or folder?  (Read 3588 times)

Abe_ForkTech

  • Guest
inventory thumbnails, atlas or folder?
« on: January 22, 2013, 03:09:05 AM »
Hi,

I am working on creating inventory for our game. I was wondering later when we will be adding images to our game inventory what should we be doing for that?

I was thinking that we put all the images in a folder and create an atlas at run time and then place them on the sprites in the inventory list.
What do you people suggest we should do?
Is there a preferred way for displaying images for game inventory other then creating atlas at run time?

Thanks,
Abe

MetaMythril

  • Guest
Re: inventory thumbnails, atlas or folder?
« Reply #1 on: January 22, 2013, 03:22:55 AM »
NGUI has an inventory example. Check out the "Example X - Character" demo scene.

It's simple enough to add your own items. All you have to do is add them to your atlas and then set the icon to whatever sprite name you want.

When you are in the scene, take a look at the ItemDatabase object, it's easy to click "New Item" and define it how you like.

I don't understand the need to generate an atlas at runtime. If all of your images are going to present when to do the build, it's easy enough to add them to an atlas and then assign your sprites to the newly minted items in the inventory database. Then you won't have the extra overhead trying to dynamically generate content.

Hope that helps. :)

Abe_ForkTech

  • Guest
Re: inventory thumbnails, atlas or folder?
« Reply #2 on: January 22, 2013, 04:55:12 AM »
Hi MetaMythril,

Thanks for the advice, but our inventory images/inventory thumbnails wont be available at build time. The game will download them from the Game Server. Also when we will provide an update for the game new images will be added to inventory.

In this case what do you suggest?

Thanks,
Abe

MetaMythril

  • Guest
Re: inventory thumbnails, atlas or folder?
« Reply #3 on: January 22, 2013, 05:01:39 AM »
Since you are using something like Unity, I would assume you would package a content update such as an icon pack into an atlas and build it out as an asset bundle that the game could download and integrate into the game.

This way you can observe the behavior in a controlled way and you just code a solution that looks for all available atlases in a specified location. It just seems like having the client download several separate files and then manage to cobble together assets isn't taking full advantage of Unity's ability to seamlessly digest content.