How To Interpolate Pictures?

SikkJewFroSikkJewFro Member Posts: 75
edited September 2014 in Tech Support

The simplist way to explain this would be, Clash of Clans' resource textures, when you get gold it has a gold bar that fills up according to the percentage you have filled, assuming I have the textures for:
A) The Bar
B ) The Gold That Fills The Bar
C) A Number to show how much gold they have

How can I get the gold bar to increase with how much gold they currently hold? Also, if my game allows the player to upgrade their storage count, how would I account for that? Would I have to do a new set of rules and attributes for each upgrade and its different integers? Id appreciate the help!

Comments

  • UtopianGamesUtopianGames Member Posts: 5,692

    This might help.

    http://www.deepblueapps.com/xpmeter/

    Darren.

  • ArmellineArmelline Member, PRO Posts: 5,354

    If I'm reading it right, you're asking how to create a non-rectangular bar that increases, like a picture being revealed, rather than just a rectangle that grows as in Darren's example.

    The short answer is that it really depends on your game. You can either have a series of pictures that show the bar at various degrees of being filled. I used this method (though my needs were pretty crude and basic) in my mini-project shown here:

    http://forums.gamesalad.com/discussion/68638/white-square-you-da-bomb-wip-for-funsies

    The benefit of this method is that you can use the bar freely and over any part of your game without worry. The drawback is you need a separate image for every step of your bar. So if your bar has 100 possible states, you need 100 pictures.

    An alternative method is to put the bar on a background, and cover it with a copy of the background, reducing the size of the covering actor to reveal more of your bar, and give the illusion it is being filled. This requires only the two images - the bar and the background - but it does require the bar to be on some kind of background, so won't be suitable in all cases.

Sign In or Register to comment.