🌑

Jason Storey

PocketHunter Devlog #8: XP & Leveling

Well, it has been a while.

XP & Leveling

Previously I had setup some basic XP mechanics on my game but I had only gotten as far as to give animals a base XP value and use that to increment XP on the player. Saving the result to my save file. I decided a good way to get back into my game dev after a very long break would be to pick up where I left off with XP and Leveling the player and build out a more robust system.

XP Formulas

A central aspect of my game is that when encountering an animal it has a chance to be different rarities. These rarities are weighted and other attributes during gameplay can affect these weights, like player level, items, consumables, etc. I wanted to ensure XP calculation for an encounter was dynamic, given a base XP, calculate the final XP based on several variables. I settled on a formula that takes into account a multiplier based on the rarity of the encountered animal, the players level, as well as placeholders for buffable/nerfable gameplay mechanics.

Using this formula I ran some basic calculations on a table of animal data to get a baseline for how XP would increase during the game. This is what I used to define my XP requirements for each level a player can attain. There are 50 levels in total for a player.

Up Next: More UI

I’ve had some ideas on how to do my UI and plan to play around with it soon.

, — Jul 5, 2024