Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: nah0y on August 22, 2012, 05:09:46 AM

Title: "Disable" pixel perfect
Post by: nah0y on August 22, 2012, 05:09:46 AM
Hi !

In our game, we have a hero and users can buy some outfits for the hero. Those 2 resources (both the hero and the outfits) need to appear in the game and in the shop menu.

In the game, the hero is 200x200px while in the shop, it should be 500x500px for example.
The problem is that we can't afford to have twice the resources (one at 200x200px and the other at 500x500px) because it will take a LOT of spaces (the hero has a lot of sprites for the animation), and the outfits too.

Is it possible to only have the images in the size 500x500px ?
In the game, if I use the texture 500x500, how can I make it size a 200x200 ? Because for example, the sprite animation script is calling MakePixelPerfect etc...

Maybe one solution is to have a parent to the hero and instead of having a scale of 1, take a scale of 200/500 ? I don't know if it's gonna have some bad repercussion on the physics or colliders or whatever.

Thanks !
Title: Re: "Disable" pixel perfect
Post by: PhilipC on August 22, 2012, 10:06:45 AM
Yes i would have a parents that is scaled if this is what you need. But imo a 500x500px sprite seems really large for a shop item.
Title: Re: "Disable" pixel perfect
Post by: nah0y on August 22, 2012, 10:13:20 AM
Thanks !

And don't worry, it's not really 500x500, it's for example purpose only ;)
Title: Re: "Disable" pixel perfect
Post by: PhilipC on August 22, 2012, 10:20:52 AM
Oh good you had me worried. Let me know if it doesnt work.
Title: Re: "Disable" pixel perfect
Post by: nah0y on August 24, 2012, 03:52:35 AM
Thanks Philip,

But damn, in fact our game is made using ex2D and we're using NGUi for everything UI related... so now I have to figure out a way to share an atlas between ex2D and NGUi, so I don't have to use twice the memory... do you have an idea with that ?

Link to the thread about this : http://www.tasharen.com/forum/index.php?topic=1473.0 (http://www.tasharen.com/forum/index.php?topic=1473.0)