Quantcast
Channel: GameSalad 101 — GameSalad Forums
Viewing all articles
Browse latest Browse all 8930

Experience bar

$
0
0

I wrote a correct logic that I'm sure will work, but I'm wondering if it will hurt performance since Experience point are in the thousands and later in the game in the tens and hundreds of thousands.
Will this logic be reliable once a player reaches high levels or will I have to use a different approach?

Spacing of replicate = 188 (width of full bar) / MaxExperience
Self.positionX is constrained to 474 (current X-position of bar) + 188 (width of full bar) / (2*MaxExperience) so the small replicated bar will be relocated at the far right edge of the screen
Self.Sizewidth is constrained to 188/MaxExpereince (MaxExperience is the required experience to level up)

The green 1 pixel line here is the Experience bar, it's supposed to move from right to left

As you can see MaxExperience here is 500 and this is only level 1!!
I'm not sure if this approach is feasible at high levels.


Viewing all articles
Browse latest Browse all 8930

Trending Articles