Hi, really nice project, but I have a suggestion. You might want to change the levelUp function by removing "experience = 0" at the end and instead adding "experience -= maxExperience." Right after if that way any exp that is over the max will not be lost during the level up.
@@DZL69420 Just to add on to this(and this may be nitpicking/overengineering by this point), you may want to store experience as a total value rather than a current value. This will allow you to tune the exp/level curve while still reflecting the effort that the previous players put in pre-tune. For example, say it takes 5000 exp to get to level 5, but you find that it is way too slow, so you decide that 5000 exp should get you to level 12. Storing experience as a total value would allow the engine to automatically detect you to be at level 12 if you've accumulated 5000 exp instead of those players feeling cheated out of their time due to new players having it easier than the exp curve that they had to level on.
Awesome idea! What I ended up doing what something like this. void GUI::calculateLevel() { int requiredXp = 0; int tempLevel = 1; while (requiredXp level) { level = tempLevel; } } Idk how this will structure in my reply but theres a formula that will increment the required experience based on the level then an if statement to level the character up based on a placeholder temp level. I wanted to use a formula rather than writing the required xp for each level and inputting xp and returning level.
@@DZL69420 Nice idea That way the currentExperience won't have to be reset after every level up. With that, in the future you could add some milestones that give rewards based on combined experience from all skills.
Hi, really nice project, but I have a suggestion. You might want to change the levelUp function by removing "experience = 0" at the end and instead adding "experience -= maxExperience." Right after if that way any exp that is over the max will not be lost during the level up.
You are so right! Thank you so much for telling me this!
@@DZL69420 Just to add on to this(and this may be nitpicking/overengineering by this point), you may want to store experience as a total value rather than a current value. This will allow you to tune the exp/level curve while still reflecting the effort that the previous players put in pre-tune. For example, say it takes 5000 exp to get to level 5, but you find that it is way too slow, so you decide that 5000 exp should get you to level 12. Storing experience as a total value would allow the engine to automatically detect you to be at level 12 if you've accumulated 5000 exp instead of those players feeling cheated out of their time due to new players having it easier than the exp curve that they had to level on.
Awesome idea! What I ended up doing what something like this.
void GUI::calculateLevel() {
int requiredXp = 0;
int tempLevel = 1;
while (requiredXp level) {
level = tempLevel;
}
}
Idk how this will structure in my reply but theres a formula that will increment the required experience based on the level then an if statement to level the character up based on a placeholder temp level. I wanted to use a formula rather than writing the required xp for each level and inputting xp and returning level.
@@DZL69420 Nice idea That way the currentExperience won't have to be reset after every level up. With that, in the future you could add some milestones that give rewards based on combined experience from all skills.