GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How To Interpolate Pictures?

SikkJewFroSikkJewFro Posts: 75Member
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 Posts: 5,685Member

    This might help.

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

    Darren.

  • ArmellineArmelline Posts: 4,715Member, PRO

    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.