dmurphy
I see that you are resetting the XP variable to Zero when Player Level Up. Is that how character Leveling up usually works in game? If so, then with your logic I just have to set my XP variable to ZERO and I am done!!
Right now this is how I have set up each Level Ups:
LVL ------------------>XP Needed for Next Level[
1 ------------------>200
2 ------------------>600
3 ------------------>1200
4 ------------------>2000
5 ------------------>3000
.
.
When my character levels up from 1 to 2, I am not resetting the XP gained (eg: current XP =210, XP Needed for Level 3 =600). Because the XP is 210, the XP Bar is already half filled.
So my question is, in a RPG type game, do we reset the XP to ZERO and the player has to score all 600 points to reach the next level? Or do we have to just score the remaining 600-210 points? Is there a calculation to keep the XP same and still adjust the XP bar accordingly?
EDIT: Alright! I decided to reset the XP to Zero. It makes total sense to start from Zero than only score remaining point
I am all set to move ahead now. Thanks dmurphy