Continuing on the upgrade system, I am implementing an experience system.
Experience and levels are an indirect way to adjust difficulty for the player. Regardless of player skill, there will be some location in the dungeon where they reach their skill and character’s limit. If a player is more skilled, they will simply get further and progress faster until they hit this limit. So, there’s sort of no hard skill limit, as opposed to most roguelite shooters. You can just grind level 1 for the entire time, it will just be so much slower. And you cannot level yourself into a corner, so to speak. The player is rewarded for going for harder combat. The penalty is that the player loses experience on top of the current level when they die. They keep the level, so they can spend it on upgrades. Unless the player cannot kill enough stuff to reach the next level, then they will just have to play better.
So I need an experience system first where I can store the numbers and perform the logic:
I am also adding a runtime debug script so I can monitor the exact numbers quickly:
Level is the player’s level — big number for their progress. Points is the progress within that level. This depends on the points needed per level. And awards is how many unspent award points are remaining to spend on upgrades/skills.
Before I can implement any actual experience progression, I need to know the points per level. So I’ll make an asset for that:
This can then list the number of points needed for each level. This also in essence dictates how many levels there are as reaching the last threshold is the same as reaching the last level:
And now I can add that info to my debug script. I can also add the experience increase debug action:
Now I need to wire this to actual mobs who are the ones giving the experience points on death. And to determine how many I should give, I need to store mob experience awards somewhere modular. And you know what that means: more assets!
This can then have readable names for experience values with numbers I can tweak:
And individual mobs now can specify their specific experience amount:
And this all works out great.
An important back-end feature is that I need to properly reset and save the experience the player gains. If the player dies or abandons, I need to reset the points to 0. If they won, then the values are correct and can be saved.
Finally, I need to show the experience bar (I’m using health bar sprites for now):
I don’t know where to show it really, but probably at the bottom or bottom-left of the screen:
A quick sprite transfer and reassigning later, I made some experience-specific sprites. And I wired the bar to respond properly to all the experience gaining events:
I still need to make it look nicer, but I’ll get to that later (may be). For now I need to work on the upgrading (actually use experience) and gear item logic.