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!


  • UtopianGamesUtopianGames Member Posts: 5,689

    This might help.


  • ArmellineArmelline Member, PRO Posts: 4,919

    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:

    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.